Hi All,
I have built the Toradex 2.7 version of the Yocto project (image and SDK). I am running the image from this build with no issues. I have setup Eclipse using the Yocto plugin to compile the basic Eclipse Hello World project, the resulting binary I can run on the Apalis board no problems.
However, I am running into issues when trying to link some 3rd party libraries from the Yocto file system image. I have changed the code from the Hello World project to include basic gstreamer code which I have running on my PC.
It appears I have successfully linked some of the libraries, although I do get a warning that “libstdc++.la” and “libgstreamer-1.0.la” have been moved!?:
libtool: warning: library '/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib/libstdc++.la' was moved.
libtool: warning: library '/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib/libgstreamer-1.0.la' was moved.
However when the linker tries to link in the “libgobject-2.0.la” library, I get an error:
libtool: error: cannot find the library '/usr/lib/libgobject-2.0.la' or unhandled argument '=/usr/lib/libgobject-2.0.la'
Even though the “libgobject-2.0.la” library is included in the same manner as the “libstdc++.la” and “libgstreamer-1.0.la” libraries:
-lstdc++ -lVDK -lm -lGLESv2 -lGAL -lEGL -ldl -lgstreamer-1.0 -lgobject-2.0
The linker appears to be looking in a different location for the library (“/usr/lib/” vs. “/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib/”).
I have looked into the Yocto file system and I do see the “libgobject-2.0.la” file along with the “libstdc++.la” and “libgstreamer-1.0.la” files in the directory “/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib/”.
Does anyone have any idea on what I am doing wrong?
I have included below some of the build console output.
Thanks for your time.
Cheers,
Lee
arm-angstrom-linux-gnueabi-g++ -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard --sysroot=/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi -DHAVE_CONFIG_H -I. -I.. --sysroot=/home/lee/oe-core/build/tmp-glibc/sysroots/apalis-imx6 -I/home/lee/oe-core/build/tmp-glibc/sysroots/apalis-imx6/usr/include/gstreamer-1.0 -I/home/lee/oe-core/build/tmp-glibc/sysroots/apalis-imx6/usr/lib/gstreamer-1.0/include -I/home/lee/oe-core/build/tmp-glibc/sysroots/apalis-imx6/usr/include/glib-2.0 -I/home/lee/oe-core/build/tmp-glibc/sysroots/apalis-imx6/usr/include/libxml2 -I/home/lee/oe-core/build/tmp-glibc/sysroots/apalis-imx6/usr/lib/glib-2.0/include -g -O0 --sysroot=/home/lee/oe-core/build/tmp-glibc/sysroots/apalis-imx6 -MT HelloWorld.o -MD -MP -MF .deps/HelloWorld.Tpo -c -o HelloWorld.o HelloWorld.cpp
mv -f .deps/HelloWorld.Tpo .deps/HelloWorld.Po
/bin/bash ../libtool --tag=CXX --mode=link arm-angstrom-linux-gnueabi-g++ -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard --sysroot=/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi -I/home/lee/oe-core/build/tmp-glibc/sysroots/apalis-imx6/usr/include/gstreamer-1.0 -I/home/lee/oe-core/build/tmp-glibc/sysroots/apalis-imx6/usr/lib/gstreamer-1.0/include -I/home/lee/oe-core/build/tmp-glibc/sysroots/apalis-imx6/usr/include/glib-2.0 -I/home/lee/oe-core/build/tmp-glibc/sysroots/apalis-imx6/usr/include/libxml2 -I/home/lee/oe-core/build/tmp-glibc/sysroots/apalis-imx6/usr/lib/glib-2.0/include -g -O0 --sysroot=/home/lee/oe-core/build/tmp-glibc/sysroots/apalis-imx6 -lstdc++ -lVDK -lm -lGLESv2 -lGAL -lEGL -ldl -lgstreamer-1.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lxml2 -lglib-2.0 --sysroot=/home/lee/oe-core/build/tmp-glibc/sysroots/apalis-imx6 -o HelloWorld HelloWorld.o
libtool: warning: library '/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib/libstdc++.la' was moved.
libtool: warning: library '/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib/libgstreamer-1.0.la' was moved.
libtool: error: cannot find the library '/usr/lib/libgobject-2.0.la' or unhandled argument '=/usr/lib/libgobject-2.0.la'
Makefile:386: recipe for target 'HelloWorld' failed