problem compiling propgcc source on OSX 10.9 with latest Xcode
Mike Petry
Posts: 14
Hi,
Has anyone built the latest propgcc tree under OSX 10.9 with the latest Xcode?
I've been happily running binaries that I built from a March 2013 propgcc tree that I built on OSX 10.8 with its Xcode release.
Everything compiled, linked, and ran with no problem.
I decided to try and catch up to the latest propgcc sources on my OSX 10.9
I cloned a new copy of the directory, ran an update, and did a build. The build failed with the error below.
Seems a lot has changed on OSX with release 10.9 and the updated Xcode.
I did a quick edit, to fix the readelf.c error, but then ran into problem on other parts of binutils because of "sbrk()" being defined.
It looks like configure finds an "sbrk()" definition and sets HAVE_SBRK. That causes havoc to gas and a few others in binutil.
Have others run into this on OSX 10.9?
Glad I kept my old /opt/parallax binary tree.
-Mike
/bin/sh ./libtool --tag=CC --mode=link gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -o addr2line addr2line.o bucomm.o version.o filemode.o ../bfd/libbfd.la ../libiberty/libiberty.a -lz
libtool: link: gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -o addr2line addr2line.o bucomm.o version.o filemode.o ../bfd/.libs/libbfd.a ../libiberty/libiberty.a -lz
gcc -DHAVE_CONFIG_H -I. -I../../../propgcc/binutils/binutils -I. -I../../../propgcc/binutils/binutils -I../bfd -I../../../propgcc/binutils/binutils/../bfd -I../../../propgcc/binutils/binutils/../include -DLOCALEDIR="\"/opt/parallax/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT readelf.o -MD -MP -MF .deps/readelf.Tpo -c -o readelf.o ../../../propgcc/binutils/binutils/readelf.c
../../../propgcc/binutils/binutils/readelf.c:9051:20: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int]
fputs (" " + n, stdout);
~~~~~~~~^~~
../../../propgcc/binutils/binutils/readelf.c:9051:20: note: use array indexing to silence this warning
fputs (" " + n, stdout);
^
& [ ]
1 error generated.
make[4]: *** [readelf.o] Error 1
Has anyone built the latest propgcc tree under OSX 10.9 with the latest Xcode?
I've been happily running binaries that I built from a March 2013 propgcc tree that I built on OSX 10.8 with its Xcode release.
Everything compiled, linked, and ran with no problem.
I decided to try and catch up to the latest propgcc sources on my OSX 10.9
I cloned a new copy of the directory, ran an update, and did a build. The build failed with the error below.
Seems a lot has changed on OSX with release 10.9 and the updated Xcode.
I did a quick edit, to fix the readelf.c error, but then ran into problem on other parts of binutils because of "sbrk()" being defined.
It looks like configure finds an "sbrk()" definition and sets HAVE_SBRK. That causes havoc to gas and a few others in binutil.
Have others run into this on OSX 10.9?
Glad I kept my old /opt/parallax binary tree.
-Mike
/bin/sh ./libtool --tag=CC --mode=link gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -o addr2line addr2line.o bucomm.o version.o filemode.o ../bfd/libbfd.la ../libiberty/libiberty.a -lz
libtool: link: gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -o addr2line addr2line.o bucomm.o version.o filemode.o ../bfd/.libs/libbfd.a ../libiberty/libiberty.a -lz
gcc -DHAVE_CONFIG_H -I. -I../../../propgcc/binutils/binutils -I. -I../../../propgcc/binutils/binutils -I../bfd -I../../../propgcc/binutils/binutils/../bfd -I../../../propgcc/binutils/binutils/../include -DLOCALEDIR="\"/opt/parallax/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT readelf.o -MD -MP -MF .deps/readelf.Tpo -c -o readelf.o ../../../propgcc/binutils/binutils/readelf.c
../../../propgcc/binutils/binutils/readelf.c:9051:20: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int]
fputs (" " + n, stdout);
~~~~~~~~^~~
../../../propgcc/binutils/binutils/readelf.c:9051:20: note: use array indexing to silence this warning
fputs (" " + n, stdout);
^
& [ ]
1 error generated.
make[4]: *** [readelf.o] Error 1
Comments
To fix this you are going to have to change that code to something like this:
Or you are going to have to switch the checking off by adding the option -Wno-string-plus-int to the command in the build system some how.
This all comes about because xcode uses the Clang compiler which does more checking than GCC and the GCC source code is wonky.
Will jbuild.sh be updated to reflect the new CFLAGS?
Thanks again,
Mike