ports/118046: Ports dependent upon devel/qt4-corelib or x11-toolkits/qt4-gui may fail to build if port x11-toolkits/qt33 is installed

Suhaib biahus at operamail.com
Wed Nov 14 15:30:06 UTC 2007


>Number:         118046
>Category:       ports
>Synopsis:       Ports dependent upon devel/qt4-corelib or x11-toolkits/qt4-gui may fail to build if port x11-toolkits/qt33 is installed
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 14 15:30:03 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     Suhaib
>Release:        FreeBSD 7.0-BETA2 i386
>Organization:
>Environment:
FreeBSD z.z.lan 7.0-BETA2 FreeBSD 7.0-BETA2 #0: Sat Nov 3 00:0
4:56 GMT 2007 z at z.lan:/usr/obj/usr/src/sys/MAC i386
>Description:
Ports dependent on devel/qt4-corelib or x11-toolkits/qt4-gui may fail to build if port x11-toolkits/qt33 is installed, for instance print/lyx15. This port fails to build at the point following:

c++ -DHAVE_CONFIG_H -I. -I../../../src -DQT_CLEAN_NAMESPACE -DQT_GENUINE_STR -D
QT_NO_STL -DQT_NO_KEYWORDS -Winvalid-pch --include=./pch.h -I../../../src -I../.
./../src/frontends -I../../../images -DQT_SHARED -I/usr/local/include -I/usr/loc
al/include/QtCore -I/usr/local/include/QtGui -I../../../src/frontends/controller
s -I/usr/local/include/Qt -I/usr/local/include/QtCore -I/usr/local/include/QtGui
 -I/usr/local/include -I/usr/local/include -O2 -fno-strict-aliasing -pipe -MT Gu
iFontLoader.lo -MD -MP -MF .deps/GuiFontLoader.Tpo -c GuiFontLoader.cpp -o GuiFo
ntLoader.o
In file included from GuiFontLoader.cpp:25:
/usr/local/include/qfontinfo.h:46: error: function definition does not declare p
arameters
>How-To-Repeat:
Check the following ports are installed:

devel/qt4-corelib
x11-toolkits/qt4-gui
x11-toolkits/qt33

Repeat the following commands:

cd /usr/ports/print/lyx15
make configure
cd /usr/ports/print/lyx15/work/lyx-1.5.1/src/frontends/qt4
gmake

The error produced is the same as if a build was performed.
>Fix:
Port print/lyx15 failed to build because the wrong Qt release version of header file was picked up during the build; Qt3 instead of Qt4. This is caused by the pkg-config metainformation for QtCore and QtGui containing /usr/local/include in their cflags entries, as shown:

# pkg-config --cflags QtCore
-DQT_SHARED -I/usr/local/include -I/usr/local/include/QtCore  
# pkg-config --cflags QtGui
-DQT_SHARED -I/usr/local/include -I/usr/local/include/QtGui 

The problem becomes apparent when Qt3 (x11-toolkits/qt33) is installed because it copies header files to /usr/local/include and some of those have the same names as those installed by devel/qt4-corelib and x11-toolkits/qt4-gui in sub-directories under /usr/local/include. Thus, for example, a build dependent on Qt4 file qfontinfo.h will use the version installed by Qt3 and not Qt4 because the file is first searched for and found in /usr/local/include.

To fix the problem the attached patch should be applied in /usr/local/libdata/pkgconfig after which pkg-config will return cflag entries as shown:

# pkg-config --cflags QtCore
-DQT_SHARED -I/usr/local/include/QtCore  
# pkg-config --cflags QtGui
-DQT_SHARED -I/usr/local/include/QtGui  

A similar patch will need to be applied during the build of devel/qt4-corelib to the file following:
./work/qt-x11-opensource-src-4.3.1/lib/pkgconfig/QtCore.pc

And during the build of x11-toolkits/qt4-gui to the files following:
./work/qt-x11-opensource-src-4.3.1/lib/pkgconfig/QtCore.pc
./work/qt-x11-opensource-src-4.3.1/lib/pkgconfig/QtGui.pc

Patch attached with submission follows:

--- QtCore.pc
+++ QtCore.pc
@@ -10,5 +10,5 @@
 Description: Qtcore Library
 Version: 4.3.1
 Libs: -L${libdir} -lQtCore  -L/usr/local/lib  -lz -lm -pthread -L/usr/local/lib -lgthread-2.0 -lglib-2.0 -liconv -pthread 
-Cflags: -DQT_SHARED -I/usr/local/include -I${includedir}
+Cflags: -DQT_SHARED -I${includedir}
 
--- QtGui.pc
+++ QtGui.pc
@@ -10,5 +10,5 @@
 Description: Qtgui Library
 Version: 4.3.1
 Libs: -L${libdir} -lQtGui -L/usr/local/lib   -lpng -lSM -lICE -lQtCore -L/usr/local/lib -lz -pthread -lgthread-2.0 -lglib-2.0 -liconv -lXi -lXrender -lXrandr -lXfixes -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lm -pthread 
-Cflags: -DQT_SHARED -I/usr/local/include -I${includedir}
+Cflags: -DQT_SHARED -I${includedir}
 


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list