[PyQt] build sip and pyqt on osx (unix way, no python framework)

Massimo Di Stefano massimodisasha at gmail.com
Tue Jun 1 11:49:16 BST 2010


i tried to remove :

 -framework Python

from the file :

PyQt-mac-gpl-4.7.3/designer/Makefile

but the error persists :


ameworks -o rcc.o rcc.cpp
g++ -headerpad_max_install_names -arch x86_64 -o pyrcc4 main.o rcc.o -F/Library/Frameworks -L/Library/Frameworks -framework QtCore -framework QtXml -framework QtCore
./pyrcc4 -py2 -o ../examples/activeqt/webbrowser/mainwindow_rc.py ../examples/activeqt/webbrowser/mainwindow.qrc
./pyrcc4 -py2 -o ../examples/animation/animatedtiles/animatedtiles_rc.py ../examples/animation/animatedtiles/animatedtiles.qrc
./pyrcc4 -py2 -o ../examples/animation/appchooser/appchooser_rc.py ../examples/animation/appchooser/appchooser.qrc
./pyrcc4 -py2 -o ../examples/animation/easing/easing_rc.py ../examples/animation/easing/easing.qrc
./pyrcc4 -py2 -o ../examples/animation/states/states_rc.py ../examples/animation/states/states.qrc
./pyrcc4 -py2 -o ../examples/animation/stickman/stickman_rc.py ../examples/animation/stickman/stickman.qrc
./pyrcc4 -py2 -o ../examples/demos/embeddeddialogs/embeddeddialogs_rc.py ../examples/demos/embeddeddialogs/embeddeddialogs.qrc
./pyrcc4 -py2 -o ../examples/demos/qtdemo/qtdemo_rc.py ../examples/demos/qtdemo/qtdemo.qrc
./pyrcc4 -py2 -o ../examples/desktop/systray/systray_rc.py ../examples/desktop/systray/systray.qrc
./pyrcc4 -py2 -o ../examples/dialogs/classwizard/classwizard_rc.py ../examples/dialogs/classwizard/classwizard.qrc
./pyrcc4 -py2 -o ../examples/dialogs/configdialog/configdialog_rc.py ../examples/dialogs/configdialog/configdialog.qrc
./pyrcc4 -py2 -o ../examples/draganddrop/draggableicons/draggableicons_rc.py ../examples/draganddrop/draggableicons/draggableicons.qrc
./pyrcc4 -py2 -o ../examples/draganddrop/draggabletext/draggabletext_rc.py ../examples/draganddrop/draggabletext/draggabletext.qrc
./pyrcc4 -py2 -o ../examples/draganddrop/fridgemagnets/fridgemagnets_rc.py ../examples/draganddrop/fridgemagnets/fridgemagnets.qrc
./pyrcc4 -py2 -o ../examples/draganddrop/puzzle/puzzle_rc.py ../examples/draganddrop/puzzle/puzzle.qrc
./pyrcc4 -py2 -o ../examples/graphicsview/collidingmice/mice_rc.py ../examples/graphicsview/collidingmice/mice.qrc
./pyrcc4 -py2 -o ../examples/graphicsview/diagramscene/diagramscene_rc.py ../examples/graphicsview/diagramscene/diagramscene.qrc
./pyrcc4 -py2 -o ../examples/graphicsview/dragdroprobot/dragdroprobot_rc.py ../examples/graphicsview/dragdroprobot/dragdroprobot.qrc
./pyrcc4 -py2 -o ../examples/graphicsview/padnavigator/padnavigator_rc.py ../examples/graphicsview/padnavigator/padnavigator.qrc
./pyrcc4 -py2 -o ../examples/itemviews/chart/chart_rc.py ../examples/itemviews/chart/chart.qrc
./pyrcc4 -py2 -o ../examples/itemviews/editabletreemodel/editabletreemodel_rc.py ../examples/itemviews/editabletreemodel/editabletreemodel.qrc
./pyrcc4 -py2 -o ../examples/itemviews/pixelator/pixelator_rc.py ../examples/itemviews/pixelator/pixelator.qrc
./pyrcc4 -py2 -o ../examples/itemviews/puzzle/puzzle_rc.py ../examples/itemviews/puzzle/puzzle.qrc
./pyrcc4 -py2 -o ../examples/itemviews/simpletreemodel/simpletreemodel_rc.py ../examples/itemviews/simpletreemodel/simpletreemodel.qrc
./pyrcc4 -py2 -o ../examples/mainwindows/application/application_rc.py ../examples/mainwindows/application/application.qrc
./pyrcc4 -py2 -o ../examples/mainwindows/dockwidgets/dockwidgets_rc.py ../examples/mainwindows/dockwidgets/dockwidgets.qrc
./pyrcc4 -py2 -o ../examples/mainwindows/mdi/mdi_rc.py ../examples/mainwindows/mdi/mdi.qrc
./pyrcc4 -py2 -o ../examples/mainwindows/sdi/sdi_rc.py ../examples/mainwindows/sdi/sdi.qrc
./pyrcc4 -py2 -o ../examples/network/ftp/ftp_rc.py ../examples/network/ftp/ftp.qrc
./pyrcc4 -py2 -o ../examples/opengl/textures/textures_rc.py ../examples/opengl/textures/textures.qrc
./pyrcc4 -py2 -o ../examples/painting/basicdrawing/basicdrawing_rc.py ../examples/painting/basicdrawing/basicdrawing.qrc
./pyrcc4 -py2 -o ../examples/painting/svgviewer/svgviewer_rc.py ../examples/painting/svgviewer/svgviewer.qrc
./pyrcc4 -py2 -o ../examples/tools/i18n/i18n_rc.py ../examples/tools/i18n/i18n.qrc
./pyrcc4 -py2 -o ../examples/widgets/tooltips/tooltips_rc.py ../examples/widgets/tooltips/tooltips.qrc
./pyrcc4 -py2 -o ../examples/xmlpatterns/schema/schema_rc.py ../examples/xmlpatterns/schema/schema.qrc
g++ -c -pipe -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W -fPIC -DPYTHON_LIB=\"libpython2.6.dylib\" -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SCRIPT_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQDESIGNER_EXPORT_WIDGETS -DQT_SHARED -I../../../../Qt4.6/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtDesigner.framework/Versions/4/Headers -I/usr/include/QtDesigner -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/Library/Frameworks/QtXml.framework/Versions/4/Headers -I/usr/include/QtXml -I/Library/Frameworks/QtScript.framework/Versions/4/Headers -I/usr/include/QtScript -I/usr/include -I../../../unix/include/python2.6 -I. -F/Library/Frameworks -o pluginloader.o pluginloader.cpp
/Developer/Tools/Qt/moc -DPYTHON_LIB=\"libpython2.6.dylib\" -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SCRIPT_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQDESIGNER_EXPORT_WIDGETS -DQT_SHARED -I../../../../Qt4.6/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtDesigner.framework/Versions/4/Headers -I/usr/include/QtDesigner -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/Library/Frameworks/QtXml.framework/Versions/4/Headers -I/usr/include/QtXml -I/Library/Frameworks/QtScript.framework/Versions/4/Headers -I/usr/include/QtScript -I/usr/include -I../../../unix/include/python2.6 -I. -F/Library/Frameworks -D__APPLE__ -D__GNUC__ pluginloader.h -o moc_pluginloader.cpp
g++ -c -pipe -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W -fPIC -DPYTHON_LIB=\"libpython2.6.dylib\" -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SCRIPT_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQDESIGNER_EXPORT_WIDGETS -DQT_SHARED -I../../../../Qt4.6/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtDesigner.framework/Versions/4/Headers -I/usr/include/QtDesigner -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/Library/Frameworks/QtXml.framework/Versions/4/Headers -I/usr/include/QtXml -I/Library/Frameworks/QtScript.framework/Versions/4/Headers -I/usr/include/QtScript -I/usr/include -I../../../unix/include/python2.6 -I. -F/Library/Frameworks -o moc_pluginloader.o moc_pluginloader.cpp
rm -f libpythonplugin.dylib
g++ -headerpad_max_install_names -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -single_module -dynamiclib -o libpythonplugin.dylib pluginloader.o moc_pluginloader.o  -F/Library/Frameworks -L/Library/Frameworks -framework QtDesigner -framework QtScript -framework QtXml -framework QtGui -framework QtCore  
Undefined symbols:
  "_Py_Initialize", referenced from:
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
  "_PyLong_AsVoidPtr", referenced from:
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
  "_PyErr_Print", referenced from:
      PyCustomWidgets::getModuleAttr(char const*, char const*)in pluginloader.o
      PyCustomWidgets::getModuleAttr(char const*, char const*)in pluginloader.o
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
  "_PyString_FromString", referenced from:
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
  "_PyType_IsSubtype", referenced from:
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
  "_PyModule_GetDict", referenced from:
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
  "__Py_RefTotal", referenced from:
      PyCustomWidgets::getModuleAttr(char const*, char const*)in pluginloader.o
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
  "_PyObject_CallObject", referenced from:
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
  "_PyObject_CallFunctionObjArgs", referenced from:
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
  "_PyList_Append", referenced from:
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
  "__Py_Dealloc", referenced from:
      PyCustomWidgets::getModuleAttr(char const*, char const*)in pluginloader.o
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
  "__Py_NegativeRefcount", referenced from:
      PyCustomWidgets::getModuleAttr(char const*, char const*)in pluginloader.o
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
  "_Py_IsInitialized", referenced from:
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
  "_PyDict_Next", referenced from:
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
  "_PyImport_ImportModule", referenced from:
      PyCustomWidgets::getModuleAttr(char const*, char const*)in pluginloader.o
      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
  "_PyObject_GetAttrString", referenced from:
      PyCustomWidgets::getModuleAttr(char const*, char const*)in pluginloader.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [libpythonplugin.dylib] Error 1
