Skip to contentSkip to conversation

The sysroot location in eclipse plugin?

DISCUSSION Ni Qingliang 2 participants 4 messages Feb 17, 2012

lore
Share & tools
lore
#0 lore raw

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'.

what is the problem?

THANKS!

Signature · 3 lines
Yi Qingliang
[email protected]
https://niqingliang2003.wordpress.com
#1 lore raw

Ni Qingliang wrote on 2012-02-17:

Quoted 8 lines

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.

Quoted 8 lines

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

#2 lore raw

thanks! another question:
why I must specify the sysroot location in eclipse plugin? the environment-setup has it already.

Quoted 28 lines · Lianhao

Ni Qingliang wrote on 2012-02-17:

Quoted 8 lines

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.

Quoted 8 lines

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

Signature · 3 lines
Yi Qingliang
[email protected]
https://niqingliang2003.wordpress.com
#3 lore raw

Ni Qingliang wrote on 2012-02-17:

Quoted 4 lines

thanks! another question:
why I must specify the sysroot location in eclipse plugin? the environment-setup has it already.

In case you need another target sysroot which is different from the sysroot defined in the environment files.

Best Regards,
Lianhao