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. Qt5.5 static build dlopen and -lGL compile issue when I add widgets
Forum Updated to NodeBB v4.3 + New Features

Qt5.5 static build dlopen and -lGL compile issue when I add widgets

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
1 Posts 1 Posters 1.2k 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.
  • C Offline
    C Offline
    code_fodder
    wrote on 17 Dec 2015, 10:35 last edited by
    #1

    I have a statically bulding qt project that works fine. When I add QT += widgets to the pro file then I start to get the error:

    g++ -ldl -lc -static -static-libgcc -static-libstdc++ -Wl,-O1 -o ../targetRel/McpSupervisor main.o cconfig.o cconfigxml.o mcpprocessbase.o rpeprocess.o supervisor.o cipcomms.o mcpsupervisor_plugin_import.o moc_mcpprocessbase.o moc_supervisor.o moc_cipcomms.o   -L/usr/lib/i386-linux-gnu/mesa -L/usr/lib/i386-linux-gnu -lc -L/usr/local/Qt-5.5.1/lib -lQt5Xml -lQt5Widgets -L/usr/local/Qt-5.5.1/plugins/bearer -lqconnmanbearer -lqgenericbearer -lqnmbearer -lQt5Network -L/usr/local/Qt-5.5.1/plugins/platforms -lqxcb -L/usr/local/Qt-5.5.1/plugins/xcbglintegrations -lqxcb-glx-integration -lxcb-glx -lQt5XcbQpa -lX11-xcb -lXi -lxcb-render-util -lxcb-render -lxcb -lxcb-image -lxcb-icccm -lxcb-sync -lxcb-xfixes -lxcb-shm -lxcb-randr -lxcb-shape -lxcb-keysyms -lxcb-xkb -lQt5PlatformSupport -lfontconfig -lfreetype -lQt5DBus -lXrender -lXext -lX11 -L/usr/local/Qt-5.5.1/plugins/imageformats -lqdds -lqicns -lqico -lqjp2 -lqmng -lqtga -lqtiff -lqwbmp -lqwebp -lQt5Gui -lpng -lqtharfbuzzng -lQt5Core -lz -licui18n -licuuc -licudata -lqtpcre -lm -ldl -pthread -lgthread-2.0 -lglib-2.0 -lrt -lGL -lpthread 
    /usr/lib/i386-linux-gnu/libX11.a(CrGlCur.o): In function `open_library':
    (.text+0x33): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
    /usr/bin/ld: cannot find -lGL
    /usr/lib/i386-linux-gnu/libpthread.a(lowlevellock.o): In function `__lll_lock_wait_private':
    /build/buildd/eglibc-2.19/nptl/../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/lowlevellock.S:77: multiple definition of `__lll_lock_wait_private'
    /usr/lib/i386-linux-gnu/libc.a(libc-lowlevellock.o):(.text+0x0): first defined here
    /usr/lib/i386-linux-gnu/libpthread.a(lowlevellock.o): In function `__lll_unlock_wake_private':
    /build/buildd/eglibc-2.19/nptl/../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/lowlevellock.S:334: multiple definition of `__lll_unlock_wake_private'
    /usr/lib/i386-linux-gnu/libc.a(libc-lowlevellock.o):(.text+0x30): first defined here
    /usr/local/Qt-5.5.1/plugins/imageformats/libqjp2.a(jas_stream.o): In function `jas_stream_tmpfile':
    jas_stream.c:(.text+0x7a4): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
    /usr/local/Qt-5.5.1/lib/libQt5Core.a(qfilesystemengine_unix.o): In function `QFileSystemEngine::resolveGroupName(unsigned int)':
    qfilesystemengine_unix.cpp:(.text+0x943): warning: Using 'getgrgid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
    /usr/lib/i386-linux-gnu/libglib-2.0.a(libglib_2_0_la-gutils.o): In function `g_get_user_database_entry':
    (.text+0x25a): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
    /usr/lib/i386-linux-gnu/libglib-2.0.a(libglib_2_0_la-gutils.o): In function `g_get_user_database_entry':
    (.text+0xa3): warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
    /usr/local/Qt-5.5.1/lib/libQt5Core.a(qfilesystemengine_unix.o): In function `QFileSystemEngine::resolveUserName(unsigned int)':
    qfilesystemengine_unix.cpp:(.text+0x592): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
    /usr/local/Qt-5.5.1/lib/libQt5Network.a(qhostinfo_unix.o): In function `QHostInfoAgent::fromName(QString const&)':
    qhostinfo_unix.cpp:(.text+0x580): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
    collect2: error: ld returned 1 exit status
    make: *** [../targetRel/McpSupervisor] Error 1
    10:17:46: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project qtMain (kit: Qt 5.5.1 GCC 32bit Static)
    When executing step "Make"
    10:17:46: Elapsed time: 00:09.
    

    I have tried many things to fix this including:

    • Everything in here
    • Adding the following to my pro file:
      unix | win32: LIBS += -L/usr/lib/i386-linux-gnu/mesa
      unix | win32: LIBS += -L/usr/lib/i386-linux-gnu
      unix | win32: LIBS += -lc
      unix | win32: LIBS += -ldl
      QMAKE_LFLAGS += -ldl -lc
      

    I am not sure which of the two errors is more meaningful, the "can't find -lGL" or the "using 'dlopen' in statically linked..."

    any ideas?

    1 Reply Last reply
    0

    1/1

    17 Dec 2015, 10:35

    • Login

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