Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-92978

CMake linker error with Linux Static Libraries

    XMLWordPrintable

Details

    • Linux/Wayland, Linux/X11

    Description

      Hi!

       

      I’ve built static libraries of Qt6(6.0.3) from Source on Ubuntu 20.04 with the following command:

       

      ../qt5/configure -release -static  -prefix ../staticlibs -nomake examples -nomake tests -nomake tools -platform linux-clang

       ** 

      During build of a sample project using the generated libs, I get the following error:

       

      “/usr/bin/ld: /home/twadmin/qt6/staticlibs/lib/libQt6OpenGL.a(qopenglshaderprogram.cpp.o): in function `QOpenGLShaderProgramPrivate::linkBinary()':

      qopenglshaderprogram.cpp.text._ZN27QOpenGLShaderProgramPrivate10linkBinaryEv+0x2c): undefined reference to `QOpenGLProgramBinaryCache::ProgramDesc::cacheKey() const'

      /usr/bin/ld: qopenglshaderprogram.cpp.text._ZN27QOpenGLShaderProgramPrivate10linkBinaryEv+0x31): undefined reference to `lcOpenGLProgramDiskCache()'

      /usr/bin/ld: qopenglshaderprogram.cpp.text._ZN27QOpenGLShaderProgramPrivate10linkBinaryEv+0x44): undefined reference to `lcOpenGLProgramDiskCache()'

      /usr/bin/ld: qopenglshaderprogram.cpp.text._ZN27QOpenGLShaderProgramPrivate10linkBinaryEv+0x50): undefined reference to `lcOpenGLProgramDiskCache()'

      /usr/bin/ld: qopenglshaderprogram.cpp.text._ZN27QOpenGLShaderProgramPrivate10linkBinaryEv+0xd8): undefined reference to `QOpenGLProgramBinaryCache::load(QByteArray const&, unsigned int)'

      /usr/bin/ld: qopenglshaderprogram.cpp.text._ZN27QOpenGLShaderProgramPrivate10linkBinaryEv+0xdf): undefined reference to `lcOpenGLProgramDiskCache()'

      /usr/bin/ld: qopenglshaderprogram.cpp.text._ZN27QOpenGLShaderProgramPrivate10linkBinaryEv+0xf5): undefined reference to `lcOpenGLProgramDiskCache()'

      /usr/bin/ld: qopenglshaderprogram.cpp.text._ZN27QOpenGLShaderProgramPrivate10linkBinaryEv+0x131): undefined reference to `lcOpenGLProgramDiskCache()'

      /usr/bin/ld: qopenglshaderprogram.cpp.text._ZN27QOpenGLShaderProgramPrivate10linkBinaryEv+0x1d8): undefined reference to `QOpenGLProgramBinaryCache::save(QByteArray const&, unsigned int)'

      /usr/bin/ld: qopenglshaderprogram.cpp.text._ZN27QOpenGLShaderProgramPrivate10linkBinaryEv+0x22c): undefined reference to `QOpenGLProgramBinaryCache::QOpenGLProgramBinaryCache()'

      /usr/bin/ld: /home/twadmin/qt6/staticlibs/lib/libQt6OpenGL.a(qopenglshaderprogram.cpp.o): in function `QOpenGLProgramBinarySupportCheck* QOpenGLMultiGroupSharedResource::value<QOpenGLProgramBinarySupportCheck>(QOpenGLContext*)':

      qopenglshaderprogram.cpp.text._ZN31QOpenGLMultiGroupSharedResource5valueI32QOpenGLProgramBinarySupportCheckEEPT_P14QOpenGLContext[_ZN31QOpenGLMultiGroupSharedResource5valueI32QOpenGLProgramBinarySupportCheckEEPT_P14QOpenGLContext]+0x14f): undefined reference to `QOpenGLProgramBinarySupportCheck::QOpenGLProgramBinarySupportCheck(QOpenGLContext*)'

      clang: error: linker command failed with exit code 1 (use -v to see invocation)

      make[2]: *** [CMakeFiles/Testproj.dir/build.make:407: Testproj] Error 1

      make[1]: *** [CMakeFiles/Makefile2:77: CMakeFiles/Testproj.dir/all] Error 2

      make: *** [Makefile:84: all] Error 2”

       

      Attaching a sample project for reference.

      Attachments

        1. Testproj.7z
          4 kB
        2. verbose.txt
          2 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              qtbuildsystem Qt Build System Team
              sidmn SIDHARTH NAIR
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes