Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#1959 closed bug (fixed)

Trunk build fails with sip-4.9 and PyQt-4.6

Reported by: jctull Owned by: nobody
Priority: critical: causes crash or data corruption Milestone: Version 1.4.0
Component: Build/Install Version: Trunk
Keywords: sip pyqt compile Cc:
Must Fix for Release: Yes Platform: OS X
Platform Version: 10.6.1 Awaiting user input: no

Description

Build errors out on OS X using latest sip and pyqt releases (also qt-4.5.2-cocoa):

... Creating qgisconfig.py... Done [ 58%] Generating core/core.so In file included from /Library/Frameworks/QtCore.framework/Headers/qmetatype.h:45,

from /Library/Frameworks/QtCore.framework/Headers/QMetaType:1, from sipAPIcore.h:13, from sipcorecmodule.cpp:7:

/Library/Frameworks/QtCore.framework/Headers/qglobal.h:311:6: warning: #warning "Support for this version of Mac OS X is still preliminary" In file included from /Library/Frameworks/QtCore.framework/Headers/qmetatype.h:45,

from /Library/Frameworks/QtCore.framework/Headers/QMetaType:1, from sipAPIcore.h:13, from sipcoreQList0101QgsVectorOverlay.cpp:7:

/Library/Frameworks/QtCore.framework/Headers/qglobal.h:311:6: warning: #warning "Support for this version of Mac OS X is still preliminary" In file included from /Library/Frameworks/QtCore.framework/Headers/qmetatype.h:45,

from /Library/Frameworks/QtCore.framework/Headers/QMetaType:1, from sipAPIcore.h:13, from sipcoreQMultiMap24000100QgsSnappingResult.cpp:7:

/Library/Frameworks/QtCore.framework/Headers/qglobal.h:311:6: warning: #warning "Support for this version of Mac OS X is still preliminary" In file included from /Library/Frameworks/QtCore.framework/Headers/qmetatype.h:45,

from /Library/Frameworks/QtCore.framework/Headers/QMetaType:1, from sipAPIcore.h:13, from sipcoreQList0100QgsVectorDataProviderNativeType.cpp:7:

/Library/Frameworks/QtCore.framework/Headers/qglobal.h:311:6: warning: #warning "Support for this version of Mac OS X is still preliminary" In file included from /Library/Frameworks/QtCore.framework/Headers/qmetatype.h:45,

from /Library/Frameworks/QtCore.framework/Headers/QMetaType:1, from sipAPIcore.h:13, from sipcoreQMap18000100QgsGeometry.cpp:7:

/Library/Frameworks/QtCore.framework/Headers/qglobal.h:311:6: warning: #warning "Support for this version of Mac OS X is still preliminary" In file included from /Library/Frameworks/QtCore.framework/Headers/qmetatype.h:45,

from /Library/Frameworks/QtCore.framework/Headers/QMetaType:1, from sipAPIcore.h:13, from sipcoreQMap18000600QMap18000100QVariant.cpp:7:

/Library/Frameworks/QtCore.framework/Headers/qglobal.h:311:6: warning: #warning "Support for this version of Mac OS X is still preliminary" /Users/jctull/sources/qgis/trunk/python/core/conversions.sip: In function ‘int convertTo_QMap_1800_0600QMap_1800_0100QVariant(PyObject*, void, int*, PyObject*)’: /Users/jctull/sources/qgis/trunk/python/core/conversions.sip:370: error: ‘sipClass_QVariant’ was not declared in this scope /Users/jctull/sources/qgis/trunk/python/core/conversions.sip:397: error: ‘sipClass_QVariant’ was not declared in this scope make[3]: * [sipcoreQMap18000600QMap18000100QVariant.o] Error 1 make[2]: * [python/core/core.so] Error 2 make[1]: * [python/CMakeFiles/python.dir/all] Error 2 make: * [all] Error 2

Change History (10)

comment:1 by jctull, 14 years ago

Resolution: fixed
Status: newclosed

With qt-4.5.3, this appears to be fixed.

in reply to:  1 comment:2 by jctull, 14 years ago

Resolution: fixed
Status: closedreopened

Replying to jctull:

With qt-4.5.3, this appears to be fixed.

I jumped the gun. Still unable to build with sip-4.9 and pyqt4.6.

comment:3 by vince, 14 years ago

Try this on the python/core directory:

sed -E  "s|sipClass(_\[^,\]+)|(sipWrapperType *) sipTypeAsPyTypeObject (sipType\\1)|" conversions.sip > tmp.sip
rm conversions.sip
mv tmp.sip conversions.sip

It should work.

comment:4 by jctull, 14 years ago

I tried the above suggestion, but got an error with the sed command. My sed knowledge is not enough to sort out the issue.

sed -E "s|sipClass(_\[,\]+)|(sipWrapperType *) sipTypeAsPyTypeObject

(sipType
1)|" conversions.sip > tmp.sip

sed: 1: "s|sipClass(_\[,\]+)|(s ...": unescaped newline inside substitute pattern

comment:5 by vince, 14 years ago

Ah, apologies, I just cut/pasted out of a tcl script (Macports), where some characters must be escaped. The right command is:

sed -E  "s|sipClass(_[^,]+)|(sipWrapperType *) sipTypeAsPyTypeObject (sipType\1)|" conversions.sip > tmp.sip
rm conversions.sip

Sorry for that.

in reply to:  5 comment:6 by jctull, 14 years ago

Replying to vince:

Ah, apologies, I just cut/pasted out of a tcl script (Macports), where some characters must be escaped. The right command is:

sed -E  "s|sipClass(_[^,]+)|(sipWrapperType *) sipTypeAsPyTypeObject (sipType\1)|" conversions.sip > tmp.sip
rm conversions.sip

Sorry for that.

The sed command and appropriate replacement of the conversions.php file worked on the current trunk. Is this something that can be worked into the source code with an OS and lib check?

comment:7 by vince, 14 years ago

This is not OS dependent, it is caused by a change of API between SIP 4.8 and 4.9. The version of SIP should be tested.

in reply to:  7 ; comment:8 by jef, 14 years ago

Resolution: fixed
Status: reopenedclosed

Replying to vince:

This is not OS dependent, it is caused by a change of API between SIP 4.8 and 4.9. The version of SIP should be tested.

looks like the patched conversion.sip also works with SIP 4.8. Applied in r11773

in reply to:  8 comment:9 by jef, 14 years ago

Replying to jef:

Replying to vince:

This is not OS dependent, it is caused by a change of API between SIP 4.8 and 4.9. The version of SIP should be tested.

looks like the patched conversion.sip also works with SIP 4.8. Applied in r11773

but not with 4.7. r11780 hopefully works with all of them.

comment:10 by micha, 14 years ago

Compiling qgis 1.3 on Fedora 12, I came across the same bug. The version of sip supplied on Fedora 12 is 4.9.3 . Changing the conversions.sip file as suggested above solved the problem, and 'make' completed successfully.

Note: See TracTickets for help on using tickets.