简体   繁体   English

Yocto Eclipse ADT插件在配置期间失败

[英]Yocto Eclipse ADT plugin fails during configure

I'm trying to use the Yocto Project Eclipse ADT plugin using the manual as a reference with a standalone pre-built toolchain created by running bitbake <recipename> -c populate_sdk , then running poky-glibc-x86_64-<recipename>-x86-toolchain-2.0.sh , specifying default locations. 我正在尝试使用Yocto Project Eclipse ADT插件,将手册作为参考,并通过运行bitbake <recipename> -c populate_sdk创建一个独立的预构建工具链,然后运行poky-glibc-x86_64-<recipename>-x86-toolchain-2.0.sh ,指定默认位置。 I've sourced the environment-setup in opt/poky/2.0 . 我在opt/poky/2.0获取了环境设置。 My Toolchain Root Location is pointing to /opt/poky/2.0 and my sysroot is pointing at /opt/poky/2.0/sysroots/x86-poky-linux . 我的工具链根位置指向/opt/poky/2.0而我的/opt/poky/2.0/sysroots/x86-poky-linux指向/opt/poky/2.0/sysroots/x86-poky-linux

I was able to compile a "Hello, world" program using this enviromnent, but with a larger project I hit errors during the Build Project step. 我可以使用这种环境来编译“ Hello,world”程序,但是对于较大的项目,我在“构建项目”步骤中遇到了错误。

Here's the relevant part of my config.log: 这是我的config.log的相关部分:

Configured with: /home/presslertj/poky/build/tmp/work-shared/gcc-5.2.0-r0/gcc-5.2.0/configure --build=x86_64-linux --host=x86_64-pokysdk-linux --target=i586-poky-linux --prefix=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/usr --exec_prefix=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/usr --bindir=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/usr/bin/i586-poky-linux --sbindir=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/usr/bin/i586-poky-linux --libexecdir=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/usr/libexec/i586-poky-linux --datadir=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/usr/share --sysconfdir=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/etc --sharedstatedir=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/com --localstatedir=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/var --libdir=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/usr/lib/i586-poky-linux --includedir=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/usr/include --oldincludedir=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/usr/include --infodir=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/usr/share/info --mandir=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/usr/share/man --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=/home/presslertj/poky/build/tmp/sysroots/x86_64-nativesdk-pokysdk-linux --with-gnu-ld --enable-shared --enable-languages=c,c++ --enable-threads=posix --enable-multilib --enable-c99 --enable-long-long --enable-symvers=gnu --enable-libstdcxx-pch --program-prefix=i586-poky-linux- --without-local-prefix --enable-target-optspace --enable-lto --enable-libssp --disable-bootstrap --disable-libmudflap --with-system-zlib --with-linker-hash-style=gnu --enable-linker-build-id --with-ppl=no --with-cloog=no --enable-checking=release --enable-cheaders=c_global --without-isl --with-gxx-include-dir=/not/exist/usr/include/c++/5.2.0 --with-build-time-tools=/home/presslertj/poky/build/tmp/sysroots/x86_64-linux/usr/i586-poky-linux/bin --with-sysroot=/not/exist --with-build-sysroot=/home/presslertj/poky/build/tmp/sysroots/piu --enable-targets=all --enable-poison-system-directories --with-mpfr=/home/presslertj/poky/build/tmp/sysroots/x86_64-nativesdk-pokysdk-linux --with-mpc=/home/presslertj/poky/build/tmp/sysroots/x86_64-nativesdk-pokysdk-linux --enable-nls --enable-__cxa_atexit
Thread model: posix
gcc version 5.2.0 (GCC) 
configure:2971: $? = 0
configure:2960: i586-poky-linux-gcc -m32 -march=pentium-m --sysroot=/opt/poky/2.0/sysroots/x86-poky-linux -V >&5
i586-poky-linux-gcc: error: unrecognized command line option '-V'
i586-poky-linux-gcc: fatal error: no input files
compilation terminated.
configure:2971: $? = 1
configure:2960: i586-poky-linux-gcc -m32 -march=pentium-m --sysroot=/opt/poky/2.0/sysroots/x86-poky-linux -qversion >&5
i586-poky-linux-gcc: error: unrecognized command line option '-qversion'
i586-poky-linux-gcc: fatal error: no input files
compilation terminated.
configure:2971: $? = 1
configure:2991: checking whether the C compiler works
configure:3013: i586-poky-linux-gcc -m32 -march=pentium-m --sysroot=/opt/poky/2.0/sysroots/x86-poky-linux  -O2 -pipe -g -feliminate-unused-debug-types  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed conftest.c  >&5
configure:3017: $? = 0
configure:3065: result: yes
configure:3068: checking for C compiler default output file name
configure:3070: result: a.out
configure:3076: checking for suffix of executables
configure:3083: i586-poky-linux-gcc -m32 -march=pentium-m --sysroot=/opt/poky/2.0/sysroots/x86-poky-linux -o conftest  -O2 -pipe -g -feliminate-unused-debug-types  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed conftest.c  >&5
configure:3087: $? = 0
configure:3109: result: 
configure:3131: checking whether we are cross compiling
configure:3139: i586-poky-linux-gcc -m32 -march=pentium-m --sysroot=/opt/poky/2.0/sysroots/x86-poky-linux -o conftest  -O2 -pipe -g -feliminate-unused-debug-types  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed conftest.c  >&5
configure:3143: $? = 0
configure:3150: ./conftest
/home/presslertj/workspace/HMM/configure: ./conftest: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
configure:3154: $? = 126
configure:3161: error: in `/home/presslertj/workspace/HMM':
configure:3163: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.

I think the most important line of this might be: 我认为其中最重要的一行可能是:

/home/presslertj/workspace/HMM/configure: ./conftest: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

Which looks to me like it's looking in the wrong place for ld-linux.so.2. 在我看来,这看起来像是在ld-linux.so.2的错误位置。 Also, when running build, Eclipse's terminal spits out the following lines: 另外,在运行构建时,Eclipse的终端会显示以下几行:

ENV key HOST_CC_ARCH is NULL
ENV key TOOLCHAIN_OPTIONS is NULL
ENV key SELECTED_OPTIMIZATION is NULL
ENV key TARGET_ARCH is NULL
ENV key OECMAKE_C_LINK_FLAGS is NULL
ENV key OECMAKE_CXX_LINK_FLAGS is NULL
ENV key STAGING_DIR_HOST is NULL
ENV key STAGING_DIR_NATIVE is NULL
ENV key CROSS_DIR is NULL
ENV key OECMAKE_EXTRA_ROOT_PATH is NULL
ENV key EXTERNAL_TOOLCHAIN is NULL
ENV key STAGING_DATADIR is NULL

I'm guessing that one of these variables needs to be specified so that ld-linux.so.2 is found but I don't know which, and I feel like I might've missed some critical step. 我猜想需要指定这些变量之一,以便找到ld-linux.so.2,但我不知道是哪一个,我觉得我可能错过了一些关键步骤。 What is causing this error? 是什么导致此错误? Have I misconfigured my environment? 我是否配置了错误的环境?

As read in How to fix /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory : 如何修复/lib/ld-linux.so.2中所述:错误的ELF解释器:无此类文件或目录

This will happen only on 64 bit systems, the cause is the fact that 32 bit libraries are missing from the system, so you can easily fix this issue by installing the 32 bit libraries on your system. 这仅会在64位系统上发生,原因是系统缺少32位库,因此您可以通过在系统上安装32位库来轻松解决此问题。

So if you encounter this error /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory this is how you can fix it: 因此,如果遇到此错误/lib/ld-linux.so.2:错误的ELF解释器:没有这样的文件或目录,这是您可以解决的方法:

To fix it: 要解决这个问题:

On any RPM based distribution (CentOS/RedHat/Fedora/Suse/Mandriva): 在任何基于RPM的发行版(CentOS / RedHat / Fedora / Suse / Mandriva)上:

 yum -y install glibc.i686 

On any DEB based distribution (Debian/Ubuntu/Mint/Crunchbang): 在任何基于DEB的发行版(Debian / Ubuntu / Mint / Crunchbang)上:

 apt-get update apt-get install ia32-libs 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM