Results 1 to 6 of 6

Thread: Another QT compile error, help please (I know, I know...)

  1. #1
    Registered User
    Join Date
    Dec 2001
    Posts
    2

    Another QT compile error, help please (I know, I'm sorry)

    I know everyone is probably sick of dealing with QT compile errors, but this one is stumping me. Any help would be appreciated.

    Downloaded 2.3.2 from troll, set the QTDIR, LD_LIBRARY_PATH, and PATH to the appropriate directory, ran configure with the -thread -no-g++-exceptions, etc, as suggested. This is the error I'm getting, looks like right after it builds the shared library:

    make[3]: Leaving directory `/usr/local/qt-2.3.2/src'
    cd examples/guithreads;make 'QT_THREAD_SUFFIX=mt' 'QT_LFLAGS_MT=$(SYSCONF_LFLAGS_THREAD) $(SYSCONF_LIBS_THREAD' 'QT_CXX_MT=$(SYSCONF_CXXFLAGS_THREAD) -DQT_THREAD_SUPPORT' 'QT_C_MT=$(SYSCONF_CFLAGS_THREAD) -DQT_THREAD_SUPPORT'
    make[3]: Entering directory `/usr/local/qt-2.3.2/examples/guithreads'
    g++ -L/usr/local/qt/lib -Wl,-rpath,/usr/local/qt/lib -lpthread -o ./guithreads/main.o -lqt-mt
    /usr/local/qt/lib/libqt-mt.so: undefined reference to `dlerror'
    /usr/local/qt/lib/libqt-mt.so: undefined reference to `dlclose'
    /usr/local/qt/lib/libqt-mt.so: undefined reference to `dlopen'
    /usr/local/qt/lib/libqt-mt.so: undefined reference to `dlsym'
    collect2: ld returned 1 exit status
    make[3]: *** [guithreads] Error 1
    make[3]: Leaving directory `/usr/local/qt-2.3.2/examples/guithreads'
    make[2]: *** [src-mt] Error 2
    make[2]: Leaving directory `/usr/local/qt-2.3.2'
    make[1]: *** [src-mt] Error 2
    make[1]: Leaving directory `/usr/local/qt-2.3.2'
    make: *** [init] Error 2

    ---

    Relevant information:

    /usr/local/qt is a symbolic link to /usr/local/qt-2.3.2

    # gcc -v
    Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.1/specs
    Configured with ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --host=i386-redhat-linux --with-system-zlib
    Thread model: posix
    gcc version 3.1 20011127 (Red Hat Linux Rawhide 3.1-0.10)

    # g++ -v
    Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.1/specs
    Configured with ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --host=i386-redhat-linux --with-system-zlib
    Thread model: posix
    gcc version 3.1 20011127 (Red Hat Linux Rawhide 3.1-0.10)

    RPMS:
    automake-1.5-1
    autoconf-2.52-5
    binutils-2.11.92.0.12-7
    glibc-common-2.2.4-20
    glibc-2.2.4-20
    glibc-devel-2.2.4-20
    compat-glibc-6.2-2.1.3.2
    libgcc-3.1-0.10
    gcc-3.1-0.10
    gcc-c++-3.1-0.10
    libstdc++-3.1-0.10
    libstdc++-2.96-81
    libstdc++-devel-3.1-0.10
    compat-libstdc++-6.2-2.9.0.14
    zlib-devel-1.1.3-24
    zlib-1.1.3-24


    ---

    Any help would be appreciated.
    Last edited by EQjunkie; 12-22-2001 at 05:12 PM.

  2. #2
    Registered User
    Join Date
    Dec 2001
    Posts
    2
    Ok, so I hacked around it. Had to add -ldl, and in some places -lpthread to the local Makefile to get it to work.

  3. #3
    Registered User
    Join Date
    Dec 2001
    Posts
    18
    I'm getting the same errors. Could you be a little more verbose in what you did? Thanks

    Quack

  4. #4
    Registered User
    Join Date
    Dec 2001
    Posts
    18
    Ok.. I had to learn about makefiles this weekend, so I figured I should share my knowledge with others.

    It appears the configure script does not work perfectly for all versions of linux. If you run into problems like those pointed out above, go to the Makefile in the directory that is causing the problems and make the following change:

    replace the line that says:

    SYSCONF_LFLAGS_SHOBJ = -shared
    with:

    SYSCONF_LFLAGS_SHOBJ = -shared -ldl

    It should be on or around line 61.
    From the above example:

    make[3]: Entering directory `/usr/local/qt-2.3.2/examples/guithreads'

    you would go to:

    /usr/local/qt-2.3.2/examples/guithreads

    I had to make this change to about 5 Makefiles. Don't worry about which ones at first. Everytime the make fails with the above error, figure out which Makefile failed, make the change, and type 'make' again. 'make' is smart enough to pick back up from where it last failed.

    Good luck!

  5. #5
    Registered User
    Join Date
    Dec 2001
    Posts
    8
    Ok, I was having the same problems, but the solutions in this thread didn't quite get the job done for me. Here's what worked for me. When you do the ./configure command for qt, do it like this:

    ./configure -release -shared -gif -xft -sm -system-libmng -system-zlib -system-libpng -system-jpeg -no-g++-exceptions -thread -ldl

    The only thing that's different from Zaphod's original directions is the -ldl switch at the end. After a lot of reading, I've found that this tells the configure utility to use the dynamic linker during the makes. Apparently, configure should automatically know how to do this if your system needs it. However, if for some reason it doesn't do it's job, the -ldl gets left out, and you can't compile.

    Anyway, I hope my hours of research can benefit someone else as well .

  6. #6
    Registered User
    Join Date
    Dec 2001
    Posts
    8
    Oh, and one more thing... I have reason to believe that if you run /sbin/ldconfig before you do the configure and make for qt, you can just use Zaphod's original ./configure line. I'm not sure if this is the case, but you may want to try it to see if it works before putting the -ldl thing and the end of ./configure like I mentioned in my last post.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

You may post new threads
You may post replies
You may post attachments
You may edit your posts
HTML code is Off
vB code is On
Smilies are On
[IMG] code is On