Bug report #1959

Trunk build fails with sip-4.9 and PyQt-4.6

Added by John Tull almost 15 years ago. Updated over 14 years ago.

Status:Closed
Priority:Low
Assignee:nobody -
Category:Build/Install
Affected QGIS version: Regression?:No
Operating System:OS X Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:12019

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
maker3: * [sipcoreQMap18000600QMap18000100QVariant.o] Error 1
maker2:
[python/core/core.so] Error 2
maker1:
[python/CMakeFiles/python.dir/all] Error 2
make: *
[all] Error 2

Associated revisions

Revision e67db942
Added by Jürgen Fischer almost 15 years ago

fix #1959

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11773 c8812cc2-4d05-0410-92ff-de0c093fc19c

Revision 3d35c57d
Added by Jürgen Fischer almost 15 years ago

fix #1959

git-svn-id: http://svn.osgeo.org/qgis/trunk@11773 c8812cc2-4d05-0410-92ff-de0c093fc19c

History

#1 Updated by John Tull almost 15 years ago

  • Status changed from Open to Closed
  • Resolution set to fixed

With qt-4.5.3, this appears to be fixed.

#2 Updated by John Tull almost 15 years ago

  • Status changed from Closed to Feedback
  • Resolution deleted (fixed)

Replying to [comment:1 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.

#3 Updated by vince - almost 15 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.

#4 Updated by John Tull almost 15 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

#5 Updated by vince - almost 15 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.

#6 Updated by John Tull almost 15 years ago

Replying to [comment:5 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?

#7 Updated by vince - almost 15 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.

#8 Updated by Jürgen Fischer almost 15 years ago

  • Status changed from Feedback to Closed
  • Resolution set to fixed

Replying to [comment:7 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.

#9 Updated by Jürgen Fischer almost 15 years ago

Replying to [comment:8 jef]:

Replying to [comment:7 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.


but not with 4.7.  commit:94ab29b1 (SVN r11781) hopefully works with all of them.

#10 Updated by Micha Silver over 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.

Also available in: Atom PDF