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 Qt 5.5.0 enterprise static on Linux, can't find xcb plugin at runtime
Forum Updated to NodeBB v4.3 + New Features

Building Qt 5.5.0 enterprise static on Linux, can't find xcb plugin at runtime

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
23 Posts 3 Posters 7.3k Views 1 Watching
  • 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.
  • A Offline
    A Offline
    Alan DuBoff
    wrote on last edited by
    #13

    One other question. Let's say I wanted to build my own shared version to install into /usr/

    Would it be possible to put a unique prefix on my shared libraries so they wouldn't conflict with the standard Qt5 libs? Would it be possible to name all the libraries with a prefix of say Xy so that all libs would be called libXyQt5Gui.so (as an example using Gui) ???

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Alan DuBoff
      wrote on last edited by
      #14

      here's another app, and this seems that because uic and moc is not running, it's missing some meta object data...

      I ran uic manually to get the header needed, but do I need to run moc also?

      Why are these not being called from my project anymore I wonder?

      g++ -Wl,-O1 -o ../../_bin/LinuxX86/biobasetestapp ../../_build/LinuxX86/release/BioBaseTestApp/logbrowser.o ../../_build/LinuxX86/release/BioBaseTestApp/StringConvert.o ../../_build/LinuxX86/release/BioBaseTestApp/biob_defs_common.o ../../_build/LinuxX86/release/BioBaseTestApp/BioBaseTestApp.o ../../_build/LinuxX86/release/BioBaseTestApp/CallBackLogObj.o ../../_build/LinuxX86/release/BioBaseTestApp/CallBackModel.o ../../_build/LinuxX86/release/BioBaseTestApp/CallBackTreeItem.o ../../_build/LinuxX86/release/BioBaseTestApp/ControlData.o ../../_build/LinuxX86/release/BioBaseTestApp/DevicePropertiesDomModel.o ../../_build/LinuxX86/release/BioBaseTestApp/DevicesInfoDomModel.o ../../_build/LinuxX86/release/BioBaseTestApp/DynLoadDll_BioBase.o ../../_build/LinuxX86/release/BioBaseTestApp/RegisteredCallBackModel.o ../../_build/LinuxX86/release/BioBaseTestApp/main.o ../../_build/LinuxX86/release/BioBaseTestApp/stdafx.o -L/home/aland/src/LSE7/_Globals/Properties/../../ThirdParty/boost_1_57_0/linux/i386/lib -L../../_bin/LinuxX86 -ldynamicloader -lthreadpool -lCMTfinger -lX11 -L../../ThirdParty/boost_1_57_0/linux/i386/lib ../../ThirdParty/boost_1_57_0/linux/i386/lib/libboost_thread.a ../../ThirdParty/boost_1_57_0/linux/i386/lib/libboost_regex.a ../../ThirdParty/boost_1_57_0/linux/i386/lib/libboost_system.a -L/opt/cm-build/lib /opt/cm-build/lib/libQt5Widgets.a -lQt5Gui /opt/cm-build/lib/libQt5Gui.a -lpng -lqtharfbuzzng -lGL /opt/cm-build/lib/libQt5Xml.a -lQt5Core /opt/cm-build/lib/libQt5Core.a -lz -licui18n -licuuc -licudata -lqtpcre -lm -ldl -pthread -lgthread-2.0 -lrt -lglib-2.0 -lpthread
      ../../_build/LinuxX86/release/BioBaseTestApp/logbrowser.o: In function LogBrowser::LogBrowser(QWidget*)': logbrowser.cpp:(.text+0x2c): undefined reference to vtable for LogBrowser'
      logbrowser.cpp:(.text+0x49): undefined reference to LogBrowser::staticMetaObject' ../../_build/LinuxX86/release/BioBaseTestApp/logbrowser.o: In function LogBrowser::~LogBrowser()':
      logbrowser.cpp:(.text+0x1b5): undefined reference to vtable for LogBrowser' ../../_build/LinuxX86/release/BioBaseTestApp/logbrowser.o: In function LogBrowser::appendLogText(QString const&)':
      logbrowser.cpp:(.text+0x2dc): undefined reference to LogBrowser::newLogText(QString)' ../../_build/LinuxX86/release/BioBaseTestApp/BioBaseTestApp.o: In function BioBaseTestApp::OnBtnBioBSetPropertiesClicked()':
      BioBaseTestApp.cpp:(.text+0x2ef4): undefined reference to BioBaseTestApp::staticMetaObject' BioBaseTestApp.cpp:(.text+0x2f41): undefined reference to BioBaseTestApp::staticMetaObject'
      ../../_build/LinuxX86/release/BioBaseTestApp/BioBaseTestApp.o: In function BioBaseTestApp::OnBtnLEDRemove()': BioBaseTestApp.cpp:(.text+0x9834): undefined reference to BioBaseTestApp::staticMetaObject'
      ../../_build/LinuxX86/release/BioBaseTestApp/BioBaseTestApp.o: In function BioBaseTestApp::Static_ScannerUserOutput(wchar_t const*, void const*, BioBSetOutputData const*)': BioBaseTestApp.cpp:(.text+0x9c00): undefined reference to BioBaseTestApp::pixMapChanged()'
      ../../_build/LinuxX86/release/BioBaseTestApp/BioBaseTestApp.o: In function BioBaseTestApp::Static_DataAvailable(wchar_t const*, void const*, int, BioBData const*, int)': BioBaseTestApp.cpp:(.text+0xa1e2): undefined reference to BioBaseTestApp::pixMapChanged()'
      ../../_build/LinuxX86/release/BioBaseTestApp/BioBaseTestApp.o: In function BioBaseTestApp::Static_Preview(wchar_t const*, void const*, BioBData const*)': BioBaseTestApp.cpp:(.text+0xa398): undefined reference to BioBaseTestApp::pixMapChanged()'
      ../../_build/LinuxX86/release/BioBaseTestApp/BioBaseTestApp.o: In function BioBaseTestApp::~BioBaseTestApp()': BioBaseTestApp.cpp:(.text+0xb3c8): undefined reference to vtable for BioBaseTestApp'
      ../../_build/LinuxX86/release/BioBaseTestApp/BioBaseTestApp.o: In function BioBaseTestApp::OnBtnFileSelectClicked()': BioBaseTestApp.cpp:(.text+0xebcc): undefined reference to BioBaseTestApp::staticMetaObject'
      BioBaseTestApp.cpp:(.text+0xec02): undefined reference to BioBaseTestApp::staticMetaObject' ../../_build/LinuxX86/release/BioBaseTestApp/BioBaseTestApp.o: In function BioBaseTestApp::BioBaseTestApp(QWidget*, QFlagsQt::WindowType)':
      BioBaseTestApp.cpp:(.text+0x106f9): undefined reference to vtable for BioBaseTestApp' ../../_build/LinuxX86/release/BioBaseTestApp/CallBackModel.o: In function CallBackModel::CallBackModel(QObject*)':
      CallBackModel.cpp:(.text+0x14c): undefined reference to vtable for CallBackModel' ../../_build/LinuxX86/release/BioBaseTestApp/CallBackModel.o: In function CallBackModel::~CallBackModel()':
      CallBackModel.cpp:(.text+0x18c): undefined reference to vtable for CallBackModel' ../../_build/LinuxX86/release/BioBaseTestApp/DevicePropertiesDomModel.o: In function DevicePropertiesDomModel::DevicePropertiesDomModel(QDomDocument, QObject*)':
      DevicePropertiesDomModel.cpp:(.text+0x28): undefined reference to vtable for DevicePropertiesDomModel' ../../_build/LinuxX86/release/BioBaseTestApp/DevicePropertiesDomModel.o: In function DevicePropertiesDomModel::DevicePropertiesDomModel(QObject*)':
      DevicePropertiesDomModel.cpp:(.text+0x1fc): undefined reference to vtable for DevicePropertiesDomModel' ../../_build/LinuxX86/release/BioBaseTestApp/DevicePropertiesDomModel.o: In function DevicePropertiesDomModel::~DevicePropertiesDomModel()':
      DevicePropertiesDomModel.cpp:(.text+0x25c): undefined reference to vtable for DevicePropertiesDomModel' ../../_build/LinuxX86/release/BioBaseTestApp/DevicePropertiesDomModel.o: In function DevicePropertiesDomModel::headerData(int, Qt::Orientation, int) const':
      DevicePropertiesDomModel.cpp:(.text+0x884): undefined reference to DevicePropertiesDomModel::staticMetaObject' DevicePropertiesDomModel.cpp:(.text+0x90d): undefined reference to DevicePropertiesDomModel::staticMetaObject'
      ../../_build/LinuxX86/release/BioBaseTestApp/DevicesInfoDomModel.o: In function DevicesInfoDomModel::DevicesInfoDomModel(QDomDocument, QObject*)': DevicesInfoDomModel.cpp:(.text+0x28): undefined reference to vtable for DevicesInfoDomModel'
      ../../_build/LinuxX86/release/BioBaseTestApp/DevicesInfoDomModel.o: In function DevicesInfoDomModel::DevicesInfoDomModel(QObject*)': DevicesInfoDomModel.cpp:(.text+0x1fc): undefined reference to vtable for DevicesInfoDomModel'
      ../../_build/LinuxX86/release/BioBaseTestApp/DevicesInfoDomModel.o: In function DevicesInfoDomModel::~DevicesInfoDomModel()': DevicesInfoDomModel.cpp:(.text+0x25c): undefined reference to vtable for DevicesInfoDomModel'
      ../../_build/LinuxX86/release/BioBaseTestApp/DevicesInfoDomModel.o: In function DevicesInfoDomModel::headerData(int, Qt::Orientation, int) const': DevicesInfoDomModel.cpp:(.text+0x158e): undefined reference to DevicesInfoDomModel::staticMetaObject'
      DevicesInfoDomModel.cpp:(.text+0x1614): undefined reference to DevicesInfoDomModel::staticMetaObject' DevicesInfoDomModel.cpp:(.text+0x1684): undefined reference to DevicesInfoDomModel::staticMetaObject'
      DevicesInfoDomModel.cpp:(.text+0x16fc): undefined reference to DevicesInfoDomModel::staticMetaObject' ../../_build/LinuxX86/release/BioBaseTestApp/RegisteredCallBackModel.o: In function RegisteredCallBackModel::~RegisteredCallBackModel()':
      RegisteredCallBackModel.cpp:(.text+0x23): undefined reference to vtable for RegisteredCallBackModel' ../../_build/LinuxX86/release/BioBaseTestApp/RegisteredCallBackModel.o: In function RegisteredCallBackModel::setCallBackHighlighted(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&, bool)':
      RegisteredCallBackModel.cpp:(.text+0x139d): undefined reference to RegisteredCallBackModel::updateList()' ../../_build/LinuxX86/release/BioBaseTestApp/RegisteredCallBackModel.o: In function RegisteredCallBackModel::RegisteredCallBackModel(QObject*)':
      RegisteredCallBackModel.cpp:(.text+0x15fc): undefined reference to vtable for RegisteredCallBackModel' collect2: ld returned 1 exit status make[2]: *** [../../_bin/LinuxX86/biobasetestapp] Error 1 make[2]: Leaving directory /home/aland/src/LSE7/Applications/BioBaseTestApp'
      make[1]: *** [release] Error 2
      make[1]: Leaving directory `/home/aland/src/LSE7/Applications/BioBaseTestApp'
      make: *** [sub----------Applications-BioBaseTestApp-BioBaseTestApp-pro-make_first] Error 2
      [aland@oak-32 LSCAN_Essentials]$

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #15

        Did you build the tools ?

        Not prefix but infix, take a look at the -qtlibinfix option of configure

        Don't forget that if you re-configure Qt you need to rebuild from scratch

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        A 1 Reply Last reply
        0
        • SGaistS SGaist

          Did you build the tools ?

          Not prefix but infix, take a look at the -qtlibinfix option of configure

          Don't forget that if you re-configure Qt you need to rebuild from scratch

          A Offline
          A Offline
          Alan DuBoff
          wrote on last edited by Alan DuBoff
          #16

          @SGaist Yes, I built the tools and am using qmake from the bin dir. I have modified the environment with QMAKESPEC and pathing in the bin dir to allow it to run successfully.

          Does that last link look like it's missing some of the meta object information to you?

          I wasn't sure what takes place during the make process, I have seen both uic and moc running but wasn't sure of the order and/or if other stuff runs. Clearly uic is not running as I had to run it myself to produce the ui_header.h file(s).

          I've seen a lot of bugs where uic doesn't run when people replace Qt with their own.

          In the past I've never had that problem on Linux as I just put my shared libs in /usr and the libraries ended up in /usr/lib, but I'm not sure that would be good for an app that ships. We're using Ubuntu 12.04, which doesn't have any Qt5 packages, but if someone added them to their system we stand the chance to overwrite their libraries with ours if we install to /usr.

          I have also read that there are some exports, so renaming the libs is not a long term solution.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #17

            I don't know what is happening to you, exporting the QMAKESPEC is not something that should be needed at all. Another silly question: did you run make install ?

            When deploying such an app you should not put anything in /usr/lib. You should rather have your package in an known folder that will also contain Qt and a link in e.g. /usr/bin or rather /usr/local/bin, add @origin to the rpath when building so your application will search for Qt in the same folder as it is.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            A 1 Reply Last reply
            0
            • SGaistS SGaist

              I don't know what is happening to you, exporting the QMAKESPEC is not something that should be needed at all. Another silly question: did you run make install ?

              When deploying such an app you should not put anything in /usr/lib. You should rather have your package in an known folder that will also contain Qt and a link in e.g. /usr/bin or rather /usr/local/bin, add @origin to the rpath when building so your application will search for Qt in the same folder as it is.

              A Offline
              A Offline
              Alan DuBoff
              wrote on last edited by SGaist
              #18

              @SGaist I just wanted to make the QMAKESPEC specific. I have since moved back to a shared build, as I had problems linking statically with some of the Boost libraries, and the Boost libraries had a couple problems compiled as static. The solution was to set the rpath into the binaries and shared libs to point to my directory I put in /opt.

              I have things all worked out now. I'm sure I have clean builds that go into /opt, and I have both architectures packaged up in Debian packages. I include both architectures in each respective .deb package.

              I've set the rpath in all my binaries and shared libs to point to my /opt/xxxx/i386/lib or /opt/xxxx/x86_64/lib for the respective architecture.

              I haven't tested yet, but my main shared library is in /usr/lib, and that is what developers will link to. That shared library has the rpath set to /opt/xxxx/<arch>/lib, so I think the developed applications should resolve without having to add the rpath to the build. That will be easier for developers. This means that developers will not need to change their environment at all and can just include my main lib I placed in /usr/lib with -l in their LIBS statement.

              I was able to get all my packages built and installed to /opt/xxxx which is my entire Qt 5.5.1 build along with a couple other dependencies. I was going to use /usr/local, but typically that's for locally built packages, and /opt is a better location for this stuff, IMO. This means that no LD_LIBRARY_PATH b#!!$HITery is needed, nor any ld.so.conf @$$#atery...

              I'm distributing for Ubuntu 12.04.5, which doesn't have Qt5 available by default, although Ubuntu has a ppa to add for Qt5 packages, they don't have all of them and don't have Qt5X11Extras which I needed. I didn't want to run the risk of putting this stuff in /usr to have a conflict with other Qt5 libs that might be compiled differently. Now mine are solely in /opt and should not conflict with anything else.

              All of the .deb packages install and everything seems to run fine. :-)

              Thanks for your help...sorry for the slow response, I've been burning the candle at both ends getting our new release compiled and packaged properly, and had to setup build servers for 32-bit and 64-bit as well. Everything is automated and builds cleanly.

              NOTE: I will add this tidbit of information that took me quite a while to figure out in the qmake projects, how to differentiate between architecture to be able to include different compile and/or link options. The way it is documented doesn't work correctly. This is what I use. I only need to worry about 32-bit and 64-bit for Intel architecture.

              Platform = $$QMAKE_HOST.arch
              contains(Platform, i686 ) {
              # 32-bit
              }else{
              # 64-bit
              }
              

              [edit: Added missing coding tags ``` SGaist]

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #19

                No problem, the essential point is that you could go further correctly :)

                That's strange, what value are you getting for 64 bit ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                A 1 Reply Last reply
                0
                • SGaistS SGaist

                  No problem, the essential point is that you could go further correctly :)

                  That's strange, what value are you getting for 64 bit ?

                  A Offline
                  A Offline
                  Alan DuBoff
                  wrote on last edited by
                  #20

                  @SGaist I get x86_64 on 64-bit. I thought it odd that 32-bit give i686 rather than i386. On ubuntu the architecture is i386 for 32-bit and amd64 for 64-bit packages.

                  BTW, I notice something odd, in that it seems to require my .qt-license to use the tools. Is it required that I need to distribute my license with my build of Qt5 do you know?

                  I compiled the Enterprise edition, and compiled a commercial (not an opensource) version.

                  Seems odd that they would need a license for the distribution.

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #21

                    That's a naming convention like arm/armel both run on arm but have a different ABI.

                    i686 is the P6 generation of Intel's 32bit architecture

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      Alan DuBoff
                      wrote on last edited by
                      #22

                      Yeah, but in the docs that is not how they tell you to check for architecture. I can't remember off the top of my head, but the way they show doesn't work for me. What i have above works, at least on Ubuntu 12.04.

                      I switched back to an opensource compile rather than commercial as I am not sure I can redistribute the commercial build for developers to use on my current Silver license. I'm waiting for QT to get back to me so I can better understand that.

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #23

                        The doc shows an example that makes use of QMAKE_HOST.arch with the win32-g++ scope. Just remove that scope and it should work.

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        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