[PyQt] Bundle vs Dynamic Lib errors

Phil Thompson phil at riverbankcomputing.com
Fri Feb 3 14:30:16 GMT 2017


On 3 Feb 2017, at 2:15 pm, Jonathan Hodges <jhodges at diamondnt.com> wrote:
> 
> Hello all,
> 
> I am trying to build a QtQuick demo application using pyqtdeploy.  I have been able to build under Linux successfully, but am getting a strange set of errors in OS X when following similar build procedure.
> 
> I am using SIP 4.18-1 and PyQt 5.7 and Online-Installer of Qt 5.7.1 on Mac OS X 10.10.5.  I have Python 3.5.2 from python.org and built SIP and PyQt5.7 using python3 configure.py for each.I have used the development snapshot of pyqtdeploy and v1.3.1, both with the same problem:
> 
> I build SIP statically, following the instructions on the pyqtdeploy docs. When I try to run qmake then make after successful pyqtdeploy build I get the following:
> 
>  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -headerpad_max_install_names -stdlib=libc++ -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -mmacosx-version-min=10.8 -Wl,-rpath,/opt/Qt/5.7/clang_64/lib -o aaaa.app/Contents/MacOS/aaaa pyqtdeploy_main.o pyqtdeploy_start.o pdytools_module.o qrc_pyqtdeploy.o   -F/opt/Qt/5.7/clang_64/lib -L/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages -lsip -L/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/PyQt5 -lQt -lQtCore -lQtGui -lQtNetwork -lQtQml -lQtQuick -lQtWidgets -L/Library/Frameworks/Python.framework/Versions/3.5 -lPython -framework SystemConfiguration -framework CoreFoundation -framework QtQuick -framework QtQml -framework QtNetwork -framework QtCore -framework DiskArbitration -framework IOKit -framework QtGui -framework QtWidgets -framework OpenGL -framework AGL 
> Undefined symbols for architecture x86_64:
>   "_PyBytes_FromStringAndSize", referenced from:
>       qrcimporter_get_data(_object*, _object*) in pdytools_module.o
>   "_PyImport_AddModuleObject", referenced from:
>       qrcimporter_load_module(_object*, _object*) in pdytools_module.o
>   "_PyImport_ExecCodeModuleObject", referenced from:
>       qrcimporter_load_module(_object*, _object*) in pdytools_module.o
>   "_PyModule_Create2", referenced from:
>       _PyInit_pdytools in pdytools_module.o
>   "_PyUnicode_FSDecoder", referenced from:
>       qrcimporter_init(_object*, _object*, _object*) in pdytools_module.o
>   "_PyUnicode_FromKindAndData", referenced from:
>       qstring_to_str(QString const&) in pdytools_module.o
>   "_PyUnicode_FromString", referenced from:
>       pyqtdeploy_start(int, char**, _inittab*, char const*, char const*, char const**) in pyqtdeploy_start.o
>   "_PyUnicode_FromStringAndSize", referenced from:
>       pyqtdeploy_start(int, char**, _inittab*, char const*, char const*, char const**) in pyqtdeploy_start.o
>   "_Py_HasFileSystemDefaultEncoding", referenced from:
>       pyqtdeploy_start(int, char**, _inittab*, char const*, char const*, char const**) in pyqtdeploy_start.o
>   "__Py_FalseStruct", referenced from:
>       qrcimporter_is_package(_object*, _object*) in pdytools_module.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: *** [aaaa.app/Contents/MacOS/aaaa] Error 1
> 
> Any ideas?

What's the point in using a python.org Python rather than a static Python?

Phil


More information about the PyQt mailing list