I got "Segmentation Fault" when I run my application on another PC without Qt.



  • Hi, Sir:
    I follow the way described in "Deploying Qt Applications" to collect all shared libraries into a folder.
    And, write a shell script to export LD_LIBRARY_PATH.

    @appname=basename $0 | sed s,\.sh$,,
    dirname=$PWD/$appname
    LD_LIBRARY_PATH=$dirname
    echo LD_PATH=
    echo $LD_LIBRARY_PATH
    export LD_LIBRARY_PATH
    $dirname/$appname $*@

    And, put my application into the folder as well. However, when I run this application on another PC.
    I get "Segmentation Fault"!!

    Could you help me to know the reason?? The only library I don't put in is linux-gate.so.1.

    Thanks a lot.

    BR,
    Pico



  • Well, I don't think that a missing library is a source for segfault. Anyway, you can check if there're some missing libraries using ldd.

    I think that your friend can be "strace" or "gdb". So you can give us more informations useful to help you.



  • I recommend to check the list of linked shared libraries by "ldd -v myapp" on linux and "otool -L MyApp.app/Contents/MacOS/MyApp" on Mac. Then compare these lists on host and distribution system. It maybe some other library which have different version.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.