New build, gobjcopy failure, any clues?

David Chase at
Wed Mar 27 20:58:09 UTC 2013

Getting to new build on Solaris11-sparc (not necessary for Solaris11-x86).

Here's a recipe that works.  It is biased towards modern releases of software.
Note the use of undocumented flag-seting to configure and make at various steps,
and the two out-of-band adjustments to binutils.

1) configure+make+install zlib-1.2.7 (e.g., --prefix=/export/drchase/newbuild)

2) configure binutils.23.2 (e.g., --prefix=/export/drchase/newbuild)

3) build binutils, referencing the new zlib
DEFAULT_INCLUDES=-I/export/drchase/newbuild/include make381 -e

4) install symlink for gobjcopy
cd /export/drchase/newbuild ; ln -s objcopy gobjcopy

5) configure new build, carefully avoiding as in binutils-23.2.2
AS=/usr/ccs/bin/as TOOLS_DIR=/export/drchase/newbuild/bin bash configure \
--with-cups=/java/devtools/share/cups --with-freetype=/java/devtools/sparc/freetype-sparcv9
Another choice here would be to remove "as" from the new binutils, a third choice would be to change the problematic invocation.


I tried not installing the symbolic link from gobjcopy to objcopy, and configure ignored it.

The binutils build error that comes from a down-rev zlib is from a missing macro/declaration in older zlib.h:

/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -DCP_ACP=1    -I. -I. -I./../include  -DHAVE_bfd_elf32_sparc_sol2_vec -DHAVE_bfd_elf64_sparc_sol2_vec -DHAVE_sunos_big_vec -DHAVE_bfd_elf64_little_generic_vec -DHAVE_bfd_elf64_big_generic_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec  -DBINDIR='"/export/dr2chase/newbuild/bin"'  -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT compress.lo -MD -MP -MF .deps/compress.Tpo -c -o compress.lo compress.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -DCP_ACP=1 -I. -I. -I./../include -DHAVE_bfd_elf32_sparc_sol2_vec -DHAVE_bfd_elf64_sparc_sol2_vec -DHAVE_sunos_big_vec -DHAVE_bfd_elf64_little_generic_vec -DHAVE_bfd_elf64_big_generic_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec "-DBINDIR=\"/export/dr2chase/newbuild/bin\"" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT compress.lo -MD -MP -MF .deps/compress.Tpo -c compress.c -o compress.o
cc1: warnings being treated as errors
compress.c: In function ‘bfd_compress_section_contents’:
compress.c:99:3: error: implicit declaration of function ‘compressBound’
make381[4]: *** [compress.lo] Error 1

The error that comes from using the new as:
/export/drchase/newbuild/bin/as: unrecognized option `-THIS_FILE="mlib_v_ImageCopy_blk.s"'
make381[2]: *** [/export/drchase/jdk8tl-full/build/solaris-sparcv9-normal-server-release/jdk/objs/libawt/mlib_v_ImageCopy_blk.o] Error 1
make381[2]: *** Waiting for unfinished jobs....
make381[1]: *** [libs-only] Error 2
gmake: *** [jdk-only] Error 2

More information about the build-dev mailing list