make: *** [all] Error 2



i've also tried to add lines like :

-L/usr/local/gislib/unix/lib/python2.6
-L/usr/local/gislib/unix/lib/

but nothing changes.


Il giorno 01/giu/2010, alle ore 11.31, Phil Thompson ha scritto:

> On Tue, 1 Jun 2010 11:25:29 +0200, Massimo Di Stefano
> <massimodisasha at gmail.com> wrote:
>> Hi Phil,
>> 
>> thanks for your help, i succesfull build sip
>> commenting out this line in the file sipconfig.py :
>> 
>> 
>>            #if "Python.framework" not in dl:
>>            #    error("SIP requires Python to be built as a framework")
>> 
>> 
>> after build Sip, i'm tring to install PyQt
>> 
>> i used this configure :
>> 
>> python configure.py -d /usr/local/gislib/unix/lib/python2.6/site-packages
>> -b /usr/local/gislib/unix/bin --use-arch=x86_64
>> 
>> 
>> but the make ends with an error :
>> 
>> MacBook-Pro-15-di-Massimo-Di-Stefano:PyQt-mac-gpl-4.7.3 sasha$ make
>> make[2]: Nothing to be done for `first'.
>> make[2]: Nothing to be done for `first'.
>> make[2]: Nothing to be done for `first'.
>> make[1]: Nothing to be done for `all'.
>> make[1]: Nothing to be done for `all'.
>> ..
>> ...
>> make[1]: Nothing to be done for `all'.
>> make[1]: Nothing to be done for `all'.
>> make[1]: Nothing to be done for `all'.
>> rm -f libpythonplugin.dylib
>> g++ -headerpad_max_install_names -arch x86_64 -Xarch_x86_64
>> -mmacosx-version-min=10.5 -single_module -dynamiclib -o
>> libpythonplugin.dylib pluginloader.o moc_pluginloader.o 
>> -F/Library/Frameworks -L/Library/Frameworks -framework Python
> 
> You probably need to remove the "-framework Python".
> 
>> -framework
>> QtDesigner -framework QtScript -framework QtXml -framework QtGui
> -framework
>> QtCore  
>> Undefined symbols:
>>  "__Py_RefTotal", referenced from:
>>      PyCustomWidgets::getModuleAttr(char const*, char const*)in
>>      pluginloader.o
>>      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
>>      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
>>      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
>>      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
>>  "__Py_Dealloc", referenced from:
>>      PyCustomWidgets::getModuleAttr(char const*, char const*)in
>>      pluginloader.o
>>      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
>>      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
>>      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
>>      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
>>  "__Py_NegativeRefcount", referenced from:
>>      PyCustomWidgets::getModuleAttr(char const*, char const*)in
>>      pluginloader.o
>>      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
>>      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
>>      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
>>      PyCustomWidgets::PyCustomWidgets(QObject*)in pluginloader.o
>> ld: symbol(s) not found
>> collect2: ld returned 1 exit status
>> make[1]: *** [libpythonplugin.dylib] Error 1
>> make: *** [all] Error 2
>> 
>> maybe i have to export a lib path
>> from :
>> /usr/local/gislib/unix/lib     
>> 
>> ( "/usr/local/gislib/unix/" is where i'm installing source build libs) ?
> 
> Phil



More information about the PyQt mailing list