Skip to contentSkip to conversation

failure on gcc-cross-initial-4.2.4-r5 for i686

DISCUSSION Travis Stratman 5 participants 13 messages Mar 7, 2009 – Mar 13, 2009

lore
Share & tools
lore
#0 lore raw

Hello,

I am trying to build an image for an i686 based machine (pentiumpro). I have it configured to use gcc 4.2.4, glibc 2.6.1, binutils 2.18.50.0.7.

The build fails on do_compile in gcc-cross-initial. The log shows "checking for C compiler default output file name... configure: error: C compiler cannot create executables" in configure-stage2-intl.

Looking at the config.log in gcc-4.2.4/build.i686-linux.i686-linux/intl shows:
----
configure:2118: checking for C compiler default output file name
configure:2121: /opt/oe/EMAC-OE-x86/tmp/work/i686-linux/gcc-cross-initial-4.2.4-r5/gcc-4.2.4/build.i686-linux.i686-linux/./prev-gcc/xgcc -B/opt/oe/EMAC-OE-x86/tmp/work/i686-linux/gcc-cross-initial-4.2.4-r5/gcc-4.2.4/build.i686-linux.i686-linux/./prev-gcc/ -B/opt/oe/EMAC-OE-x86/tmp/cross/i686/i686-linux/bin/ -O2 -g -fomit-frame-pointer conftest.c >&5
/opt/oe/EMAC-OE-x86/tmp/cross/i686/i686-linux/bin/ld: crt1.o: No such
file: No such file or directory
collect2: ld returned 1 exit status
----

If I recall correctly the crt1.o file is a start file provided by glibc, but I need to get gcc compiled first...

Any ideas on where to start? Is there any information that I can provide that would be helpful?

Thanks,

TAS

#1 lore raw
Quoted 25 lines · On Saturday 07 March 2009 14:07:33 Travis Stratman wrote:

Hello,

I am trying to build an image for an i686 based machine (pentiumpro). I have it configured to use gcc 4.2.4, glibc 2.6.1, binutils 2.18.50.0.7.

The build fails on do_compile in gcc-cross-initial. The log shows "checking for C compiler default output file name... configure: error: C compiler cannot create executables" in configure-stage2-intl.

Looking at the config.log in gcc-4.2.4/build.i686-linux.i686-linux/intl shows:
----
configure:2118: checking for C compiler default output file name configure:2121:
/opt/oe/EMAC-OE-x86/tmp/work/i686-linux/gcc-cross-initial-4.2.4-r5/gcc-4.2. 4/build.i686-linux.i686-linux/./prev-gcc/xgcc -B/opt/oe/EMAC-OE-x86/tmp/work/i686-linux/gcc-cross-initial-4.2.4-r5/gcc-4. 2.4/build.i686-linux.i686-linux/./prev-gcc/

(quoted diff) +0 -2
-B/opt/oe/EMAC-OE-x86/tmp/cross/i686/i686-linux/bin/ -O2 -g
-fomit-frame-pointer   conftest.c  >&5

/opt/oe/EMAC-OE-x86/tmp/cross/i686/i686-linux/bin/ld: crt1.o: No such file:
No such file or directory
collect2: ld returned 1 exit status
----

Quoted 2 lines

If I recall correctly the crt1.o file is a start file provided by glibc, but I need to get gcc compiled first...

yes. gcc-initial is really very minimal gcc. It does not depend on anything except binutils. We make sure that it does not build stuff thats not needed at this stage.

Quoted 3 lines

Any ideas on where to start? Is there any information that I can provide that would be helpful?

Are you using latest git? I do not get the error like yours for me it builds fine for i686-generic machine. Could you post your local.conf ? are you using some pre existing distro and machine or defining your own.

Thx

-Khem

#2 lore raw

Thanks Khem.

Quoted 4 lines · Khem Raj

Are you using latest git? I do not get the error like yours for me it builds fine for i686-generic machine. Could you post your local.conf ? are you using some pre existing distro and machine or defining your own.

I'm using the latest git (as of Saturday morning) of org.openembedded.dev. I'm using i686-generic.conf for the machine file and a custom distro file mostly taken directly from the Angstrom conf for now. As of right now there is nothing in /opt/oe/EMAC-OE-x86 besides the custom conf files that I am using and a custom busybox packages directory. I have done a lot of work w/ OE for ARM but I'm starting out with the latest and greatest for the x86 side.

conf files follow (minus comments and newlines):
----

travis@cheeto:/opt/oe/EMAC-OE-x86/conf$ sed -e 's/#.*//' -e '/^$/ d' local.conf
MNT = "/mnt/oe/x86"
DL_DIR = "${MNT}/sources"
BBFILES := "/opt/oe/EMAC-OE-x86/packages/*/*.bb ${MNT}/org.openembedded.dev/packages/*/*.bb"
BBFILE_COLLECTIONS = "upstream EMAC-OE-x86"
BBFILE_PATTERN_upstream = "${MNT}/org.openembedded.dev/"
BBFILE_PATTERN_EMAC-OE-x86 = "/opt/oe/EMAC-OE-x86/"
BBFILE_PRIORITY_upstream = "5"
BBFILE_PRIORITY_EMAC-OE-x86 = "10"
BBMASK = ""
PREFERRED_PROVIDERS = "virtual/qte:qte virtual/libqpe:libqpe-opie"
PREFERRED_PROVIDERS += " virtual/libsdl:libsdl-x11"
PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc-initial:gcc-cross-initial"
PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc:gcc-cross"
PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}g++:gcc-cross"
TMPDIR = "/opt/oe/EMAC-OE-x86/tmp"
MACHINE = "i686-generic"
TARGET_OS = "linux"
DISTRO = "emac-x86"
ASSUME_PROVIDED += "qemu-native"
IMAGE_FSTYPES = "tar.bz2 ext3"
BBDEBUG = "yes"
BBINCLUDELOGS = "yes"
travis@cheeto:/opt/oe/EMAC-OE-x86/conf/distro$ sed -e 's/#.*//' -e '/^$/ d' emac-x86.conf
DISTRO_NAME = "EMAC"
EMAC_MAJOR = "0.0"
EMAC_MINOR = "0"
DISTRO_VERSION = "${EMAC_MAJOR}.${EMAC_MINOR}"
INHERIT += "package_ipk debian"
require conf/distro/include/sane-srcdates.inc
require conf/distro/include/sane-srcrevs.inc
require conf/distro/include/angstrom-2008-preferred-versions.inc
require conf/distro/include/preferred-opie-versions-1.2.4.inc
DISTRO_TYPE ?= "debug"
KERNEL = "kernel26"
MACHINE_KERNEL_VERSION = "2.6"
PCMCIA_MANAGER = "pcmciautils"
TARGET_OS = "linux"
PREFERRED_VERSION_linux-libc-headers    = "2.6.23"
PREFERRED_VERSION_glibc                 ?= "2.6.1"
PREFERRED_VERSION_glibc-initial         ?= "2.6.1"
PREFERRED_VERSION_uclibc                ?= "0.9.30"
PREFERRED_VERSION_uclibc-initial        ?= "0.9.30"
PREFERRED_PROVIDER_virtual/xserver  ?= "xserver-kdrive"
PREFERRED_PROVIDER_xserver          ?= "xserver-kdrive"
EMAC_GCC_VERSION                        ?= "4.2.4"
PREFERRED_VERSION_binutils      ?= "2.18.50.0.7"
PREFERRED_VERSION_binutils-cross        ?= "2.18.50.0.7"
PREFERRED_VERSION_binutils-cross-sdk    ?= "2.18.50.0.7"
PREFERRED_VERSION_gcc                    ?= "${EMAC_GCC_VERSION}"
PREFERRED_VERSION_gcc-cross              ?= "${EMAC_GCC_VERSION}"
PREFERRED_VERSION_gcc-cross-sdk          ?= "${EMAC_GCC_VERSION}"
PREFERRED_VERSION_gcc-cross-initial      ?= "${EMAC_GCC_VERSION}"
PREFERRED_VERSION_gcc-cross-intermediate ?= "${EMAC_GCC_VERSION}"
PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils = "binutils-cross"
PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-initial = "gcc-cross-initial"
PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-intermediate = "gcc-cross-intermediate"
PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc = "gcc-cross"
PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++ = "gcc-cross"
PREFERRED_PROVIDER_hostap-conf                      ?= "hostap-conf"
PREFERRED_PROVIDER_hostap-modules_h2200             ?= "hostap-modules"
PREFERRED_PROVIDER_hostap-modules_hx4700            ?= "hostap-modules"
PREFERRED_PROVIDER_virtual/db           ?= "db"
PREFERRED_PROVIDER_virtual/db-native    ?= "db-native"
PREFERRED_PROVIDER_virtual/libsdl       ?= "libsdl-x11"
PREFERRED_PROVIDER_virtual/libx11       ?= "libx11"
PREFERRED_PROVIDER_virtual/libxine      ?= "libxine-x11"
PREFERRED_PROVIDER_virtual/xserver      ?= "xserver-kdrive"
PREFERRED_PROVIDER_linux-libc-headers = "linux-libc-headers"
PREFERRED_PROVIDER_dbus-glib             = "dbus-glib"
PREFERRED_PROVIDER_esound               ?= "pulseaudio"
PREFERRED_PROVIDER_gconf                ?= "gconf-dbus"
PREFERRED_PROVIDER_gnome-vfs            ?= "gnome-vfs"
PREFERRED_PROVIDER_gnome-vfs-plugin-file ?= "gnome-vfs"
PREFERRED_PROVIDER_tslib                ?= "tslib"
PREFERRED_PROVIDER_tslib-conf           ?= "tslib"
PREFERRED_PROVIDER_libgpewidget         ?= "libgpewidget"
PREFERRED_PROVIDER_ntp                  ?= "ntp"
PREFERRED_PROVIDER_hotplug               = "udev"
PREFERRED_PROVIDER_libxss                = "libxss"
PREFERRED_PROVIDER_bluez-utils-dbus      = "bluez-utils"
PREFERRED_PROVIDER_gtk+                   ?= "gtk+"
PREFERRED_PROVIDER_gdk-pixbuf-loader-ani  ?= "gtk+"
PREFERRED_PROVIDER_gdk-pixbuf-loader-bmpg ?= "gtk+"
PREFERRED_PROVIDER_gdk-pixbuf-loader-gif  ?= "gtk+"
PREFERRED_PROVIDER_gdk-pixbuf-loader-ico  ?= "gtk+"
PREFERRED_PROVIDER_gdk-pixbuf-loader-jpeg ?= "gtk+"
PREFERRED_PROVIDER_gdk-pixbuf-loader-pcx  ?= "gtk+"
PREFERRED_PROVIDER_gdk-pixbuf-loader-png  ?= "gtk+"
PREFERRED_PROVIDER_gdk-pixbuf-loader-pnm  ?= "gtk+"
PREFERRED_PROVIDER_gdk-pixbuf-loader-ras  ?= "gtk+"
PREFERRED_PROVIDER_gdk-pixbuf-loader-tga  ?= "gtk+"
PREFERRED_PROVIDER_gdk-pixbuf-loader-wbmp ?= "gtk+"
PREFERRED_PROVIDER_gdk-pixbuf-loader-xbm  ?= "gtk+"
PREFERRED_PROVIDER_gdk-pixbuf-loader-xpm  ?= "gtk+"
PREFERRED_VERSION_udev = "118"
PREFERRED_VERSION_busybox = "1.13.2"
DISTRO_LOGIN_MANAGER = "busybox"
PREFERRED_PROVIDER_task-bootstrap = "task-bootstrap"
----

Thanks,

Travis

#3 lore raw
Quoted 30 lines · Travis Stratman

Thanks Khem.

Quoted 4 lines · Khem Raj

Are you using latest git? I do not get the error like yours for me it builds fine for i686-generic machine. Could you post your local.conf ? are you using some pre existing distro and machine or defining your own.

I'm using the latest git (as of Saturday morning) of org.openembedded.dev. I'm using i686-generic.conf for the machine file and a custom distro file mostly taken directly from the Angstrom conf for now. As of right now there is nothing in /opt/oe/EMAC-OE-x86 besides the custom conf files that I am using and a custom busybox packages directory. I have done a lot of work w/ OE for ARM but I'm starting out with the latest and greatest for the x86 side.

conf files follow (minus comments and newlines):
----

travis@cheeto:/opt/oe/EMAC-OE-x86/conf$ sed -e 's/#.*//' -e '/^$/ d' local.conf
MNT = "/mnt/oe/x86"
DL_DIR = "${MNT}/sources"
BBFILES := "/opt/oe/EMAC-OE-x86/packages/*/*.bb ${MNT}/org.openembedded.dev/packages/*/*.bb"
BBFILE_COLLECTIONS = "upstream EMAC-OE-x86"
BBFILE_PATTERN_upstream = "${MNT}/org.openembedded.dev/"
BBFILE_PATTERN_EMAC-OE-x86 = "/opt/oe/EMAC-OE-x86/"
BBFILE_PRIORITY_upstream = "5"
BBFILE_PRIORITY_EMAC-OE-x86 = "10"
BBMASK = ""
PREFERRED_PROVIDERS = "virtual/qte:qte virtual/libqpe:libqpe-opie"
PREFERRED_PROVIDERS += " virtual/libsdl:libsdl-x11"

snip

Quoted 3 lines

PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc-initial:gcc-cross-initial" PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc:gcc-cross" PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}g++:gcc-cross"

Can you try by removing above three

Rest of the changes seems like should not have effect.

Thx

-Khem

#4 lore raw

Thanks Khem.

Quoted 11 lines · Khem Raj

On Mon, Mar 9, 2009 at 3:18 PM, Travis Stratman <[email protected]> wrote:

snip

Quoted 3 lines

PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc-initial:gcc-cross-initial" PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc:gcc-cross" PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}g++:gcc-cross"

Can you try by removing above three

Rest of the changes seems like should not have effect.

This doesn't seem to change anything. I made the changes, cleaned all glibc and gcc packages, then tried to build and I still get the same issue.

Any other ideas?

Thanks,

Travis

#5 lore raw
Quoted 13 lines · Travis Stratman

Thanks Khem.

Quoted 10 lines · Khem Raj

On Mon, Mar 9, 2009 at 3:18 PM, Travis Stratman <[email protected]> wrote:

snip

Quoted 3 lines

PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc-initial:gcc-cross-initial" PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc:gcc-cross" PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}g++:gcc-cross"

Can you try by removing above three

Quoted 7 lines
Quoted 1 line

Rest of the changes seems like should not have effect.

This doesn't seem to change anything. I made the changes, cleaned all glibc and gcc packages, then tried to build and I still get the same issue.

Any other ideas?

Hmm looking closely it seems that your cross compiler is from i686-linux -> i686-linux which is native configuration and intl configury is then trying to use
your freshly built CC instead of the BUILD_CC. In short its not really thinking if it is cross compiling. I have a x86_64 box thats why it worked for me because I am cross'ing from x86_64-linux to i686-linux

I will give it a shot on x86 box too. Meanwhile can you also define TARGET_VENDOR = "something" for your distr and rebuild

Thx

-Khem

#6 lore raw
Quoted 29 lines · Khem Raj
Quoted 13 lines · Travis Stratman

Thanks Khem.

Quoted 10 lines · Khem Raj

On Mon, Mar 9, 2009 at 3:18 PM, Travis Stratman <[email protected]> wrote:

snip

Quoted 3 lines

PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc-initial:gcc-cross-initial" PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc:gcc-cross" PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}g++:gcc-cross"

Can you try by removing above three

Quoted 7 lines
Quoted 1 line

Rest of the changes seems like should not have effect.

This doesn't seem to change anything. I made the changes, cleaned all glibc and gcc packages, then tried to build and I still get the same issue.

Any other ideas?

Hmm looking closely it seems that your cross compiler is from i686-linux -> i686-linux which is native configuration and intl configury is then trying to use
your freshly built CC instead of the BUILD_CC. In short its not really thinking if it is cross compiling. I have a x86_64 box thats why it worked for me because I am cross'ing from x86_64-linux to i686-linux

Quoted 2 lines

I will give it a shot on x86 box too. Meanwhile can you also define TARGET_VENDOR = "something" for your distr and rebuild

I'll save you some trouble - been building i686-generic on I32 x86 for months w/o a problem. Angstrom distro with a small overlay - configuration is pretty basic.

i686-linux holds my native packages
i686-angstrom-linux holds my target/cross packages, including gcc-cross i686-generic-angstrom-linux holds machine-specific target packages

Signature · 1 line
Denys
#7 lore raw
Quoted 2 lines · On Tuesday 10 March 2009 20:05:09 Denys Dmytriyenko wrote:
Quoted 1 line · Khem Raj

On Tue, Mar 10, 2009 at 8:40 AM, Travis Stratman <[email protected]>

Quoted 37 lines · wrote:
Quoted 30 lines
Quoted 15 lines

Thanks Khem.

Quoted 12 lines · Khem Raj

On Mon, Mar 9, 2009 at 3:18 PM, Travis Stratman
<[email protected]> wrote:

snip

Quoted 4 lines

PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc-initial:gcc-cross-initial" PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc:gcc-cross" PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}g++:gcc-cross"

Can you try by removing above three

Quoted 7 lines
Quoted 1 line

Rest of the changes seems like should not have effect.

This doesn't seem to change anything. I made the changes, cleaned all glibc and gcc packages, then tried to build and I still get the same issue.

Any other ideas?

Hmm looking closely it seems that your cross compiler is from i686-linux -> i686-linux which is native configuration and intl configury is then trying to use
your freshly built CC instead of the BUILD_CC. In short its not really thinking if it is cross compiling. I have a x86_64 box thats why it worked for me because I am cross'ing from x86_64-linux to i686-linux

Quoted 2 lines

I will give it a shot on x86 box too. Meanwhile can you also define TARGET_VENDOR = "something" for your distr and rebuild

I'll save you some trouble - been building i686-generic on I32 x86 for months w/o a problem. Angstrom distro with a small overlay - configuration is pretty basic.

[snip]

Quoted 2 lines

i686-linux holds my native packages
i686-angstrom-linux holds my target/cross packages, including gcc-cross

Yeah this makes your target triplet different then your host triplet and hence it compiles a correct cross gcc for you.

Quoted 1 line

i686-generic-angstrom-linux holds machine-specific target packages

Signature · 1 line
Khem Raj
#8 lore raw
In reply to Denys Dmytriyenko

Denys,

Quoted 5 lines · Denys Dmytriyenko

i686-linux holds my native packages
i686-angstrom-linux holds my target/cross packages, including gcc-cross i686-generic-angstrom-linux holds machine-specific target packages

Are that your overlay directory names?

Then they have nothing to do with the actual problem AFAIK.

It's probably the target triplet name that makes the difference, like Khem suggests.

Regards,

Signature · 1 line
Leon
#11 lore raw
In reply to Khem Raj

Thanks Khem.

Quoted 9 lines · Khem Raj

Hmm looking closely it seems that your cross compiler is from i686-linux -> i686-linux which is native configuration and intl configury is then trying to use
your freshly built CC instead of the BUILD_CC. In short its not really thinking if it is cross compiling. I have a x86_64 box thats why it worked for me because I am cross'ing from x86_64-linux to i686-linux I will give it a shot on x86 box too. Meanwhile can you also define TARGET_VENDOR = "something" for your distr and rebuild

I had suspected that it might be something like this. Making this change fixed the gcc-initial compile problem. Now, it fails on glibc 2.6.1... something to do with undefined references in libc_pic.os.

I don't have too much time to look into it now, but I'll post more information later.

Thanks,

Travis

#12 lore raw
In reply to Khem Raj
Quoted 9 lines · Khem Raj
Quoted 2 lines

Any other ideas?

Hmm looking closely it seems that your cross compiler is from i686-linux -> i686-linux which is native configuration and intl configury is then trying to use
your freshly built CC instead of the BUILD_CC. In short its not really thinking if it is cross compiling. I have a x86_64 box thats why it worked for me because I am cross'ing from x86_64-linux to i686-linux

This works just fine to fix the issue. It's just finishing up with an image now. I had a feeling that it might be something like this since I have never had an issue when cross-compiling for ARM boards in the past.

Thanks,

Travis

#9 lore raw
In reply to Leon Woestenberg
Quoted 9 lines · Leon Woestenberg

Denys,

Quoted 5 lines · Denys Dmytriyenko

i686-linux holds my native packages
i686-angstrom-linux holds my target/cross packages, including gcc-cross i686-generic-angstrom-linux holds machine-specific target packages

Are that your overlay directory names?

Obviously, not. Those are my target and host triplets. Those are the directories used in work, stamps, staging and pkgdata among other things.

Quoted 4 lines

Then they have nothing to do with the actual problem AFAIK.

It's probably the target triplet name that makes the difference, like Khem suggests.

Correct, as Khem suspected and Travis confirmed, not setting TARGET_VENDOR messes things up by clashing host and target triplets, which confuses the hell out of the cross-compilation :)
BTW, Angstrom sets it to "-angstrom" by default, as in my case.

Signature · 1 line
Denys
#10 lore raw
In reply to Denys Dmytriyenko

Denys Dmytriyenko wrote in Tue 03/10 2009 at 23:05 -0400:

Quoted 7 lines

I'll save you some trouble - been building i686-generic on I32 x86 for months w/o a problem. Angstrom distro with a small overlay - configuration is pretty basic.

i686-linux holds my native packages
i686-angstrom-linux holds my target/cross packages, including gcc-cross i686-generic-angstrom-linux holds machine-specific target packages

Maybe better solution would be as small change to staging hierarchy:

Suppose that build platform is i686-linux and target platform is i686-linux as well.

- target system staging files have prefix /usr and are sysrooted:
now: tmp/staging/i686-linux
 proposed: tmp/staging/i686-linux

- native toolchain files have prefix /OE/tmp/staging/i686-linux as native location
 now: tmp/staging/i686-linux
proposed: tmp/staging/i686-linux-native

This will prevent path clash if build and target triplets are exactly the same. => It will allow simple native build using OE toolchain.

Side effect: It will invalidate existing buildroots.

________________________________________________________________________
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus