Eclipse Yocto project

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Eclipse Yocto project

1,025 Views
leesommerville
Contributor I

Hi All,

I am trying to build a simple gstreamer app to run on a Toradex Apalis SOM.

I have built the standard Toradex 2.7 version of their 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 libraries from the Yocto file system image that gstreamer is dependent on. 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++ -lgstreamer-1.0 -lgobject-2.0 -lglib-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?

Can anyone suggest any documentation on how to set up a Yocto project in Eclipse that links an external library?

I have included below the resulting build console output from my projects build.

Thanks for your time.

Cheers,

Lee

10:43:33 **** Build of configuration Debug (GNU) for project GStreamerCpp ****
make all
make  all-recursive
make[1]: Entering directory '/home/lee/eclipse-workspace/GStreamerCpp'
Making all in src
make[2]: Entering directory '/home/lee/eclipse-workspace/GStreamerCpp/src'
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 -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 -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
make[2]: *** [HelloWorld] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
make[2]: Leaving directory '/home/lee/eclipse-workspace/GStreamerCpp/src'
Makefile:403: recipe for target 'all-recursive' failed
make[1]: Leaving directory '/home/lee/eclipse-workspace/GStreamerCpp'
Makefile:335: recipe for target 'all' failed

Labels (3)
0 Kudos
1 Reply

751 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Leesommerville,

I see that you got some replies on the Toradex community regarding this problem:

https://www.toradex.com/community/questions/24982/eclipse-yocto-project.html

Are you still experiencing this issue? The problem seems similar to the following thread:
https://community.nxp.com/message/1007014

It is possible that Eclipse does not have the correct PATHs for the libraries so if the libraries are placed correctly you would need to review that the Eclipse path points to the correct location.

Regards,

0 Kudos