PDA

View Full Version : Error when building Qt4 on Mac OS X



DragonLance156156
11th February 2009, 05:03
I ran the configure file like this:
./configure -prefix /Developer/Qt4
Then I ran 'make' simply by typing "make" and hitting enter. and it came up with these errors:

Undefined symbols:
"qInitResources_network()", referenced from:
initNetworkResources() in qsslsocket_openssl.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [../../lib/QtNetwork.framework/QtNetwork] Error 1
make: *** [sub-network-make_default-ordered] Error 2
can anyone tell me what this means and what I can do to fix it?

DragonLance156156
12th February 2009, 04:38
Can anyone help? I really would like to install Qt.

ayoy
15th February 2009, 01:26
OK, so:

qInitResources_xxxx() is a method defined in file qrc_xxxx.cpp generated by resource compiler (rcc) from a resource file xxxx.qrc.

Your error looks like qrc_network.cpp wasn't generated from src/network/network.qrc. Make sure that this is the top-most error (nothing have failed previously). If so, post somewhere the output from configure and make, so that I can investigate it.

DragonLance156156
15th February 2009, 02:45
Ok here is a text file with both configure and make outputs sorry they are together but if you search "rowan-mouls-macbook-pro" with command/ctrl 'F' then you can get where configure ends and make begins. I hope you find something.

(I had to zip it because it was so huge lol 600+KB)

ayoy
15th February 2009, 14:09
Before you experience a problem with rcc, you get lots of errors like these:


shared.prf:7: Unknown test function: fixExclusiveOutputDirs
debug.prf:8: Unknown test function: fixExclusiveOutputDirs


I found this function in qt-mac-opensource-src-4.4.3/mkspecs/features/exclusive_builds.prf, but I guess you have this file too. Your problem is similar to described here (http://lists.trolltech.com/qt-interest/2007-02/thread00429-0.html) and here (http://lists.trolltech.com/qt-interest/2007-11/thread00716-0.html), but unfortunately remains without a solution. Are you building on Tiger or Leopard? I tried to configure a freshly downloaded package a while ago and everything works fine, I'm using Leopard 10.5.6.

One thing I can suggest is to give it a try with Qt 4.5 pre-release. It's possible that it won't produce these strange errors...

DragonLance156156
16th February 2009, 02:20
Are you building on Tiger or Leopard? I tried to configure a freshly downloaded package a while ago and everything works fine, I'm using Leopard 10.5.6.
I am using 10.5.6, like you.


One thing I can suggest is to give it a try with Qt 4.5 pre-release. It's possible that it won't produce these strange errors...

I will try this as well as redownloading Qt4.4.3 and report back.

DragonLance156156
16th February 2009, 05:27
Failure on both 4.5 and fresh 4.4.3... I didn't even bother letting it finish configure when I saw the same errors. This really sucks... one thing though, what is your gcc version? mine is 4.0.1. Also, where is your qt-mac-opensource-src-4.4.3 folder when you configure and build it? Is it is your downloads folder or somewhere else?

ayoy
16th February 2009, 06:09
I've switched to gcc-4.2.1 recently (from XCode 3.1), but at the moment I am configuring Qt with gcc-4.0.1 without any problems. I've also cleaned my $PATH so that it doesn't contain any other qmakes, to make sure that the newly created qmake reads *.pro files, and it still works. My Qt source folder is in ~/Downloads, like yours.

Another suggestion - since you don't make changes in configuration (besides prefix), you can use the dmg images from qtsoftware.com. Those work perfectly for me, and you don't have to struggle with weird errors :)

DragonLance156156
16th February 2009, 15:29
I will try that. thanks

DragonLance156156
17th February 2009, 07:19
Well the .dmg worked... however I seem to be in for no end of problems. Realizing that 4.5 is coming out in just a couple weeks I wanted make sure I could uninstall Qt without difficulty. So I found the uninstall-qt.py in /Developer/Tools and when i double clicked it opened it in Build applet.app and made it into a .app file. upon running this file it fails to do anything at all except appear in the dock for a few seconds. So then I opened the .py file in text edit and found a line that says it must be run as root. So I opened terminal and went to the /developer/tools directory and typed: sudo python uninstall-qt.py
this was the output:

removing package docs
removing package headers
file: /Developer/Tools/uninstall-qt.py does not exist, skipping
removing package examples
file: /Developer/Tools/uninstall-qt.py does not exist, skipping
removing package plugins
file: /Developer/Tools/uninstall-qt.py does not exist, skipping
removing package tools
file: /Developer/Tools/uninstall-qt.py does not exist, skipping
removing package libraries
file: /Developer/Tools/uninstall-qt.py does not exist, skipping
removing package debuglibraries
debuglibraries is not installed, skipping.
removing package translations
file: /Developer/Tools/uninstall-qt.py does not exist, skipping

Did I do this right at all or did I mess things up?

ayoy
17th February 2009, 16:05
This looks like the script couldn't delete itself, although it should. But I wouldn't be afraid of this, I've taken a look at the script, and since it tells you that it removes all the packages everything is allright. And debug libraries are not installed, because you apparently didn't install them (they are in another dmg image). All you may have to do after running the script is to manually delete the script itself.

DragonLance156156
17th February 2009, 16:29
Well that's the wierd thing... Thefirst thing it deleted was itself...
However it also apeared to remove Qt so it's all good.