Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Floppy

QT Problems

This topic is 6015 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, Lately, I have been relying on *.rpm''s in order to get my Linux programs installed properly. I REALLY NEED to be able to build programs that are in *.tar.gz for example. The reason for this is that I constantly get an error about QT not being installed in EVERY KDE based program. After I run the configure script I get this output: checking for Qt... configure: error: Qt (>= Qt 2.2.2) (libraries) not found. Please check your installation! For more details about this problem, look at the end of config.log. So, I proceed to open up config.log in vim and near the end the code that appears to be failing has this output (I made the font size small so it wouldn''t be too long): configure:5298: checking for Qt configure: 5360: /usr/lib/qt-2.3.1//include/qstyle.h taking that tried NO configure:5459: rm -rf SunWS_cache; g++ -o conftest -O2 -fno-exceptions -fno-check-new -I/usr/lib/qt-2.3.1//include -I. -L/usr/lib/qt-2.3.1//lib -L/usr/X11R6/lib conftest.C -lqt -lXext -lX11 -lSM -lICE -lresolv 1>&5 /tmp/ccS5quYF.o: In function `main'': /tmp/ccS5quYF.o(.text+0x3e): undefined reference to `QString::shared_null'' /tmp/ccS5quYF.o(.text+0x71): undefined reference to `QIconView::QIconView(QWidget*, char const*, unsigned)'' /tmp/ccS5quYF.o(.text+0x7b): undefined reference to `QIconView::setWordWrapIconText(bool)'' /tmp/ccS5quYF.o(.text+0x80): undefined reference to `QString::shared_null'' /tmp/ccS5quYF.o(.text+0xa3): undefined reference to `QString::setLatin1(char const*, int)'' /tmp/ccS5quYF.o(.text+0xb8): undefined reference to `QString::shared_null'' /tmp/ccS5quYF.o(.text+0xc3): undefined reference to `QStringData::deleteSelf()'' /tmp/ccS5quYF.o(.text+0xd5): undefined reference to `QIconView::~QIconView()'' /tmp/ccS5quYF.o(.text+0xea): undefined reference to `QString::shared_null'' /tmp/ccS5quYF.o(.text+0xf5): undefined reference to `QString::makeSharedNull()'' /tmp/ccS5quYF.o(.text+0xfd): undefined reference to `QString::makeSharedNull()'' collect2: ld returned 1 exit status configure: failed program was: #include "confdefs.h" #include #include #include #include #include #include #if ! (QT_VERSION >= 222) #error 1 #endif int main() { QStringList *t = new QStringList(); QIconView iv(0); iv.setWordWrapIconText(false); QString s; s.setLatin1("Elvis is alive", 14); int magnolia = QEvent::Speech; /* new in 2.2 beta2 */ return 0; } If I do rpm -q qt qt-devel I get this output: qt-2.3.1-5 qt-devel-2.3.1-5 Clearly, I have qt versions above 2.2.2 My QTDIR is set to /usr/lib/qt-2.3.1/ My KDEDIR is set to /opt/kde2/ BUT there is another similar kde2 directory in /usr/lib/kde2/ BUT I have tried them both. After hours of scourging through the Internet, I found that few other people had also had problems similar to this. They suggested things such as editing your /etc/profile and $HOME/.profile, and setting your QTDIR and KDEDIR, playing with the configure command line arguements, etc. It seems that I have tried everything. I''m positively sure I have done all that properly, but to no avail, the configure script continues to have the EXACT same error. I have been working on this problem for nearly two days straight, and well as I''m sure you can tell I''m a little frustrated. Any help, suggestions, words of wisdom, knowledgable advice, educated guesses, tips, hints, anything that would be useful would be EXTREMELY APPRECIATED!!!!

Share this post


Link to post
Share on other sites
Advertisement
I''m giving you the simplest answer, I could be completely wrong if this problem is more complex that my configure script issues have been .

Find what directory your Qt libraries are in. Look in /etc/ld.so.conf; is the directory listed in there? If not, the simplest ways to make the libraries be found are to (a) put their directory in /etc/ld.so.conf or (b) make a symlink to them in an already listed directory.

