[yocto] The sysroot location in eclipse plugin?

Lu, Lianhao lianhao.lu at intel.com
Thu Feb 16 23:49:10 PST 2012


Ni Qingliang wrote on 2012-02-17:
> the environment-setup file in build tree had defined CFLAGS and CXXFLAGS
> which include the sysroot argument(<build_tree>/tmp/sysroots/<machine>).
> 
> Do we must specify the sysroot location in the eclipse plugin?
> 
> after specify it, I found the CFLAGS CXXFLAGS in project property follow
> it, and dropped the sysroot defined in environment-setup file.
> 
> and I have another sysroot running on target (qemu) unzipped from the
> image.
> 
> If I specify the target sysroot in eclipse-plugin, I can't compile my
> code, because there is no any header file in /usr/include.
> If I specify the <build_tree>/tmp/sysroots/<machine>, I can't running
> the qemu machine in eclipse, because there is no 'init'.
> 
The eclipse-plugin by default assumes the user using the same target sysroot for both cross compiling and qemu launching. So this requires the target sysroot having the libraries and header files. 

You might have 2 options here:
1. build a new image with the "dev-pkgs" image feature(you can set that in conf/local.conf in variable EXTRA_IMAGE_FEATURES) and use that image as target sysroot in eclipse.

2. launch the qemu in console terminal, out of eclipse, using a different target sysroot. 

Best Regards,
Lianhao





More information about the yocto mailing list