[solved] Qt 3.3.5 compilation issue

  • Hi all,

    I am on a project right now where an old piece of code is to be quickly ported to the SUSE flavor of Linux on an SGI. Turns out that the code depends on Qt 3.3.5. Since I'm using an old code base and am not so sure it was cleaned before saved, I ran a gmake confclean and then ran configure -release, no other flags, and ran gmake. This is the error I got:

    g++ -Wl,-rpath,/homepath/PortProject/qt-x11-commercial-3.3.5-icc/lib -shared -Wl,-rpath,/homepath/PortProject/qt-x11-commercial-3.3.5-icc/plugins/imageformats -o libqjpeg.so .obj/release-shared/main.o .obj/release-shared/jcapimin.o .obj/release-shared/jcapistd.o .obj/release-shared/jccoefct.o .obj/release-shared/jccolor.o .obj/release-shared/jcdctmgr.o .obj/release-shared/jchuff.o .obj/release-shared/jcinit.o .obj/release-shared/jcmainct.o .obj/release-shared/jcmarker.o .obj/release-shared/jcmaster.o .obj/release-shared/jcomapi.o .obj/release-shared/jcparam.o .obj/release-shared/jcphuff.o .obj/release-shared/jcprepct.o .obj/release-shared/jcsample.o .obj/release-shared/jctrans.o .obj/release-shared/jdapimin.o .obj/release-shared/jdapistd.o .obj/release-shared/jdatadst.o .obj/release-shared/jdatasrc.o .obj/release-shared/jdcoefct.o .obj/release-shared/jdcolor.o .obj/release-shared/jddctmgr.o .obj/release-shared/jdhuff.o .obj/release-shared/jdinput.o .obj/release-shared/jdmainct.o .obj/release-shared/jdmarker.o .obj/release-shared/jdmaster.o .obj/release-shared/jdmerge.o .obj/release-shared/jdphuff.o .obj/release-shared/jdpostct.o .obj/release-shared/jdsample.o .obj/release-shared/jdtrans.o .obj/release-shared/jerror.o .obj/release-shared/jfdctflt.o .obj/release-shared/jfdctfst.o .obj/release-shared/jfdctint.o .obj/release-shared/jidctflt.o .obj/release-shared/jidctfst.o .obj/release-shared/jidctint.o .obj/release-shared/jidctred.o .obj/release-shared/jmemmgr.o .obj/release-shared/jquant1.o .obj/release-shared/jquant2.o .obj/release-shared/jutils.o .obj/release-shared/jmemnobs.o -L/homepath/PortProject/qt-x11-commercial-3.3.5-icc/lib -L/usr/X11R6/lib -L/usr/X11R6/lib -lqt-mt -lGLU -lGL -lXmu -lXrender -lXrandr -lXcursor -lXinerama -lXext -lX11 -lm -lSM -lICE -ldl
    /usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /homepath/PortProject/qt-x11-commercial-3.3.5-icc/lib/libqt-mt.so when searching for -lqt-mt
    /usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: cannot find -lqt-mt
    collect2: ld returned 1 exit status
    gmake[4]: *** [../../../imageformats/libqjpeg.so] Error 1
    gmake[4]: Leaving directory /homepath/PortProject/qt-x11-commercial-3.3.5-icc/plugins/src/imageformats/jpeg' gmake[3]: *** [sub-jpeg] Error 2 gmake[3]: Leaving directory/homepath/PortProject/qt-x11-commercial-3.3.5-icc/plugins/src/imageformats'
    gmake[2]: *** [sub-imageformats] Error 2
    gmake[2]: Leaving directory /homepath/PortProject/qt-x11-commercial-3.3.5-icc/plugins/src' gmake[1]: *** [sub-plugins] Error 2 gmake[1]: Leaving directory/homepath/PortProject/qt-x11-commercial-3.3.5-icc'
    gmake: *** [init] Error 2

    Btw, to be clear, I'm running on SUSE Linux Enterprise Server 11 (x86_64), using icc version 12.0.5. We have both an icc and gcc version of the code (whatever that means), so I tried compiling the gcc version as well and I got the same errors.

    Any ideas? I have never worked with Qt 3 before. Thanks for any help...

  • Why you are using Qt 3...? It is really old by now.

  • Oh I do know that. It's a holdover from when this version of the software I'm trying to port was written, and this is the version that needs to be ported. The company is doing a quick and dirty port, so they don't want to take the time to upgrade to using Qt 4.7. Any ideas about this issue?

  • Sorry, I can’t resist... Just do the upgrade. It will in the end save your time if you actually want to get product maintained.

    The important part is

    @/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /homepath/PortProject/qt-x11-commercial-3.3.5-icc/lib/libqt-mt.so when searching for -lqt-mt@

    qt-mt is multithreaded support for Qt. My guess: in your build System Qt3 and Commercial Qt3 is getting mixed together, and been configured in too different way that it won’t even link.

    It’s really hard to know where’s the problem since I don’t know your environment.

  • If I read the error message correctly for some reason, libqt-mt.so does not fit to your settings (compiler, settings, whatever).
    IIRC you need more configure flags for embedded qt in version 3...

  • Thanks Gerolf, I guess I was pretty tired Friday. Didn't look far enough into the problem to tell that mt was for multi-threading. I looked at the configure help listing and found that threading is off by default, so I gave the -thread flag and after configuring, the compilation went well. Lots of thanks.

    One issue I am still having is that I am not seeing the libQtCore.so.4, libQtGui.so.4 libraries, which the setup script for the code I am porting calls for. My lib directory has the following files:


    Why don't I see these other library files? I looked through the configure flags and don't see anything obvious for adding these in, and it seems to me that both QtCore and QtGui should just be there. What am I still doing wrong? Again, I have only used Qt4 before this point, so I'm not sure how Qt3 treated the creation of these libraries.

    Thanks in advance...

  • Hmmm, the 4 in libQtCore.so.4 seems to mean that this library comes from Qt4? If that's the case, then I'm confused as to why I'm compiling Qt3. Have to look further into that. Thanks again.

  • Forget that last bit about the two libraries. I found what my problem was. An internal projects issue. Thanks a lot for your help with this issue.

Log in to reply

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