Good luck.

[Resist Windows XP''s Invasive Production Activation Technology!]

Share this post


Link to post
Share on other sites
No luck there Null. I already had the appropriate directory in /etc/ld.so.conf. I tried doing symlinks in a few directories where I thought the configure script would check (i.e. /usr/local/qt, etc.). You wouldn't happen to know the appropriate directory where qt should default to? I'll do some searching around. Thanks for replying though.

I thought about doing a symlink before, but I didn't know which directory to put it in. I tried using the --with-qt-dir --with-qt-libraries --with-qt-includes using the symlink, but that still brings up the same error just the same way when I use the directory qt is installed in. I have Red Hat 7.2 gcc3 g++3 automake make autoconf etc. all the regular utils if that helps you.

When I download the *.rpm's of the same program I'm tring to compile, it works fine though; Getting late; I have to get some sleep; Thank you!



Edited by - Floppy on December 26, 2001 3:13:07 AM

Share this post


Link to post
Share on other sites
configure:5459: rm -rf SunWS_cache; g++ -o conftest -O2 -fno-exceptions -fno-check-new -I/usr/lib/qt-2.3.1//include -I. -L/usr/lib/qt-2.3.1//lib -L/usr/X11R6/lib conftest.C -lqt -lXext -lX11 -lSM -lICE -lresolv 1>&5


=============================

CHeck out the -I paramaters on this compile. They have a "//" in the directories. Might be a typo in the configue file, which might explain your problem. Make a backup of your "configure" file, then edit line # 5459.

Best way to do this is just open "vi configure +5459" and then delete the extra "/" in the g++ statement.

See how that works.

R.

Share this post


Link to post
Share on other sites
Yes, that seems to be the problem but I think that the explanation can be if QTDIR is set to /usr/lib/qt-2.3.1/ instead of /usr/lib/qt-2.3.1 (remove the last /). Both the -I and -L directories have // instead of /.

Share this post


Link to post
Share on other sites
Hello,

Thanks for replying, but I still get that error.
My /etc/profile looks like this:
QTDIR=/usr/lib/qt-2.3.1
MANPATH=${MANPATH}:/usr/lib/qt-2.3.1/man
export QTDIR

It may be useful to not that I don''t have a man directory in /usr/lib/qt-2.3.1

The folder I have in /usr/lib/qt-2.3.1 are:
bin
doc --> ../../share/doc/qt-devel-2.3.1 (It''s a symlink)
include
lib

In my /etc/ld.so.conf the line is:
/usr/lib/qt-2.3.1/lib

I have no $HOME/.profile or $HOME/.login
I have read that you can put some of these lines in there.

The shell I''m using is Konsole; I''m using the bash shell (I guess so since if I enter a command that''s not found it outputs "bash: shell: command not found").

I tried editing the configure file, but I kept on getting the exact same errors; I tried hardcoding the directories for the dir lib include and bin; still didn''t work.

Thanks for the help; Any more help would be gladly welcomed. Thanks

Share this post


Link to post
Share on other sites
Try configuring as root, there might be a permission problem on /usr/lib/qt-2.3.1/include/qstyle.h. I''ve seen some packages where the configure script fails unless you are root. Try to compile other programs and notify the maintainer of that package.

Share this post


Link to post
Share on other sites
I''ve tried configuring as root; still the same problem. The permission for qstyle.h are:

-r--r--r--

Read access to all; that should be right for a header file, right?

Any more suggestions would be greatly appreciated

Share this post


Link to post
Share on other sites
I still belive that you changed some variable so it got the wrong value.
You can check the values if you type "set" and if you do not want to read all of the output can "set | grep QTDIR" be used.
With RH 7.2 and not any changes to the bash files do I have
QTDIR=/usr/lib/qt-2.3.1
KDEDIR=/usr

The MANPATH is not important for this it just says where the man pages is located. You should be able to do "man qt" for example. Most library functions do also has man pages. In vim can you read the man page for the word at the cursor if you type K in normal, not insert, mode.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!