Menu

OSX link problems with older QT (5.4)

Help
2016-06-19
2016-06-23
  • Brad Elliott

    Brad Elliott - 2016-06-19

    Hi Florian,

    I have a project that still uses Qt5.4 with Python 2.7. I occasionally try to sync with the latest version of PythonQt but I seem to be getting link issues on OSX. I traced it back and my compile stops working on SVN revision 429. Is there an easy way to fix this or should I just stick with revision 428 for now. Are you planning on deprecating Qt 5.4?

    rm -f libPythonQt_QtAll.1.0.0.dylib libPythonQt_QtAll.dylib libPythonQt_QtAll.1.dylib libPythonQt_QtAll.1.0.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.11.sdk -mmacosx-version-min=10.7 -single_module -dynamiclib -compatibility_version 1.0 -current_version    1.0.0 -install_name libPythonQt_QtAll.1.dylib -o libPythonQt_QtAll.1.0.0.dylib PythonQt_QtAll.o com_trolltech_qt_core0.o com_trolltech_qt_core1.o com_trolltech_qt_core2.o com_trolltech_qt_core3.o com_trolltech_qt_core_init.o com_trolltech_qt_gui0.o com_trolltech_qt_gui1.o com_trolltech_qt_gui2.o com_trolltech_qt_gui3.o com_trolltech_qt_gui4.o com_trolltech_qt_gui5.o com_trolltech_qt_gui6.o com_trolltech_qt_gui7.o com_trolltech_qt_gui8.o com_trolltech_qt_gui9.o com_trolltech_qt_gui10.o com_trolltech_qt_gui11.o com_trolltech_qt_gui12.o com_trolltech_qt_gui_init.o com_trolltech_qt_svg0.o com_trolltech_qt_svg_init.o com_trolltech_qt_sql0.o com_trolltech_qt_sql_init.o com_trolltech_qt_network0.o com_trolltech_qt_network1.o com_trolltech_qt_network_init.o com_trolltech_qt_opengl0.o com_trolltech_qt_opengl_init.o com_trolltech_qt_xml0.o com_trolltech_qt_xml1.o com_trolltech_qt_xml_init.o com_trolltech_qt_xmlpatterns0.o com_trolltech_qt_xmlpatterns_init.o com_trolltech_qt_multimedia0.o com_trolltech_qt_multimedia1.o com_trolltech_qt_multimedia_init.o moc_com_trolltech_qt_core0.o moc_com_trolltech_qt_core1.o moc_com_trolltech_qt_core2.o moc_com_trolltech_qt_core3.o moc_com_trolltech_qt_gui0.o moc_com_trolltech_qt_gui1.o moc_com_trolltech_qt_gui2.o moc_com_trolltech_qt_gui3.o moc_com_trolltech_qt_gui4.o moc_com_trolltech_qt_gui5.o moc_com_trolltech_qt_gui6.o moc_com_trolltech_qt_gui7.o moc_com_trolltech_qt_gui8.o moc_com_trolltech_qt_gui9.o moc_com_trolltech_qt_gui10.o moc_com_trolltech_qt_gui11.o moc_com_trolltech_qt_gui12.o moc_com_trolltech_qt_svg0.o moc_com_trolltech_qt_sql0.o moc_com_trolltech_qt_network0.o moc_com_trolltech_qt_network1.o moc_com_trolltech_qt_opengl0.o moc_com_trolltech_qt_xml0.o moc_com_trolltech_qt_xml1.o moc_com_trolltech_qt_xmlpatterns0.o moc_com_trolltech_qt_multimedia0.o moc_com_trolltech_qt_multimedia1.o  -F/Users/belliott/Qt/5.4/clang_64/lib -F/System/Library/Frameworks -framework Python -L/Users/belliott/.jenkins/jobs/pythonqt_build_osx/workspace/pythonqt-code/build/../lib -lPythonQt -framework QtSvg -framework QtWidgets -framework QtGui -framework QtCore -framework DiskArbitration -framework IOKit -framework QtOpenGL -framework QtPrintSupport -framework QtMultimediaWidgets -framework QtMultimedia -framework QtNetwork -framework QtQuickWidgets -framework QtQuick -framework QtQml -framework QtSql -framework QtXmlPatterns -framework QtXml -framework OpenGL -framework AGL  
    Undefined symbols for architecture x86_64:
      "PythonQt_init_QtQml(_object*)", referenced from:
          PythonQt_QtAll::init() in PythonQt_QtAll.o
      "PythonQt_init_QtQuick(_object*)", referenced from:
          PythonQt_QtAll::init() in PythonQt_QtAll.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[2]: *** [../../lib/libPythonQt_QtAll.1.0.0.dylib] Error 1
    make[1]: *** [sub-PythonQt_QtAll-make_first] Error 2
    make: *** [sub-extensions-make_first-ordered] Error 2
    Build step 'Execute shell' marked build as failure
    Finished: FAILURE
    
     
  • Florian Link

    Florian Link - 2016-06-19

    Sorry, I did not regenerate the wrappers for Qt 5.4 and what you can't compile are the new wrappers (QtQuick and QtQml). You can either just uncomment the lines regarding QtQuick and QtQml in PythonQt_All or you can run the generator on your Qt version, it will generate the missing wrappers.
    Qt 5.4 itself should not be a problem. I am kind of lazy regarding older Qt versions, because I stopped keeping them around and compiling them.

     

    Last edit: Florian Link 2016-06-22
  • Zafeirios Fountas

    Hi,
    Could you please provide a little bit more details regarding the solutions you propose? I am not sure I understand which lines I should uncomment in order to make QtQml and QtQuick wrappers to work.
    I tried to edit the lines
    PythonQt_init_QtQml(0);
    PythonQt_init_QtQuick(0);
    in the file: extensions/PythonQt_QtAll/PythonQt_QtAll.cpp
    and change the value zero to one, but this didn't change anything.
    Also, if this solution is not ideal, could you please explain or point to instructions for how I run the generator on my Qt version? Thanks a lot for the help!

     
  • Florian Link

    Florian Link - 2016-06-23

    You should just comment/remove those two lines, that should be enough.

     
  • Zafeirios Fountas

    It worked - many thanks!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.