Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Building a static QT version fails when running gmake
Forum Update on Monday, May 27th 2025

Building a static QT version fails when running gmake

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
1 Posts 1 Posters 172 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rewind987
    wrote on last edited by
    #1

    I am using the source from qt-everywhere-src-5.10.1.tar.xz, which I have managed to build before but now I am running into an issue when running gmake. The configure command I used is below (with a valid prefix directory)

    ../configure -static -opensource -release -prefix "/my/install/dir" -skip qtwebengine -nomake tests -nomake examples -fontconfig
    

    However when I run the gmake command I get the following issue

    g++ -Wl,--gc-sections -Wl,-O1 -fuse-ld=gold -Wl,--enable-new-dtags -o ../../bin/xmlpatterns .obj/main.o .obj/qapplicationargument.o .obj/qapplicationargumentparser.o .obj/xmlpatterns_plugin_import.o   -L/home/brock/everywhere/qt-everywhere-src-5.10.1/build/qtbase/plugins/bearer -lqconnmanbearer -L/home/brock/everywhere/qt-everywhere-src-5.10.1/build/qtbase/lib -L/lib64 -lqgenericbearer -lqnmbearer -lQt5DBus -ldbus-1 -L/home/brock/everywhere/qt-everywhere-src-5.10.1/build/qtxmlpatterns/lib -lQt5XmlPatterns -lQt5Network -lQt5Core -lm -lz -licui18n -licuuc -licudata -lqtpcre2 -ldl -lgthread-2.0 -lglib-2.0 -lpthread
    .obj/main.o:main.cpp:function QtMetaTypePrivate::QMetaTypeFunctionHelper<QXmlName, true>::Construct(void*, void const*): error: undefined reference to 'QXmlName::QXmlName(QXmlName const&)'
    .obj/main.o:main.cpp:function main: error: undefined reference to 'QXmlName::QXmlName(QXmlName const&)'
    .obj/main.o:main.cpp:function main: error: undefined reference to 'QXmlName::QXmlName(QXmlName const&)'
    collect2: error: ld returned 1 exit status
    gmake[3]: *** [../../bin/xmlpatterns] Error 1
    gmake[3]: Leaving directory `/home/brock/everywhere/qt-everywhere-src-5.10.1/build/qtxmlpatterns/tools/xmlpatterns'
    gmake[2]: *** [sub-xmlpatterns-make_first] Error 2
    

    As far as I can tell this copy constructor is define in qtxmlpatterns/src/xmlpatterns/api/qxmlname.cpp as default. How would I go around this issue to build QT statically? Also I'm unsure if this is even the right route to go down for building a static release to Windows. Most of the Windows instructions seemed to involve QtCreator, however I would like to remain on command line only if possible. Thank you for any help!

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved