Qt5.5 static build cannot find -IGL on ubuntu14

I compiled qt 5.5 for static build and it works great.

However, when I add “QT + = widgets” widgets to my profile, I get a “can't find -IGL” link error

From what I read, you need to do with Open GL libs. I tried the following:

sudo apt-get install libglu1-mesa-dev

and

sudo apt-get install libgl1-mesa-dev

But no luck here ... I wonder if I need a static version of this? or maybe a symbolic link is missing, but I can not understand the next step: (

Edit This is the actual error message:

g ++ -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 / 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 / xcbglinteregrations -lqxcb-glx-integration -lxcb-glx -lQt5XcbQpa -lX11-xcb -lXi -lxcb-render-util -lxcb-render -lxcb -lxcb-image -lxcb-icccm -lxcb-sync -lxcb-xfixes -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 -licullthlltlltlplltlpltlltlpltld 2.0 -lglib-2.0 -lrt -lGL -lpthread / usr / lib / gcc / i 686-linux-gnu / 4.8 /../../../ i386-linux-gnu / libX11.a (CrGlCur.o) : In functionopen_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/local/Qt-5.5.1/plugins/imageformats/libqjp2.a(jas_stream.o): In functionjas_stream_tmpfile ': jas_stream.c :(. text + 0x7a4): warning: using tmpnam' is dangerous, better usemkstemp' / usr / local / Qt -5.5.1 / lib / libQt5Core.a (qfilesystemengine_unix.o): In the 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/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/libglib-2.0.a(libglib_2_0_la-gutils.o): In functiong_get_user_database_entry ': (.text + 0x25a): warning: using "getpwuid" in statically linked applications requires at run time the shared libraries from the glibc version used to link / usr / lib / gcc / i 686-linux-gnu / 4.8 /../../ .. /i386-linux-gnu/libglib-2.0.a(libglib_2_0_la-gutils.o): In functiong_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 functionQFileSystemEngine :: resolveUserName (unsigned int) ': qfilesystemengine_unix.cpp :(. Text + 0x592): warning: using "getpwuid_r" in statically linked applications requires the shared libraries from the glibc version used to bind / usr / local / Qt to run at run time -5.5.1 / lib / libQt5Network.a (qhostinfo_unix.o): In the function `QHostInfoAgent :: fromName (QString const &) ': qhostinfo_unix.cpp :(. Text + 0x580): warning: using" getaddrinfo "in statically linked applications requires at run time the shared libraries from the version of glibc used to bind collect2: error: ld returned 1 exit status make: *** [../targetRel/McpSupervisor] ibka 9:49:17 1: The process of "/ usr / bin / make" came with code 2. Error creating / deploying Project qtMain (Kit: Qt 5.5.1 GCC 32bit Static) When performing the "Do" step 09:49:17: Elapsed time: 00:08.

+4
2

:

. , , sudo apt-get install libglu1-mesa-dev


sudo apt-get install libgl1-mesa-dev

, i386, x32.
x64-,

:

   sudo apt-get install libgl1-mesa-dev:i386  

   sudo apt-get install libglu1-mesa-dev:i386 

;)


, , , , x32-, x64-. - x64. , .

@code_fodder , , 50 .

.: (

Mesa GL?

,

sudo apt-get install mesa-utils

OpenGl ES, Mesa-utilies (opengles, egl),

sudo apt-get install mesa-utils-extra

, .

17-DEC-2015

project.pro . , OpenGL.

GLEW OpenGL SDL2

TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt

SOURCES += main.cpp \
           mesh.cpp \
           display.cpp \
           shader.cpp

HEADERS += \
         mesh.h \
         display.h\
         shader.h


unix|win32: LIBS += -lGL \
                    -lGLEW \
                     /usr/local/lib/libSDL2-2.0.so

, , .

:   unix | win32: LIBS += -L/usr/lib/x86_64-linux-gnu/mesa/ .pro . 32- . mesa. .

 zehel@zehel-PC:/usr/lib/x86_64-linux-gnu/mesa$ ls
 ld.so.conf  libGL.so  libGL.so.1  libGL.so.1.2.0

,

, , OpenGL.

sudo apt-get install mesa-utils glxinfo . .

glxinfo | grep "OpenGl version string" , OpenGl mesa OpenGL version string: 3.0 Mesa 10.3.2

3.0, OpenGL .

3.0 , , , .

, ,

. QT, , ,

http://forum.qt.io/topic/36282/solved-qt-5-2-0-and-lgl-issue

qt , , .

, .

, .

+3

, GL, exmaple -L GCC, :

-L -l.

0

Source: https://habr.com/ru/post/1618306/


All Articles