PDA

View Full Version : qt-4.7 pkgconfig QtGui.pc incorrectly includes Carbon framework, when built w/cocoa



elvisjohndowson
20th July 2010, 19:57
Hi,
I've found an error in Qt-4.7 where the prefix/lib/pkgconfig/QtGui.pc and other pc files incorrectly specific Carbon in the framework option, even through Qt-4.7 was built with Cocoa 32-bit only.

This is causing some errors with my applications, using qwtplot3d which thinks it needs to link with Carbon, when the libraries are Cocoa only.

Libs.private: -L/Developer/Applications/Qt-4.7/lib -F/Developer/Applications/Qt-4.7/lib -framework QtCore -L/Developer/Applications/Qt-4.7/lib -framework Carbon -lz -framework AppKit -lz -lz
Cflags: -DQT_SHARED -I/Developer/Applications/Qt-4.7/include -I${includedir}

Here are the steps to reproduce the problem:

$ git clone git://gitorious.org/qt/qt.git
$ cd qt
$ git checkout --track -b 4.7 origin/4.7
$ ./configure -opensource -platform macx-g++ -shared -release -arch i386 -opengl -cocoa -qt-gif -nomake examples -nomake demos -prefix /Developer/Applications/Qt-4.7
$ make -j 8
$ sudo make install

If you look at the resulting lib/*.pc files, you will find entries for Carbon framework instead of Cocoa. Note that I need Qt3 support, so is this the reason, because Qt3 support is not fully implemented on Cocoa?

Best regards,

Elvis Dowson

elvisjohndowson
20th July 2010, 20:39
Hi,
To do some followup testing, I created another build, this time with -no-qt3support

./configure -opensource -platform macx-g++ -shared -release -arch i386 -opengl -cocoa -qt-gif -no-qt3support -nomake examples -nomake demos -prefix /Developer/Applications/Qt-4.7

The resulting QtGui.pc still has a reference to -framework Carbon as shown below

Libs.private: -L/Developer/Applications/Qt-4.7/lib -F/Developer/Applications/Qt-4.7/lib -framework QtCore -L/Developer/Applications/Qt-4.7/lib -framework Carbon -lz -framework AppKit -lz -lz

This is clearly a bug.

How can I fix this issue? If I can have a fix, I can apply it and continue building QwtPlot3d with my app, with Cocoa only support.

Best regards,

Elvis Dowson