LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 11-10-2007, 05:56 PM   #1
ag01578
LQ Newbie
 
Registered: Jan 2005
Posts: 7

Rep: Reputation: 0
Problem with Qt libraries installing kdelibs-3.5.8


Hello,

I'm running kernel 2.6.22.6 on an AMD pure 64 system following CLFS structure.
When compiling kdelibs 3.5.8 it stops at kdelibs-3.5.8/dcop/dcopidl as follows:

"/bin/sh ../../libtool --silent --tag=CXX --mode=link g++ -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -R /opt/kde/lib -R /opt/kde/lib -R /opt/qt/lib -R /usr/X11R7/lib -o dcopidl main.o yacc.o scanner.o -lqt-mt -lz -lpng -lz -lm -lXext -lX11 -lSM -lICE -lpthread
/usr/bin/ld: cannot find -lqt-mt
collect2: ld returned 1 exit status
make: *** [dcopidl] Error 1"

I installed and linked Qt-3.3.8 to /opt/qt and as you can see the path to qt libraries is recognized correctly. Library qt-mt.so is present.

If I compile kdelibs-3.5.7 there is no problem at all.

Any ideas?

Alonso
 
Old 11-11-2007, 04:14 PM   #2
berbae
Member
 
Registered: Jul 2005
Location: France
Distribution: Arch Linux
Posts: 540

