jsnyder / arm-eabi-toolchain

Makefile & supporting patches/scripts to build a bare metal ARM EABI toolchain.
264 stars 67 forks source link

Build of 2011.09-69 on Mac OS X #14

Closed ilg-ul closed 12 years ago

ilg-ul commented 12 years ago

I tried to build the latest Sourcery CodeBench Lite 2011.09-69 for ARM EABI on latest Mac OS X 10.7.2 Lion & Xcode 4.2.1, and the build completes for cross-binutils but fails for cross-gcc.

the configuration I used was

if [ MENTOR_RELEASE = 2032 ] then export CS_BASE=2011.09 export CS_REV=69 export GCC_VERSION=4.6 export MPC_VERSION=0.8.1 export SOURCE_PACKAGE=9739 export BIN_PACKAGE=9740 export SOURCE_MD5_CHCKSUM=ebe25afa276211d0e88b7ff0d03c5345 export BIN_MD5_CHECKSUM=2f2d73429ce70dfb848d7b44b3d24d3f fi

the console log:

/Users/ilg/Work/NoBackup/arm-cs-tools-2032-20120115/jsnyder-arm-eabi-toolchain-706e734/build/gcc/./gcc/xgcc -B/Users/ilg/Work/NoBackup/arm-cs-tools-2032-20120115/jsnyder-arm-eabi-toolchain-706e734/build/gcc/./gcc/ -B/Users/ilg/Developer/Cross/arm-cs-tools-2032-20120115/arm-none-eabi/bin/ -B/Users/ilg/Developer/Cross/arm-cs-tools-2032-20120115/arm-none-eabi/lib/ -isystem /Users/ilg/Developer/Cross/arm-cs-tools-2032-20120115/arm-none-eabi/include -isystem /Users/ilg/Developer/Cross/arm-cs-tools-2032-20120115/arm-none-eabi/sys-include -c -DHAVE_CONFIG_H -g -O2 -I. -I../../../../gcc-4.6-2011.09/libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic ../../../../gcc-4.6-2011.09/libiberty/cp-demangle.c -o cp-demangle.o ../../../../gcc-4.6-2011.09/libiberty/regex.c:51:25: fatal error: sys/types.h: No such file or directory compilation terminated. In file included from ../../../../gcc-4.6-2011.09/libiberty/cplus-dem.c:46:0: ../../../../gcc-4.6-2011.09/libiberty/../include/safe-ctype.h:122:19: fatal error: ctype.h: No such file or directory compilation terminated. make[3]: * [regex.o] Error 1 make[3]: * Waiting for unfinished jobs.... make[3]: * [cplus-dem.o] Error 1 ../../../../gcc-4.6-2011.09/libiberty/cp-demangle.c:106:19: fatal error: stdio.h: No such file or directory compilation terminated. make[3]: * [cp-demangle.o] Error 1 make[2]: * [all-target-libiberty] Error 2 make[2]: * Waiting for unfinished jobs.... config.status: creating Makefile config.status: creating config.h config.status: executing depfiles commands config.status: executing libtool commands config.status: executing default-1 commands Adding multilib support to Makefile in ../../../../../gcc-4.6-2011.09/libquadmath with_multisubdir=armv6-m Running configure in multilib subdir thumb2

it looks like something changed with the headers...

Liviu

jsnyder commented 12 years ago

Looking into it, I do get a similar failure. I don't recall encountering a build failure at that stage of that type before. I may have to switch to a 2-pass build if they've made changes that prevent building a full C gcc prior to newlib, or at least extract newlib and point it at the location where it can find headers in there.

Also, thanks for the reminder, I had forgotten that this release had finally made it out.

jsnyder commented 12 years ago

I think the problem was with libquadmath being added to gcc. I've switched to a 2-stage build of GCC, one that builds a C compiler to build newlib, and then the second stage one that includes c and c++ support. Initial versions of that are in here: https://github.com/jsnyder/arm-eabi-toolchain/tree/2011.09

I haven't done testing on it yet besides getting it through a build on Linux. Will build on OS X next then test building some code.

jsnyder commented 12 years ago

I believe I have now gotten a successful build on Linux & OS X, still needs more testing.

Note the added libelf requirement to include LTO.

ilg-ul commented 12 years ago

I successfuly built the 0084249 release.

there are two small details to mention:

I guess it is related to the BUILD_ID = $(shell git describe --always)

--- Makefile 2012-01-18 18:06:14.000000000 +0200 +++ ../../Makefile 2012-01-21 18:30:30.000000000 +0200 @@ -50,7 +50,7 @@ SOURCE_URL = http://sourcery.mentor.com/sgpp/lite/arm/portal/package$(SOURCE_PACKAGE)/public/arm-none-eabi/$(LOCAL_SOURCE) BIN_URL = http://sourcery.mentor.com/sgpp/lite/arm/portal/package$(BIN_PACKAGE)/public/arm-none-eabi/$(LOCAL_BIN)

-SOURCE_MD5_CHCKSUM = ebe25afa276211d0e88b7ff0d03c5345 +SOURCE_MD5_CHCKSUM ?= ebe25afa276211d0e88b7ff0d03c5345 BIN_MD5_CHECKSUM ?= 2f2d73429ce70dfb848d7b44b3d24d3f

Liviu

jsnyder commented 12 years ago

Thanks for the feedback.

I forgot to include that type of condition for git. I will fix that. I wanted to label the builds (PKG_VERSION shows up in arm-none-eabi-gcc --version) so that I can tell what build I'm using and so I can ask people in the future which build they used when they encounter trouble.

Sorry about the typo on making the checksum replaceable that was a typo (much like the spelling of checksum sans the e some time ago, which I'm now hesitant to change since scripts like yours exist and use the variable names in the makefile).

So far I've gotten successful builds of eLua out of it, though I have run into cases where LTO doesn't work (I think there might be patches for fixing these issues, though I haven't tried integrating them) and GCC now has some extra complaints that it will issue that cause it to error out on things like core_cm3.c included in stm32's standard peripheral library (there's a workaround for that one, the bug is in the core_cm2.c file: http://lists.gnu.org/archive/html/bug-binutils/2011-12/msg00112.html). So far it seems to be working well otherwise.