Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Linux: Linking with static Qt fails

    Installation and Deployment
    static linux
    1
    2
    1997
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      Chuck R last edited by

      I am attempting to build FlightGear on an Ubuntu 14.04 system. Unfortunately, the Ubuntu 14.04 Qt libraries are not up to par for what is required for FlightGear. Since I will only be using this Qt build for this single application, I opted for a static build.

      I used the following configure command:

      ./configure -static -opensource -nomake tests -gtkstyle -prefix /home/user/Qt/5.4/Src/qtbuild -no-rpath -no-compile-examples -system-proxies -skip qtwebkit -skip qtwebkit-examples -nomake tools -nomake examples -skip script -release -skip multimedia -verbose -l dl -skip location -skip multimedia -skip quick1 -skip quickcontrols -skip sensors -skip serialport -skip svg -skip tools -skip translations -skip wayland -skip webchannel -skip webengine -skip xmlpatterns -skip activeqt -skip connectivity -skip declarative -skip doc -skip enginio -skip graphicaleffects -skip imageformats -skip websockets

      The compile appear to work just fine, but as soon as I attempt build FlightGear I get the following error at the linking stage:

      Linking CXX executable fgfs
      /usr/bin/ld: /home/charles/Qt/5.4/Src/qtbuild/lib/libQt5Core.a(qlibrary_unix.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
      /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libdl.so: error adding symbols: DSO missing from command line
      collect2: error: ld returned 1 exit status

      This appears to be an error with my static Qt build not being linked to libdl.so -- or something? The above configure command is not my original. I had added -l dl in order to fix the problem, but to no avail. Any help at all would be appreciated!

      1 Reply Last reply Reply Quote 0
      • C
        Chuck R last edited by

        I suppose I got it sorted by adding an -ldl flag in the FlightGear compile. Strangely enough, the first time I tried it it didn't work at all. I tried it again and it magically worked. Now I'm going to be building/rebuilding for the next several hours just to figure out how exactly I fixed it...

        1 Reply Last reply Reply Quote 0
        • First post
          Last post