Bug 2980 - toolchain issue - segmentation fault while configuring packages
Summary: toolchain issue - segmentation fault while configuring packages
Status: VERIFIED NOTABUG
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 1.3
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 1.3 M4
Assignee: Ioana Grigoropol
QA Contact:
URL:
Whiteboard: (Scheduled)
Depends on:
Blocks:
 
Reported: 2012-08-21 13:51 UTC by Laurentiu Serban
Modified: 2012-09-24 11:17 UTC (History)
10 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments
config log (74.76 KB, text/x-log)
2012-08-21 13:51 UTC, Laurentiu Serban
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laurentiu Serban 2012-08-21 13:51:09 UTC
Created attachment 711 [details]
config log

After downloading iptables packages, cross toolchain setup and environment variables sourcing, ./configure {CONFIGURE_FLAGS} fails with the following error:

configure:3285: error: in `/home/lserban/toolchain_x86-64/iptables-1.4.9':
configure:3289: error: C compiler cannot create executables
See `config.log' for more details.

config.log is attached
Comment 1 Jessica 2012-08-21 13:58:38 UTC
Please be more specific what is your cross setup, e.g. how you install the toolchain (tar ball, or adt_installer) what is the host and what is target, where is the toolchain installed at
Comment 3 Richard Purdie 2012-08-21 14:08:32 UTC
This bug is missing information. Which revision of the system was this built with? Which toolchain tarball was used (link to the tarball?)?

I gather you tested master as well and it has the same problem but please mention that here.
Comment 4 Laurentiu Serban 2012-08-21 14:11:51 UTC
Hello Richard,
Sorry for the missing info:

the commits used are 91ece5d5668ee1adb5c5e3d757426a0d5187bd84 (for http://autobuilder.yoctoproject.org/pub/nightly/20120819-3/toolchain/x86_64/)
and 8b8748c8f963900b83dc0fdd7757556f917fe4fd for (http://autobuilder.yoctoproject.org/pub/nightly/20120814-1/toolchain/x86_64/)
Comment 5 Laurentiu Serban 2012-08-21 14:57:29 UTC
Hello guys,
I identified the root cause of the problem:

The sh script to install the toolchain allows the user to select a location other than the default one (opt/poky/1.2+snapshot).
When any other location under the user's home directory is used this error occurs.
If the default location is used this is issue is not reproduce.

So this issue is not so critical.
Comment 6 Laurentiu Serban 2012-08-21 17:28:39 UTC
Update for this bug:
the toolchain installed by ADT has the same issue.
http://autobuilder.yoctoproject.org/pub/nightly/20120814-1/adt_installer/
Comment 7 Laurentiu Serban 2012-08-21 17:36:29 UTC
This bug might be related to some wrong permission settings after the relocation oad the sdk was implemented.
Another issue that might be linked to this is that trying to compile a simple C code fails due to some permission issue with the gcc 

-rwxr-xr-x 1 lserban root 2702282 Aug 10 07:09 /opt/poky/1.2+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc
lserban@laurentiu-02:/opt/poky/1.2+snapshot$ ${CC}
-bash: /opt/poky/1.2+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc: Permission denied
lserban@laurentiu-02:/opt/poky/1.2+snapshot$ ls -al
Comment 8 liang li 2012-08-22 02:04:09 UTC
(In reply to comment #5)
> Hello guys,
> I identified the root cause of the problem:
> 
> The sh script to install the toolchain allows the user to select a location
> other than the default one (opt/poky/1.2+snapshot).
> When any other location under the user's home directory is used this error
> occurs.
> If the default location is used this is issue is not reproduce.
> 
> So this issue is not so critical.

when use tar.bz2 tarball to test meta-toolchain before, the same also happened when use command "tar jxvf" to extract the tarball to the directory other than "/", so "/opt/poky/" is the directory meta-toolchain must exists in.

tar jxvf poky-eglibc-x86_64-arm-toolchain-gmae-1.2+snapshot-20120725.tar.bz2
source poky/1.2+snapshot/environment-setup-armv5te-poky-linux-gnueabi 
./configure ${CONFIGURE_FLAGS}

configure: WARNING: unrecognized options: --with-libtool-sysroot
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-poky-linux-gnueabi-strip... arm-poky-linux-gnueabi-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for arm-poky-linux-gnueabi-gcc... arm-poky-linux-gnueabi-gcc  -march=armv5te  -marm -mthumb-interwork  -mtune=arm926ej-s --sysroot=/opt/poky/1.2+snapshot/sysroots/armv5te-poky-linux-gnueabi
checking whether the C compiler works... no
configure: error: in `/home/liangli/new_package_need_to_compile/iptables_test/iptables-1.4.13':
configure: error: C compiler cannot create executables
See `config.log' for more details
Comment 9 Ioana Grigoropol 2012-08-29 14:29:55 UTC
This issue is related to the fact that the configure script that comes with the iptables archive is created for a different architecture than the one that we try to run it on (by sourcing the sdk), and so causing the compiler for arm, for example, to use a script designed for a different architecture.
The solution is to use the autotools (autogen.sh script in this case) to generate the correct configure script for the target architecture after sourcing the poky sdk.
Comment 10 Alexandru Georgescu 2012-09-24 11:17:00 UTC
Works fine on this build: http://autobuilder.yoctoproject.org/pub/nightly/20120916-2/

Setting it to verified.