Qt Creator native build error



  • Hi everybody,

    I've successfully natively built Qt 5.5.1 on Pi 2.
    Now I get an error when I try compile Qt Creator 3.6.
    The problem is in plugins/designer:

    /usr/bin/g++ -Wl,-rpath-link,/opt/vc/lib -Wl,-rpath-link,/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/lib/arm-linux-gnueabihf -mfloat-abi=hard -Wl,-z,origin '-Wl,-rpath,$ORIGIN:$ORIGIN/..:$ORIGIN/../lib/qtcreator' -Wl,--no-undefined -Wl,-O1 -Wl,-rpath,/usr/local/qt5/lib -shared -Wl,-soname,libDesigner.so -o libDesigner.so .obj/release-shared/widgethost.o .obj/release-shared/sizehandlerect.o .obj/release-shared/formresizer.o .obj/release-shared/formclasswizardpage.o .obj/release-shared/formclasswizarddialog.o .obj/release-shared/formclasswizard.o .obj/release-shared/formclasswizardparameters.o .obj/release-shared/formeditorplugin.o .obj/release-shared/formeditorfactory.o .obj/release-shared/formwindoweditor.o .obj/release-shared/formwindowfile.o .obj/release-shared/qtcreatorintegration.o .obj/release-shared/settingspage.o .obj/release-shared/editorwidget.o .obj/release-shared/formeditorw.o .obj/release-shared/settingsmanager.o .obj/release-shared/formtemplatewizardpage.o .obj/release-shared/codemodelhelpers.o .obj/release-shared/designercontext.o .obj/release-shared/formeditorstack.o .obj/release-shared/resourcehandler.o .obj/release-shared/qtdesignerformclasscodegenerator.o .obj/release-shared/qrc_designer.o .obj/release-shared/moc_widgethost.o .obj/release-shared/moc_sizehandlerect.o .obj/release-shared/moc_formresizer.o .obj/release-shared/moc_formclasswizardpage.o .obj/release-shared/moc_formclasswizarddialog.o .obj/release-shared/moc_formclasswizard.o .obj/release-shared/moc_formeditorplugin.o .obj/release-shared/moc_formeditorfactory.o .obj/release-shared/moc_formwindoweditor.o .obj/release-shared/moc_formwindowfile.o .obj/release-shared/moc_qtcreatorintegration.o .obj/release-shared/moc_settingspage.o .obj/release-shared/moc_editorwidget.o .obj/release-shared/moc_formtemplatewizardpage.o .obj/release-shared/moc_formeditorstack.o .obj/release-shared/moc_resourcehandler.o .obj/release-shared/moc_qtdesignerformclasscodegenerator.o  -L/home/pi/opt/qt551/qttools/lib -L/opt/vc/lib -L/home/pi/opt/qt-creator-opensource-src-3.6.0/lib/qtcreator -L/home/pi/opt/qt-creator-opensource-src-3.6.0/lib/qtcreator/plugins -lResourceEditor -lCppTools -lProjectExplorer -lQtSupport -lTextEditor -lCore -lCPlusPlus -lQtcSsh -lQmlJS -lAggregation -lExtensionSystem -lUtils -lLanguageUtils -L/usr/local/qt5/lib -lQt5PrintSupport -lQt5Designer -lQt5Widgets -lQt5Gui -lQt5Concurrent -lQt5Network -lQt5Xml -lQt5Core -lGLESv2 -lpthread  
    .obj/release-shared/formeditorw.o: In function `Designer::Internal::FormEditorData::initDesignerSubWindows()':
    formeditorw.cpp:(.text+0x1e8): undefined reference to `QDesignerComponents::createWidgetBox(QDesignerFormEditorInterface*, QWidget*)'
    formeditorw.cpp:(.text+0x294): undefined reference to `QDesignerComponents::createObjectInspector(QDesignerFormEditorInterface*, QWidget*)'
    formeditorw.cpp:(.text+0x33c): undefined reference to `QDesignerComponents::createPropertyEditor(QDesignerFormEditorInterface*, QWidget*)'
    formeditorw.cpp:(.text+0x3e4): undefined reference to `QDesignerComponents::createSignalSlotEditor(QDesignerFormEditorInterface*, QWidget*)'
    formeditorw.cpp:(.text+0x480): undefined reference to `QDesignerComponents::createActionEditor(QDesignerFormEditorInterface*, QWidget*)'
    .obj/release-shared/formeditorw.o: In function `Designer::Internal::FormEditorData::fullInit()':
    formeditorw.cpp:(.text+0x2800): undefined reference to `QDesignerComponents::createTaskMenu(QDesignerFormEditorInterface*, QObject*)'
    formeditorw.cpp:(.text+0x2808): undefined reference to `QDesignerComponents::initializePlugins(QDesignerFormEditorInterface*)'
    formeditorw.cpp:(.text+0x280c): undefined reference to `QDesignerComponents::initializeResources()'
    .obj/release-shared/formeditorw.o: In function `Designer::Internal::FormEditorData::FormEditorData()':
    formeditorw.cpp:(.text+0x4a00): undefined reference to `QDesignerComponents::createFormEditor(QObject*)'
    collect2: error: ld returned 1 exit status
    Makefile:362: recipe for target '../../../lib/qtcreator/plugins/libDesigner.so' failed
    make: *** [../../../lib/qtcreator/plugins/libDesigner.so] Error 1
    

    Include and lib paths seem to be correct.
    Does anybody have any idea?


  • Lifetime Qt Champion

    Hi,

    Where did you get the sources ?



  • Hi SGaist,

    from http://download.qt.io/official_releases/qtcreator/3.6/3.6.0/qt-creator-opensource-src-3.6.0.tar.gz.

    QDesignerComponents are afaik in Qt5Designer.
    And libQt5Designer.so is in /home/pi/opt/qt551/qttools/lib.
    The /usr/bin/g++ argumets seem to be correct.


  • Lifetime Qt Champion

    Silly question but did you use the qmake from /home/pi/opt/qt551/bin to setup the build of Qt Creator ?



  • After "sudo make install" of Qt, I added the following to my .bashrc:

    
    LD_LIBRARY_PATH=/usr/local/qt5/lib
    PATH=/usr/local/qt5/bin:$PATH
    

    So qmake comes from /usr/local/qt5/bin.
    Is that wrong?


  • Lifetime Qt Champion

    It depends, is it were you installed your custom Qt ? Because in your second message, you are talking about /home/pi/opt/qt551/



  • I followed the instructions on
    https://wiki.qt.io/Native_Build_of_Qt_5.4.1_on_a_Raspberry_Pi
    to build Qt.
    I've configured it with

    -prefix /usr/local/qt5
    

    /home/pi/opt/qt551/ is the source dir.


  • Lifetime Qt Champion

    And is libQt5Designer.so only in the build dir ?



  • I solved the problem.
    I've built qttools. But it was not enough.
    I had to build qttools/src/designer/src/components.
    This generates the library Qt5DesignerComponents.so.
    That's it.

    @SGaist: Thank you for your patience.


  • Lifetime Qt Champion

    Strangeā€¦ But nice you found out !

    Thanks for sharing !


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.