Qt on Arch Linux, libdl.so.2 and librt.so.1 not found



  • Hi,

    I can't compile anything. This is an output, it seems that 6th and 7th lines are the most important:

    @00:48:07: Running steps for project HelloWorld...
    00:48:07: Configuration unchanged, skipping qmake step.
    00:48:07: Starting: "/usr/bin/make" -w
    make: Entering directory /media/sda3/cplusplus/qt/hello_world/HelloWorld-build-desktop-Qt_4_8_2_in_PATH__System__Release' g++ -Wl,-O1,--sort-common,--as-needed,-z,relro -Wl,-O1 -o HelloWorld main.o -L/usr/lib -lQtGui -lQtCore -lpthread /usr/bin/ld: warning: libdl.so.2, needed by /usr/lib/libQtCore.so, not found (try using -rpath or -rpath-link) /usr/bin/ld: warning: librt.so.1, needed by /usr/lib/libQtCore.so, not found (try using -rpath or -rpath-link) /usr/lib/libQtCore.so: undefined reference todlsym@GLIBC_2.2.5'
    /usr/lib/libQtCore.so: undefined reference to dlerror@GLIBC_2.2.5' /usr/lib/libQtCore.so: undefined reference todlclose@GLIBC_2.2.5'
    /usr/lib/libQtCore.so: undefined reference to dlopen@GLIBC_2.2.5' /usr/lib/libQtCore.so: undefined reference toclock_gettime@GLIBC_2.2.5'
    collect2: error: ld returned 1 exit status
    make: Leaving directory `/media/sda3/cplusplus/qt/hello_world/HelloWorld-build-desktop-Qt_4_8_2_in_PATH__System__Release'
    make: *** [HelloWorld] Error 1
    00:48:08: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project HelloWorld (target: Desktop)
    When executing step 'Make'@

    I use Arch Linux 64 bits with all updates, but I have glibc v. 2.16.0-1 instead 2.16.0-3 which is the newest one. I'm not able to install the newest one because of issue with my distribution (http://www.archlinux.org/news/the-lib-directory-becomes-a-symlink/).

    The version of Qt Creator:
    @Qt Creator 2.5.2
    Based on Qt 4.8.2 (64 bit)
    Built on Aug 10 2012 at 22:33:07@

    I don't know what else can I say. I have been searching for solution for 2 hours, but I'm not able to find anything. Can anyone give me an advice please? Thank you in advance and I apologize for my english.


    Edit:

    When I try do the same in console:
    @qmake
    make@

    ...the output is the same.


  • Moderators

    I have both libs provided by glibc 2.16.0-4 in /usr/lib on 64bit arch (fully upgraded).

    Try running @g++ -Wl,-O1,--sort-common,--as-needed,-z,relro -Wl,-O1 -o HelloWorld main.o -L/lib -L/usr/lib -lQtGui -lQtCore -lpthread@ in /media/sda3/cplusplus/qt/hello_world/HelloWorld-build-desktop-Qt_4_8_2_in_PATH__System__Release and see if that links. if so you might want to upgrade glibc after all, as the new one puts the two missing libs into /usr/lib while the old one puts them into /lib. Of course you can also add -L/lib to your LD_FLAGS.


Log in to reply
 

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