Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22134

Cross compilation GLIBCXX version link error

$
0
0

I'm configuring a project for a raspberry and i'm facing a linking error that i don't understand.

Context:

Actually, i cross-compiled Qt and everything worked fines.Now, i'm trying to get opencv working as well to make image-processing in my Qt application.Instead of cross compiling opencv, I installed it with apt install and synchronized my target sysroot in ~/raspi/sysroot.To get raspi camera control, I'm using mmal libraries (located on rpi in /opt/vc/lib).I cross compiled Qt with gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf so qmake is using it as well.Raspi is running Raspian buster Lite which use a quite old glibc (the reason of using gcc-linaro-7.4.1, recommended in Qt mkspec documentation)

Problem:

When I try to compile a simple main.cpp, linker fail when linking opencv libraries:

~/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libopenmpt.so.0: undefined reference to `std::random_device::_M_getentropy() const@GLIBCXX_3.4.25'

On my raspy, glibc version is

$ strings /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 | grep GLIBCXXGLIBCXX_3.4GLIBCXX_3.4.1GLIBCXX_3.4.2GLIBCXX_3.4.3GLIBCXX_3.4.4GLIBCXX_3.4.5GLIBCXX_3.4.6GLIBCXX_3.4.7GLIBCXX_3.4.8GLIBCXX_3.4.9GLIBCXX_3.4.10GLIBCXX_3.4.11GLIBCXX_3.4.12GLIBCXX_3.4.13GLIBCXX_3.4.14GLIBCXX_3.4.15GLIBCXX_3.4.16GLIBCXX_3.4.17GLIBCXX_3.4.18GLIBCXX_3.4.19GLIBCXX_3.4.20GLIBCXX_3.4.21GLIBCXX_3.4.22GLIBCXX_3.4.23GLIBCXX_3.4.24GLIBCXX_3.4.25GLIBCXX_DEBUG_MESSAGE_LENGTH

Question:

I don't understand How opengl can't make reference to a symbol that it is installed on my raspi for my rapsi?I tryed to compile this code on the raspi and everything link correctly.What am i missing?

Annex:the comand failing

~/Documents/personal/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=~/raspi/sysroot -Wl,-O1 -Wl,-rpath,/usr/local/qt5pi/lib -Wl,-rpath-link,~/raspi/qt5pi/lib -Wl,-rpath-link,~/raspi/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,~/raspi/sysroot/lib/arm-linux-gnueabihf -o photomata main.o   -L~/raspi/sysroot/opt/vc/lib/ -lopencv_core -lopencv_videoio -lopencv_highgui -lraspicam -lmmal -lmmal_core -lmmal_util -lmmal_vc_client -lmmal_components -lvchiq_arm -lvcsm -lcontainers -lvcos -lbcm_host ~/raspi/qt5pi/lib/libQt5MultimediaWidgets.so ~/raspi/qt5pi/lib/libQt5Widgets.so ~/raspi/qt5pi/lib/libQt5Multimedia.so ~/raspi/qt5pi/lib/libQt5Gui.so ~/raspi/qt5pi/lib/libQt5Network.so ~/raspi/qt5pi/lib/libQt5Core.so -L~/raspi/sysroot/usr/lib/arm-linux-gnueabihf -lGLESv2 -lpthread 

..................

Thank you for taking the time to read and perhaps help me.

Problem continue at Missing crt1.o/crti.o for cross compilation


Viewing all articles
Browse latest Browse all 22134

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>