Ubuntu 22.04.1 LTS SDL2 wl_proxy_marshal_flags error - c++

I'm a beginner at using Linux, so I'm following a couple of forum threads I've read so far.
I'm trying to compile a C++ program using g++ version 11.3.1, where I have installed SDL2 using the command sudo apt-get install libsdl2-dev and am using the recommended proprietary driver nvidia-driver-525 for my nvidia gtx 1060 graphics card. When I echo $XDG_SESSION_TYPE, it says x11.
However, when I compile the program using the link arguments -lSDL2, it gives me the following compile error:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libSDL2.so: undefined reference to `wl_proxy_marshal_flags'
collect2: error: ld returned 1 exit status
When I compile the program with the link arguments: -lSDL2 -lwayland-egl -lwayland-client -lwayland-cursor, it compiles successfully. But then when I try to run the program, it gives me this error:
./bin/main.exe: symbol lookup error: /usr/lib/x86_64-linux-gnu/libdecor-0.so.0: undefined symbol: wl_proxy_marshal_flags

Related

installation & compilation boost on Manjaro

I installed boost using pacman -S boost boost-libs.
When I try to compile a program that uses boost::thread, and I got the following error:
/usr/bin/ld: /tmp/cc3AkelG.o: warning: relocation against `_ZTVN5boost6detail16thread_data_baseE' in read-only section `.text._ZN5boost6detail16thread_data_baseC2Ev[_ZN5boost6detail16thread_data_baseC5Ev]'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
collect2: error: ld returned 1 exit status
Why does this happen and how can I fix it?
I find the answer in an other question.
I had to compile using -pthread -lboost_thread.
thanks for your answer.

Problem on installing ZKTECO linux SDK: cannot run build.sh

I tried to install ZKTECO Linux SDK on my ubuntu 20.04
It shows an error when running build.sh
/usr/bin/ld: warning: ../lib/x86/linux-64/libzksensorcore.so, needed by ./lib64/libzkfv.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: /usr/local/lib/libidkit.so.2: undefined reference to `MD5#OPENSSL_0.9.8'
collect2: error: ld returned 1 exit status
I exported the .so files to the classpath and ld_library but nothing changed
I am open to any suggestion

libGL does exists, but linker can't find it - Qt 4.8.7, CentOS 7.5

I have CentOS Linux release 7.5.1804 with Qt 4.8.7 installed from base repo. I installed NVidia driver version 390.59 release date 2018.5.16.
I have libGL-mesa and libGL-mesa-devel INSTALLED also.
My graphics card Quadro K4000M is doing just fine - for example, glxgears 60fps, Qt Demos (OpenGL) work.
But when I am trying to compile the chip example, I am getting the following error:
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../libGL.so when searching for -lGL
/usr/bin/ld: skipping incompatible //lib/libGL.so when searching for -lGL
/usr/bin/ld: skipping incompatible //usr/lib/libGL.so when searching for -lGL
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
make: *** [chip] Error 1
Here is the ls command output:
[user#centos-7 ~]$ ls -h /usr/lib64/ | grep "libGL"
libGLdispatch.so.0
libGLESv1_CM_nvidia.so.1
libGLESv1_CM_nvidia.so.390.59
libGLESv1_CM.so
libGLESv1_CM.so.1
libGLESv1_CM.so.1.2.0
libGLESv2_nvidia.so.2
libGLESv2_nvidia.so.390.59
libGLESv2.so
libGLESv2.so.2
libGLESv2.so.2.1.0
libGL.la
libGL.so
libGL.so.1
libGL.so.1.7.0
libGLU.so
libGLU.so.1
libGLU.so.1.3.1
libGLX_indirect.so.0
libGLX_nvidia.so.0
libGLX_nvidia.so.390.59
libGLX.so
libGLX.so.0
How to solve the problem?
The problem is solved - I install NVIDIA the latest driver (version: 390.67 release Date: 2018.6.5) in this way: http://www.advancedclustering.com/act_kb/installing-nvidia-drivers-rhel-centos-7/.

Qt on Centos 7 with OpenGl not working

I have installed Qt on a CentOS 7 machine following the recommendation of QT documentation:
sudo yum groupinstall "C Development Tools and Libraries"
sudo yum install mesa-libGL-devel
a real nightmare as "C Development Tools and Libraries" does not exist. I have found and installed "Development Tools": manually as the groupinstall does not work!
I managed to run Qt creator but whenever I try to build and run any C++ application I got a cascade of errors:
:-1: error: skipping incompatible
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../libGL.so when
searching for -lGL
:-1: error: skipping incompatible /lib/libGL.so when searching for
-lGL
:-1: error: skipping incompatible /usr/lib/libGL.so when searching for
-lGL
:-1: error: cannot find -lGL
:-1: error: collect2: error: ld returned 1 exit status
I need to run the OpenGl library as my application requires the use of the Three libraries. Did anybody successfully installed Qt and OpenGL on a CentOS 7 operating system?
Install the devtoolsets-6 package and make sure you start qtcreator from a shell where you have enabeled devtoolsets 6. Then you'll have a modern dev environment. Also make sure you have installed the NVidia drivers (or AMD equivalents) for proper OpenGL support.

Missing libAnalyzer

I am trying to build the analyzer using the Saleae SDK 1.1.19 but run into an error when running the python script. Not sure if it is because I am running a 64bit version of Ubuntu. I also could not find the ./lib/libAnalyzer.so
link to the analyzer that I am using
https://www.saleae.com/index
Error:
/usr/bin/ld: skipping incompatible ../lib/libAnalyzer.so when searching for -lAnalyzer
/usr/bin/ld: cannot find -lAnalyzer
collect2: ld returned 1 exit status
g++ L"../lib" -lAnalyzer -shared -o"debug/libNSLogicAnalyzer.so" debug/NSLogicAnalyzer.o debug/NSLogicAnalyzerSettings.o debug/NSLogicAnalyzerResults.o
System information:
Ubuntu 12.04LTS 64bit,
Python 2.7.3
thanks!
LC
Ah figured it out, it was calling the 32bit libAnalyzer.so in the lib folder. I just renamed the 64 bit to the same name as the 32bit (renamed the 32bit to something else so it would not create the error again)