Rep: Reputation: Disabled
-lqt-mt searches for libqt-mt.a (or libqt-mt.so I'm not sure) not qt-mt.so
These libraries should have been installed with qt 3.3.8 in /opt/qt/lib .
 
Old 11-11-2007, 07:05 PM   #3
ag01578
LQ Newbie
 
Registered: Jan 2005
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by berbae View Post
-lqt-mt searches for libqt-mt.a (or libqt-mt.so I'm not sure) not qt-mt.so
These libraries should have been installed with qt 3.3.8 in /opt/qt/lib .
Yes, you are right berbae. I was writing the library name from the top of my head.

Actually the libraries installed with similar name are libqt-mt.la, libqt-mt.prl, libqt-met.so.3.3.8 and 3 simlinks, libqt-mt.so, libqt-mt.so.3 & libqt-mt.so.3.3 all three pointing towards libqt-mt.so.3.3.8. All of them are in /opt/qt/lib.

Looking at the command that produces the error and comparing it to previous successful commands (not shown in this post) it grabs my attention that the call to libraries to use is after the object filenames "... dcopidl main.o yacc.o scanner.o -lqt-mt -lz -lpng -lz -lm -lXext -lX11 -lSM -lICE -lpthread". In previous commands the filenames to apply the command over are positioned last in the command line.

I'm not a C/C+ programmer but as I said, that detail grabs my attention...
 
Old 11-12-2007, 04:33 AM   #4
berbae
Member
 
Registered: Jul 2005
Location: France
Distribution: Arch Linux
Posts: 540

Rep: Reputation: Disabled
I don't think the places of the -l options are important :
an example from 'man ld' is 'ld -o <output> /lib/crt0.o hello.o -lc' with the -l at the end.

So it seems you don't have a libqt-mt.a static library, this could be an issue if the linker searches only for a .a library.
I'm not sure if that is the problem, but you can try to re-compile/install qt with static library enabled in the configure script, to get a libqt-mt.a file in /opt/qt/lib .

Edit: Another idea is that the linker invoked from the libtool utilitly doesn't find the libqt-mt.la because your qt 3.3.8 is not installed in a directory in the default search path for libraries. I suppose you can fix this issue by telling where qt libs are installed to the configure script of kdelibs 3.5.8 (look ./configure --help to see exactly how to do that).
I think of that because the libtool utility uses .la libraries instead of .a libraries and you have libqt-mt.la already installed. In this case don't re-compile qt, try that first.

Last edited by berbae; 11-12-2007 at 06:52 AM.
 
Old 11-14-2007, 05:56 PM   #5
ag01578
LQ Newbie
 
Registered: Jan 2005
Posts: 7

Original Poster
Rep: Reputation: 0
I've tried giving explicit path to Qt but that did not help. This is the configure command I use

./configure --prefix=$KDE_PREFIX --sysconfdir=/etc/kde --disable-debug --disable-dependency-tracking --with-qt-dir=/opt/qt --with-qt-includes=/opt/qt/include --with-qt-libraries=/opt/qt/lib



The relevant section of config.log

configure:35036: checking for Qt
configure: 35101: /opt/qt/include/qstyle.h
taking that
configure:35218: rm -rf SunWS_cache; g++ -o conftest -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -I/opt/qt/include -I/usr/X11R7/include -DQT_THREAD_SUPPORT -D_REENTRANT -L/opt/qt/lib -L/usr/X11R7/lib conftest.cpp -lqt-mt -lpng -lz -lm -ljpeg -ldl -lXext -lX11 -lSM -lICE -lpthread 1>&5
configure:35221: $? = 0
configure:35280: result: libraries /opt/qt/lib, headers /opt/qt/include using -mt
configure:35461: checking for moc
configure:35533: result: /opt/qt/bin/moc
configure:35541: checking for uic
configure:35595: result: /opt/qt/bin/uic
configure:35626: checking whether uic supports -L
configure:35637: /opt/qt/bin/uic -L /nonexistent conftest.ui >/dev/null
configure:35640: $? = 0
configure:35652: result: yes
configure:35664: checking whether uic supports -nounload
configure:35675: /opt/qt/bin/uic -nounload conftest.ui >/dev/null
configure:35678: $? = 0
configure:35690: result: yes
configure:35727: checking if Qt needs -ljpeg
configure:35772: rm -rf SunWS_cache; g++ -o conftest -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -I/opt/qt/include -I/usr/X11R7/include -DQT_THREAD_SUPPORT -D_REENTRANT conftest.cpp -L/opt/qt/lib -L/usr/X11R7/lib -lqt-mt -lpng -lz -lm -ldl -lXext -lX11 -lSM -lICE 1>&5
conftest.cpp: In function 'int main()':
conftest.cpp:108: warning: 'argv' is used uninitialized in this function
configure:35778: $? = 0
configure:35812: result: no



I really appreciate your help berbae. This is driving me nuts!
 
Old 11-15-2007, 08:08 AM   #6
berbae
Member
 
Registered: Jul 2005
Location: France
Distribution: Arch Linux
Posts: 540

Rep: Reputation: Disabled
Quote:
I've tried giving explicit path to Qt but that did not help.
I presume that means you get the same error '/usr/bin/ld: cannot find -lqt-mt'.
I have now only two ideas left.
1) try using the LDFLAGS environment variable :
export LDFLAGS='-L/opt/qt/lib'
./configure <with the options --with-qt ...>
2) if that doesn't work either, recompile qt 3.3.8 with the configure option --enable-static to get a libqt-mt.a file.
Then try again to compile kdelibs 3.5.8, first without the LDFLAGS variable, and with it if that doesn't go well.

After that I have no more ideas.
I hope you good luck for now.
 
Old 11-16-2007, 07:35 PM   #7
ag01578
LQ Newbie
 
Registered: Jan 2005
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by berbae View Post
1) try using the LDFLAGS environment variable :
export LDFLAGS='-L/opt/qt/lib'
./configure <with the options --with-qt ...>

This did it. kdelibs finally compiled. Thanks!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kdelibs-3.5.6-r8 & qt problem flamma Linux - General 2 05-16-2007 01:51 PM
KDElibs problem f1dave Ubuntu 1 07-01-2005 03:54 AM
Problem apt-getting kdelibs-data powadha Debian 15 08-23-2004 09:37 AM
problem with installing libraries slano Linux - Software 2 12-11-2003 06:09 PM
Need help installing libraries jdruin Linux - Software 5 12-09-2003 02:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 05:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration