Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] GCC-4.3.3 in toolchain fails to compile
@ 2009-05-22  3:32 Paul Archer
  2009-05-24 19:37 ` Peter Korsgaard
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Archer @ 2009-05-22  3:32 UTC (permalink / raw)
  To: buildroot

Hey all,

I am trying to build buildroot-2009.05-rc2 for the AT91SAM9G20,
however I keep getting gcc compiler errors no matter which version I
pick, either gcc-4.2.4, gcc-4.3.2/3 and gcc-4.4.x also fails. Versions
>=gcc4.3.2 all fail with the build error below.

It seems __DTOR_LIST__ is not being defined, but I don't really know
where to configure this to get it to be defined.

/home/paul/downloads/src/buildroot-2009.05-rc2/toolchain_build_arm/gcc-4.3.3-initial/./gcc/xgcc
-B/home/paul/downloads/src/buildroot-2009.05-rc2/toolchain_build_arm/gcc-4.3.3-initial/./gcc/
-B/home/paul/downloads/src/buildroot-2009.05-rc2/build_arm/staging_dir/usr/arm-linux-uclibc/bin/
-B/home/paul/downloads/src/buildroot-2009.05-rc2/build_arm/staging_dir/usr/arm-linux-uclibc/lib/
-isystem /home/paul/downloads/src/buildroot-2009.05-rc2/build_arm/staging_dir/usr/arm-linux-uclibc/include
-isystem /home/paul/downloads/src/buildroot-2009.05-rc2/build_arm/staging_dir/usr/arm-linux-uclibc/sys-include
-g -Os -O2 -g -Os -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE   -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition  -isystem ./include  -I. -I.
-I/home/paul/downloads/src/buildroot-2009.05-rc2/toolchain_build_arm/gcc-4.3.3/gcc
-I/home/paul/downloads/src/buildroot-2009.05-rc2/toolchain_build_arm/gcc-4.3.3/gcc/.
-I/home/paul/downloads/src/buildroot-2009.05-rc2/toolchain_build_arm/gcc-4.3.3/gcc/../include
-I/home/paul/downloads/src/buildroot-2009.05-rc2/toolchain_build_arm/gcc-4.3.3/gcc/../libcpp/include
-I/home/paul/downloads/src/buildroot-2009.05-rc2/toolchain_build_arm/gmp/include
-I/home/paul/downloads/src/buildroot-2009.05-rc2/toolchain_build_arm/mpfr/include
-I/home/paul/downloads/src/buildroot-2009.05-rc2/toolchain_build_arm/gcc-4.3.3/gcc/../libdecnumber
-I/home/paul/downloads/src/buildroot-2009.05-rc2/toolchain_build_arm/gcc-4.3.3/gcc/../libdecnumber/dpd
-I../libdecnumber  -g0 -finhibit-size-directive -fno-inline-functions
-fno-exceptions -fno-zero-initialized-in-bss -fno-toplevel-reorder
-fno-tree-vectorize  -I. -I. -I../.././gcc
-I/home/paul/downloads/src/buildroot-2009.05-rc2/toolchain_build_arm/gcc-4.3.3/libgcc
-I/home/paul/downloads/src/buildroot-2009.05-rc2/toolchain_build_arm/gcc-4.3.3/libgcc/.
-I/home/paul/downloads/src/buildroot-2009.05-rc2/toolchain_build_arm/gcc-4.3.3/libgcc/../gcc
-I/home/paul/downloads/src/buildroot-2009.05-rc2/toolchain_build_arm/gcc-4.3.3/libgcc/../include
 -o crtbegin.o -MT crtbegin.o -MD -MP -MF crtbegin.dep  \
          -c /home/paul/downloads/src/buildroot-2009.05-rc2/toolchain_build_arm/gcc-4.3.3/libgcc/../gcc/crtstuff.c
-DCRT_BEGIN
/home/paul/downloads/src/buildroot-2009.05-rc2/toolchain_build_arm/gcc-4.3.3/libgcc/../gcc/crtstuff.c:
In function ?__do_global_dtors_aux?:
/home/paul/downloads/src/buildroot-2009.05-rc2/toolchain_build_arm/gcc-4.3.3/libgcc/../gcc/crtstuff.c:306:
error: ?__DTOR_LIST__? undeclared (first use in this function)
/home/paul/downloads/src/buildroot-2009.05-rc2/toolchain_build_arm/gcc-4.3.3/libgcc/../gcc/crtstuff.c:306:
error: (Each undeclared identifier is reported only once
/home/paul/downloads/src/buildroot-2009.05-rc2/toolchain_build_arm/gcc-4.3.3/libgcc/../gcc/crtstuff.c:306:
error: for each function it appears in.)
make[2]: *** [crtbegin.o] Error 1
make[2]: Leaving directory
`/home/paul/downloads/src/buildroot-2009.05-rc2/toolchain_build_arm/gcc-4.3.3-initial/arm-linux-uclibc/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory
`/home/paul/downloads/src/buildroot-2009.05-rc2/toolchain_build_arm/gcc-4.3.3-initial'
make: *** [/home/paul/downloads/src/buildroot-2009.05-rc2/toolchain_build_arm/gcc-4.3.3-initial/.compiled]
Error 2

I have attached my config file incase anyone wants to test.

I am running ubuntu 9.04,
$ uname --all
Linux indiana 2.6.28-11-server #42-Ubuntu SMP Fri Apr 17 02:48:10 UTC
2009 i686 GNU/Linux
$ gcc --version
gcc (Ubuntu 4.3.3-5ubuntu4) 4.3.3

-- 
----
Regards
Paul Archer
ptarcher at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config
Type: application/octet-stream
Size: 20080 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20090522/8853915a/attachment-0001.obj>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] GCC-4.3.3 in toolchain fails to compile
  2009-05-22  3:32 [Buildroot] GCC-4.3.3 in toolchain fails to compile Paul Archer
@ 2009-05-24 19:37 ` Peter Korsgaard
  2009-05-28  6:14   ` Paul Archer
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2009-05-24 19:37 UTC (permalink / raw)
  To: buildroot

>>>>> "Paul" == Paul Archer <ptarcher@gmail.com> writes:

 Paul> Hey all,
 Paul> I am trying to build buildroot-2009.05-rc2 for the AT91SAM9G20,
 Paul> however I keep getting gcc compiler errors no matter which version I
 Paul> pick, either gcc-4.2.4, gcc-4.3.2/3 and gcc-4.4.x also fails. Versions
 >> =gcc4.3.2 all fail with the build error below.

 Paul> It seems __DTOR_LIST__ is not being defined, but I don't really know
 Paul> where to configure this to get it to be defined.

You have:

BR2_ARM_EABI=y
BR2_GNU_TARGET_SUFFIX="linux-uclibc"

Which doesn't make sense. The correct target suffix for eabi is
"linux-uclibcgnueabi". With that change the toolchain builds. Notice
that it will later fail in libusb and strace unless you get the
post-rc2 fixes in git, and that there's no at91sam9g20ek support in
u-boot (well, there is now in u-boot git after the 2009.03 release,
but not in any released versions).

How did you get to that config? Is is based on any defconfig in
buildroot?

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] GCC-4.3.3 in toolchain fails to compile
  2009-05-24 19:37 ` Peter Korsgaard
@ 2009-05-28  6:14   ` Paul Archer
  2009-05-28  8:26     ` Peter Korsgaard
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Archer @ 2009-05-28  6:14 UTC (permalink / raw)
  To: buildroot

Hey Peter,

Thanks for the reply

Peter> You have:
Peter>
Peter> BR2_ARM_EABI=y
Peter> BR2_GNU_TARGET_SUFFIX="linux-uclibc"
Peter>
Peter> Which doesn't make sense. The correct target suffix for eabi is
Peter> "linux-uclibcgnueabi". With that change the toolchain builds.
Making this change let me build the toolchain, and by using the
snapshot-20090522 I was able to build and boot. Thank you for the
change.

Peter> How did you get to that config? Is is based on any defconfig in
Peter> buildroot?
It was a mixture of the def config in the buildroot along with some
changes from linux4sam.com at
http://www.linux4sam.org/twiki/pub/Linux4SAM/BuildRootGet/buildroot-v23434.patch.
Finally I tried to remove most things.

Peter> and that there's no at91sam9g20ek support in
Peter> u-boot (well, there is now in u-boot git after the 2009.03 release,
Peter> but not in any released versions)
With regards to u-boot, I have u-boot working brilliantly with
u-boot-2009.06-rc1, however I was having trouble with the u-boot tools
for reading the enviroment from linux. I had trouble building this run
on the target, I constantly got can't find file
'/usr/bin/fw_printenv', but thats another story.

Thanks for your help peter.


-- 
----
Regards
Paul Archer
ptarcher at gmail.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] GCC-4.3.3 in toolchain fails to compile
  2009-05-28  6:14   ` Paul Archer
@ 2009-05-28  8:26     ` Peter Korsgaard
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2009-05-28  8:26 UTC (permalink / raw)
  To: buildroot

>>>>> "Paul" == Paul Archer <ptarcher@gmail.com> writes:

Hi,

 Paul> Hey Peter,
 Paul> Thanks for the reply

 Paul> Making this change let me build the toolchain, and by using the
 Paul> snapshot-20090522 I was able to build and boot. Thank you for the
 Paul> change.

 Paul> With regards to u-boot, I have u-boot working brilliantly with
 Paul> u-boot-2009.06-rc1, however I was having trouble with the u-boot tools
 Paul> for reading the enviroment from linux. I had trouble building this run
 Paul> on the target, I constantly got can't find file
 Paul> '/usr/bin/fw_printenv', but thats another story.

I've fixed the issue with building the target-tools with 2009.06-rc1+
in my tree at work, but I haven't pushed it upstream yet as we haven't
any 2009.06-rcX support in BR (and I won't add it so close to the
release). I'll check it in next week after the release.

If you need it earlier, you could try to apply the following yourself:

commit aa8564860f13b4f295861e256a3955f57c6b23df
Author: peko <peko@a61a55d3-c7e0-402d-9e56-82086cc33c8d>
Date:   Tue May 5 16:01:30 2009 +0000

    u-boot: target tools: use library files from their original location
    
    u-boot 2009.06-rc1 has changed the tools/ logic, and no longer adds
    symbolic links to the needed library files in the tools directory.
    Fix build by referencing the library files in their original
    location.

diff --git a/target/u-boot/Makefile.in b/target/u-boot/Makefile.in
index 6f1a83e..85fac6c 100644
--- a/target/u-boot/Makefile.in
+++ b/target/u-boot/Makefile.in
@@ -196,16 +196,19 @@ $(U_BOOT_TOOLS): $(U_BOOT_DIR)/$(U_BOOT_BIN)
 
 $(TARGET_DIR)/usr/bin/mkimage: $(U_BOOT_DIR)/$(U_BOOT_BIN)
        mkdir -p $(@D)
-       $(TARGET_CC) -I$(U_BOOT_DIR)/include -DUSE_HOSTCC -o $@ \
-               $(U_BOOT_DIR)/tools/mkimage.c \
-               $(addprefix $(U_BOOT_DIR)/tools/,crc32.c image.c md5.c sha1.c fdt*
+       $(TARGET_CC) -I$(U_BOOT_DIR)/include -I$(U_BOOT_DIR)/tools \
+               -DUSE_HOSTCC -o $@ \
+               $(U_BOOT_DIR)/tools/mkimage.c $(U_BOOT_DIR)/common/image.c \
+               $(addprefix $(U_BOOT_DIR)/lib_generic/,crc32.c md5.c sha1.c) \
+               $(U_BOOT_DIR)/libfdt/fdt*.c
+
        $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $@
 
 $(TARGET_DIR)/usr/sbin/fw_printenv: $(U_BOOT_DIR)/$(U_BOOT_BIN)
        mkdir -p $(@D)
        $(TARGET_CC) -I$(U_BOOT_DIR)/include -I$(LINUX_HEADERS_DIR)/include \
                -DUSE_HOSTCC -o $@ \
-               $(U_BOOT_DIR)/tools/env/*.c $(U_BOOT_DIR)/tools/crc32.c
+               $(U_BOOT_DIR)/tools/env/*.c $(U_BOOT_DIR)/lib_generic/crc32.c
        $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $@
        ln -sf fw_printenv $(TARGET_DIR)/usr/sbin/fw_setenv
 

 Paul> Thanks for your help peter.

You're welcome.

-- 
Bye, Peter Korsgaard

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-05-28  8:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-22  3:32 [Buildroot] GCC-4.3.3 in toolchain fails to compile Paul Archer
2009-05-24 19:37 ` Peter Korsgaard
2009-05-28  6:14   ` Paul Archer
2009-05-28  8:26     ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox