Eclipse Yocto project

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

If any one could recommend any documentation on setting up Yocto projects in Eclipse, it would be greatly appreciated.

Could you provide your recipe for the Application "HelloWorld? Which 3rd party libraries did you add to the image?
It will be very help if you can provide all the changes you have done to your local copy of the branch 2.7 to compile your image.

Thanks and best regards, Jaski

Hi Jaski,

Which Eclipse project files should I provide? I’m not sure which Eclipse project files constitute the recipe.
As for changes to the Yocto project, I have made none. I used the Toradex configuration and built it on my local machine.
The 3rd party libraries I was referring to are gstreamer and all its support libraries.

Thanks!

Lee

hi lee

I think for your yocto project, you are doing something like that. Can you share your .bb file for your project. Thanks.

Hi Jaski,

I am trying to build and debug in Eclipse. I don’t see any .bb files in my eclipse workspace. If you are referring to the .bb files used to build my image and sdk, then they are the standard Toradex .bb files.

Ok, then you are cross compiling the hello-world example with gstreamer added. Could you provide your new code, so i can reproduce this issue on my side? Thanks.

I have uploaded a tar.gz of my test programs project directory:
[link text][1]
[1]: https://share.toradex.com/kqqlkl0km92hmlk?direct

Thanks for the files. How did you create the project? The cross compilation is not working due to an error in path configuration.
The include file is not found.

I used the Yocto Project SDK Autotools Project.
My build isn’t failing due to path configuration to the include files, it may be the reason it fails on your machine. The reason I am seeing the build fail is because the linker is failing to link the gstreamer library. The gstreamer library is present and in the same directory as other libraries it manages to link in!?

hi @lee

I am sorry to write you back so late. I tried to build the Autotools SDK Project in Eclipse and was unfortunately not successful. I discussed this internally in Toradex and we think, using this Autotools Yocto Plugin for Yocto is not a stable and future solution. We will provide in near Future (1-2 weeks) a Developer Article which will explain how to develop your first “Hello World” application and integrate this in Yocto Build System.

Best regards, Jaski

i have tried the procedure to built a linux image but i am getting the following error

ERROR: Task 2985 (/home/nishanth/build/webinar/yocto/build/…/stuff/openembedded-core/meta/recipes-gnome/gtk+/gtk+_2.24.25.bb, do_compile) failed with exit code '1

Kindly help
Regards,
S.Nishanth

hi @nishanth1829

Could you ask a new question? Thanks.

hi @lee

We created a Developer site which explains how you can integrate your application in the Yocto Build System.
Please have look on this and feel free to ask questions.

Best regards, Jaski