[PyQt] Static python build on OSX 10.9 refers to sincos_stret missing at link time of pyqtdeploy

bootch at nc.rr.com bootch at nc.rr.com
Sat May 10 23:29:20 BST 2014


I built Python3.4 static following the pyqtdeploy tutorial instructions, on OSX10.9, Xcode 5.1.

Then, building PyQt static I got the compile error:

rm -f libpyqt5.dylib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -headerpad_max_install_names -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -mmacosx-version-min=10.9 -single_module -dynamiclib -o libpyqt5.dylib pluginloader.o moc_pluginloader.o  -F/Users/bootch/Qt5.3.0/5.3/clang_64/lib -L/Users/bootch/python/lib -lpython3.4m -framework QtDesigner -framework QtWidgets -framework QtGui -framework QtCore -framework QtXml -framework OpenGL -framework AGL  
Undefined symbols for architecture x86_64:
  "___sincos_stret", referenced from:
      __Py_c_pow in libpython3.4m.a(complexobject.o)
      _complex_pow in libpython3.4m.a(complexobject.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [libpyqt5.dylib] Error 1
make: *** [sub-designer-make_first-ordered] Error 2

I finessed that by specifying --no-qml-plugin and --no-builder-plugin on the configure for PyQt.

But it rears its ugly head again during the quake of my app:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -headerpad_max_install_names -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -mmacosx-version-min=10.8 -o pensool.app/Contents/MacOS/pensool main.o pyqtdeploy_main.o pyqtdeploy_module.o qrc_pyqtdeploy.o qrc_stdlib.o qrc_site-packages.o   -F/Users/bootch/Qt5.3.0/5.3/clang_64/lib -L/Users/bootch/python/lib/python3.4/site-packages/PyQt5 -L/Users/bootch/python/lib/python3.4/site-packages -lQtGui -lQtSvg -lsip -lQtCore -lQtWidgets -lQtPrintSupport -L/Users/bootch/python/lib -lpython3.4m -framework QtPrintSupport -framework QtWidgets -framework QtGui -framework QtCore -framework QtSvg -framework OpenGL -framework AGL 
Undefined symbols for architecture x86_64:
  "___sincos_stret", referenced from:
      __Py_c_pow in libpython3.4m.a(complexobject.o)
      _complex_pow in libpython3.4m.a(complexobject.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [pensool.app/Contents/MacOS/pensool] Error 1

Searching shows that sincos_stret is relatively new, an optimization of Xcode5.   This shows where it is defined:

nm /usr/lib/system/libsystem_m.dylib | grep sincos

I tried to dummy down the build of Python (....TARGET=10.8) but the Python makefile seems to have its own ideas and its configure said it was still building for 10.9.

I'm thinking that pyqtdeploy needs to link that library.  I could be wrong, and I will continue to explore.


More information about the PyQt mailing list