This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
gcc-4.6.2-RC-20111019 build problem in stage 2
- From: Dennis Clarke <dclarke at blastwave dot org>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 25 Oct 2011 07:15:24 -0400 (EDT)
- Subject: gcc-4.6.2-RC-20111019 build problem in stage 2
- Reply-to: dclarke at blastwave dot org
[ warning - obscenely long with no lack of detail ]
I was very surprised to see the following in my bootstrap of
gcc-4.6.2-RC-20111019-build at stage two :
/opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build/./prev-gcc/xgcc
-B/opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build/./prev-gcc/
-B/opt/bw/sparc-sun-solaris2.8/bin/ -B/opt/bw/sparc-sun-solaris2.8/bin/
-B/opt/bw/sparc-sun-solaris2.8/lib/ -isystem
/opt/bw/sparc-sun-solaris2.8/include -isystem
/opt/bw/sparc-sun-solaris2.8/sys-include -g -O2 -DIN_GCC -W -Wall
-Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -Wold-style-definition -Wc++-compat
-DHAVE_CONFIG_H -static-libstdc++ -static-libgcc -o cc1 c-lang.o
c-family/stub-objc.o attribs.o c-errors.o c-decl.o c-typeck.o c-convert.o
c-aux-info.o c-objc-common.o c-parser.o tree-mudflap.o c-family/c-common.o
c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o
c-family/c-gimplify.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o
c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o
c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o
sol2-c.o \
cc1-checksum.o main.o libbackend.a ../libcpp/libcpp.a
../libdecnumber/libdecnumber.a ../libcpp/libcpp.a ./../intl/libintl.a
../libiberty/libiberty.a ../libdecnumber/libdecnumber.a
-L/opt/bw/lib/sparcv8 -L/opt/bw/lib/sparcv8 -L/opt/bw/lib/sparcv8 -lmpc
-lmpfr -lgmp -ldl -L../zlib -lz
Undefined first referenced
symbol in file
libiconv_close libbackend.a(pretty-print.o)
libiconv_open libbackend.a(pretty-print.o)
libiconv libbackend.a(pretty-print.o)
ld: fatal: Symbol referencing errors. No output written to cc1
collect2: ld returned 1 exit status
gmake[3]: *** [cc1] Error 1
gmake[3]: Leaving directory
`/opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build/gcc'
gmake[2]: *** [all-stage2-gcc] Error 2
gmake[2]: Leaving directory `/opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build'
gmake[1]: *** [stage2-bubble] Error 2
gmake[1]: Leaving directory `/opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build'
gmake: *** [all] Error 2
real 12:42:25.135
user 1.449
sys 0.381
I don't see a -liconv there and that would be a problem.
My config line was :
# cat ../config.sh
#!/bin/ksh
../gcc-4.6.2-RC-20111019/configure --host=sparc-sun-solaris2.8
--build=sparc-sun-solaris2.8 \
--with-as=/usr/ccs/bin/as --without-gnu-ld --with-ld=/usr/ccs/bin/ld
--with-cpu=v7 --enable-stage1-languages=c \
--enable-nls --enable-threads=posix --prefix=/opt/bw --enable-shared
--libdir=/opt/bw/lib/sparcv8 --enable-multilib \
--with-gmp-include=/opt/bw/include --with-gmp-lib=/opt/bw/lib/sparcv8
--with-mpfr-include=/opt/bw/include \
--with-mpfr-lib=/opt/bw/lib/sparcv8 --with-mpc-include=/opt/bw/include
--with-mpc-lib=/opt/bw/lib/sparcv8 \
--libexecdir=/opt/bw/lib --with-gxx-include-dir=/opt/bw/include \
--with-local-prefix=/opt/bw/include --enable-gather-detailed-mem-stats \
--with-included-gettext --with-libiconv-prefix=/opt/bw/lib/sparcv8
--enable-lto \ --with-pkgversion=Blastwave.org\ Inc\ Mon\ Oct\ 24\
16\:59\:22\ GMT\ 2011
\
--with-bugurl=http\:\/\/www.blastwave.org\/support
--enable-languages=c,c++,objc,fortran,ada \
--enable-bootstrap
Note --with-libiconv-prefix=/opt/bw/lib/sparcv8
The problem here is that on Solaris we geenerally have both 32 and 64-bit
libs in nested directories or perhaps in separate places like lib and
lib64 somewhere. Regardless the absent -liconv breaks this process.
# ls -lap /opt/bw/lib/sparcv8/libicon*
-rw-r--r-- 1 dclarke csw 1008 May 9 21:47
/opt/bw/lib/sparcv8/libiconv.la
lrwxrwxrwx 1 dclarke csw 17 Mar 26 2011
/opt/bw/lib/sparcv8/libiconv.so -> libiconv.so.2.5.0*
lrwxrwxrwx 1 dclarke csw 17 Mar 26 2011
/opt/bw/lib/sparcv8/libiconv.so.2 -> libiconv.so.2.5.0*
-rwxr-xr-x 1 dclarke csw 1376800 Mar 26 2011
/opt/bw/lib/sparcv8/libiconv.so.2.5.0
#
# elfdump -d /opt/bw/lib/sparcv8/libiconv.so.2.5.0
Dynamic Section: .dynamic
index tag value
[0] NEEDED 0x8cb9 libc.so.1
[1] INIT 0x401a0
[2] FINI 0x401ac
[3] SONAME 0x8ccd libiconv.so.2
[4] RUNPATH 0x8cdb
/opt/bw/lib/$ISALIST:/opt/bw/lib/sparcv8
[5] RPATH 0x8cdb
/opt/bw/lib/$ISALIST:/opt/bw/lib/sparcv8
[6] HASH 0x94
[7] STRTAB 0x5aa4
[8] STRSZ 0x8d04
[9] SYMTAB 0x1eb4
[10] SYMENT 0x10
[11] CHECKSUM 0xa3cf
[12] VERNEED 0xe7a8
[13] VERNEEDNUM 0x1
[14] PLTRELSZ 0x138
[15] PLTREL 0x7
[16] JMPREL 0x110c0
[17] RELA 0xe7c8
[18] RELASZ 0x2a30
[19] RELAENT 0xc
[20] FEATURE_1 0x1 [ PARINIT ]
[21] FLAGS 0 0
[22] FLAGS_1 0 0
[23] PLTGOT 0x1196a8
# ldd /opt/bw/lib/sparcv8/libiconv.so.2.5.0
libc.so.1 => /usr/lib/libc.so.1
libdl.so.1 => /usr/lib/libdl.so.1
/usr/platform/SUNW,UltraAX-i2/lib/libc_psr.so.1
#
So no problems there.
Also, the prev-gcc/xgcc looks good :
# ls /opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build/prev-gcc/xgcc
/opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build/prev-gcc/xgcc
# file /opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build/prev-gcc/xgcc
/opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build/prev-gcc/xgcc: ELF 32-bit
MSB executable SPARC Version 1, dynamically linked, not stripped
# elfdump -d /opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build/prev-gcc/xgcc
Dynamic Section: .dynamic
index tag value
[0] NEEDED 0x15d8 libiconv.so.2
[1] NEEDED 0x15c2 libc.so.1
[2] INIT 0x64498
[3] FINI 0x644b4
[4] RUNPATH 0x15e6
/opt/bw/lib/$ISALIST:/opt/bw/lib/sparcv8
[5] RPATH 0x15e6
/opt/bw/lib/$ISALIST:/opt/bw/lib/sparcv8
[6] HASH 0x100e8
[7] STRTAB 0x127c0
[8] STRSZ 0x160f
[9] SYMTAB 0x10df0
[10] SYMENT 0x10
[11] CHECKSUM 0xd183
[12] VERNEED 0x13dd0
[13] VERNEEDNUM 0x1
[14] PLTRELSZ 0x51c
[15] PLTREL 0x7
[16] JMPREL 0x13e44
[17] RELA 0x13df0
[18] RELASZ 0x570
[19] RELAENT 0xc
[20] DEBUG 0
[21] FEATURE_1 0x1 [ PARINIT ]
[22] FLAGS 0 0
[23] FLAGS_1 0 0
[24] PLTGOT 0x99a04
# ldd /opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build/prev-gcc/xgcc
libiconv.so.2 => /opt/bw/lib/sparcv8/libiconv.so.2
libc.so.1 => /usr/lib/libc.so.1
libdl.so.1 => /usr/lib/libdl.so.1
/usr/platform/SUNW,UltraAX-i2/lib/libc_psr.so.1
#
#
So can I manually perform the link stage for cc1 in that directory?
Let's try :
# cd /opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build/gcc
# /opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build/./prev-gcc/xgcc \
> -B/opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build/./prev-gcc/ \
> -B/opt/bw/sparc-sun-solaris2.8/bin/ \
> -B/opt/bw/sparc-sun-solaris2.8/bin/ \
> -B/opt/bw/sparc-sun-solaris2.8/lib/ \
> -isystem /opt/bw/sparc-sun-solaris2.8/include -isystem \
> /opt/bw/sparc-sun-solaris2.8/sys-include -g -O2 -DIN_GCC -W -Wall
-Wwrite-strings \
> -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-format-attribute \
> -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
-Wold-style-definition -Wc++-compat \
> -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc \
> -o cc1 \
> c-lang.o c-family/stub-objc.o attribs.o c-errors.o c-decl.o c-typeck.o
c-convert.o \
> c-aux-info.o c-objc-common.o c-parser.o tree-mudflap.o
c-family/c-common.o c-family/c-cppbuiltin.o \
> c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o
c-family/c-lex.o c-family/c-omp.o \
> c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o
c-family/c-pragma.o \
> c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o
sol2-c.o \
> cc1-checksum.o main.o libbackend.a ../libcpp/libcpp.a
../libdecnumber/libdecnumber.a \
> ../libcpp/libcpp.a ./../intl/libintl.a ../libiberty/libiberty.a
../libdecnumber/libdecnumber.a \
> -L/opt/bw/lib/sparcv8 -lmpc -lmpfr -lgmp -ldl -liconv -L../zlib -lz -v
Reading specs from
/opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build/./prev-gcc/specs
COLLECT_GCC=/opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build/./prev-gcc/xgcc
COLLECT_LTO_WRAPPER=/opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build/./prev-gcc/lto-wrapper
Target: sparc-sun-solaris2.8
Configured with: ../gcc-4.6.2-RC-20111019/configure
--host=sparc-sun-solaris2.8 --build=sparc-sun-solaris2.8
--with-as=/usr/ccs/bin/as --without-gnu-ld --with-ld=/usr/ccs/bin/ld
--with-cpu=v7 --enable-stage1-languages=c --enable-nls
--enable-threads=posix --prefix=/opt/bw --enable-shared
--libdir=/opt/bw/lib/sparcv8 --enable-multilib
--with-gmp-include=/opt/bw/include --with-gmp-lib=/opt/bw/lib/sparcv8
--with-mpfr-include=/opt/bw/include --with-mpfr-lib=/opt/bw/lib/sparcv8
--with-mpc-include=/opt/bw/include --with-mpc-lib=/opt/bw/lib/sparcv8
--libexecdir=/opt/bw/lib --with-gxx-include-dir=/opt/bw/include
--with-local-prefix=/opt/bw/include --enable-gather-detailed-mem-stats
--with-included-gettext --with-libiconv-prefix=/opt/bw --enable-lto
--with-pkgversion='Blastwave.org Inc Mon Oct 24 16:59:22 GMT 2011'
--with-bugurl=http://www.blastwave.org/support
--enable-languages=c,c++,objc,fortran,ada --enable-bootstrap
Thread model: posix
gcc version 4.6.2 20111019 (prerelease) (Blastwave.org Inc Mon Oct 24
16:59:22 GMT 2011)
COMPILER_PATH=/opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build/./prev-gcc/:/usr/ccs/bin/
LIBRARY_PATH=/opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build/./prev-gcc/:/usr/ccs/lib/:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-B'
'/opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build/./prev-gcc/' '-B'
'/opt/bw/sparc-sun-solaris2.8/bin/' '-B'
'/opt/bw/sparc-sun-solaris2.8/bin/' '-B'
'/opt/bw/sparc-sun-solaris2.8/lib/' '-isystem'
'/opt/bw/sparc-sun-solaris2.8/include' '-isystem'
'/opt/bw/sparc-sun-solaris2.8/sys-include' '-g' '-O2' '-D' 'IN_GCC'
'-Wextra' '-Wall' '-Wwrite-strings' '-Wcast-qual' '-Wstrict-prototypes'
'-Wmissing-prototypes' '-Wmissing-format-attribute' '-pedantic'
'-Wno-long-long' '-Wno-variadic-macros' '-Wno-overlength-strings'
'-Wold-style-definition' '-Wc++-compat' '-D' 'HAVE_CONFIG_H'
'-static-libstdc++' '-static-libgcc' '-o' 'cc1' '-L/opt/bw/lib/sparcv8'
'-L../zlib' '-v' '-mcpu=v7'
/opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build/./prev-gcc/collect2 -V -Y
P,/usr/ccs/lib:/usr/lib -Qy -o cc1
/opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build/./prev-gcc/crt1.o
/opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build/./prev-gcc/crti.o
/usr/ccs/lib/values-Xa.o
/opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build/./prev-gcc/crtbegin.o
-L/opt/bw/lib/sparcv8 -L../zlib
-L/opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build/./prev-gcc -L/usr/ccs/lib
c-lang.o c-family/stub-objc.o attribs.o c-errors.o c-decl.o c-typeck.o
c-convert.o c-aux-info.o c-objc-common.o c-parser.o tree-mudflap.o
c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o
c-family/c-format.o c-family/c-gimplify.o c-family/c-lex.o
c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o
c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o
c-family/c-ada-spec.o sol2-c.o cc1-checksum.o main.o libbackend.a
../libcpp/libcpp.a ../libdecnumber/libdecnumber.a ../libcpp/libcpp.a
./../intl/libintl.a ../libiberty/libiberty.a
../libdecnumber/libdecnumber.a -lmpc -lmpfr -lgmp -ldl -liconv -lz -lgcc
-lgcc_eh -lc -lgcc -lgcc_eh -lc
/opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build/./prev-gcc/crtend.o
/opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build/./prev-gcc/crtn.o
ld: Software Generation Utilities - Solaris Link Editors: 5.8-1.302
Looks good to me now that -liconv is in there.
What did we get ?
# ls -lap cc1
-rwxr-xr-x 1 root other 52115024 Oct 25 10:11 cc1
Do we have a good looking RUNPATH and RPATH to locate the libs ?
# elfdump -d cc1
Dynamic Section: .dynamic
index tag value
[0] NEEDED 0x24382 libmpc.so.2
[1] NEEDED 0x2438e libmpfr.so.4
[2] NEEDED 0x2439b libgmp.so.10
[3] NEEDED 0x243a8 libdl.so.1
[4] NEEDED 0x243b3 libiconv.so.2
[5] NEEDED 0x243c1 libz.so
[6] NEEDED 0x2436c libc.so.1
[7] INIT 0x637f24
[8] FINI 0x637f40
[9] RUNPATH 0x243c9
/opt/bw/lib/$ISALIST:/opt/bw/lib/sparcv8
[10] RPATH 0x243c9
/opt/bw/lib/$ISALIST:/opt/bw/lib/sparcv8
[11] HASH 0x100e8
[12] STRTAB 0x3bd5c
[13] STRSZ 0x243f2
[14] SYMTAB 0x1ea7c
[15] SYMENT 0x10
[16] CHECKSUM 0xd744
[17] VERNEED 0x60150
[18] VERNEEDNUM 0x1
[19] PLTRELSZ 0xb1c
[20] PLTREL 0x7
[21] JMPREL 0x601dc
[22] RELA 0x60170
[23] RELASZ 0xb88
[24] RELAENT 0xc
[25] DEBUG 0
[26] FEATURE_1 0x1 [ PARINIT ]
[27] FLAGS 0 0
[28] FLAGS_1 0 0
[29] PLTGOT 0x707c00
yes .. perfect. Let's check :
# unset LD_LIBRARY_PATH
#
# ldd cc1
libmpc.so.2 => /opt/bw/lib/sparcv8/libmpc.so.2
libmpfr.so.4 => /opt/bw/lib/sparcv8/libmpfr.so.4
libgmp.so.10 => /opt/bw/lib/sparcv8/libgmp.so.10
libdl.so.1 => /usr/lib/libdl.so.1
libiconv.so.2 => /opt/bw/lib/sparcv8/libiconv.so.2
libz.so => /opt/bw/lib/sparcv8/libz.so
libc.so.1 => /usr/lib/libc.so.1
libgcc_s.so.1 => /opt/bw/lib/sparcv8/libgcc_s.so.1
/usr/platform/SUNW,UltraAX-i2/lib/libc_psr.so.1
#
does the thing work ?
# cat /export/medusa/dclarke/build/test/hello.c
#include <stdio.h>
int
main(int argc, char *argv[])
{
printf ( "Hello World!\n" );
return (0);
}
#
# ./cc1 -v -E /export/medusa/dclarke/build/test/hello.c
ignoring nonexistent directory
"/opt/bw/lib/sparcv8/gcc/sparc-sun-solaris2.8/4.6.2/include"
ignoring nonexistent directory "/opt/bw/include/include"
ignoring nonexistent directory
"/opt/bw/lib/sparcv8/gcc/sparc-sun-solaris2.8/4.6.2/include-fixed"
ignoring nonexistent directory
"/opt/bw/lib/sparcv8/gcc/sparc-sun-solaris2.8/../../../../sparc-sun-solaris2.8/include"
#include "..." search starts here:
#include <...> search starts here:
/opt/bw/include
/usr/include
End of search list.
# 1 "/export/medusa/dclarke/build/test/hello.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/export/medusa/dclarke/build/test/hello.c"
# 1 "/usr/include/stdio.h" 1 3 4
# 20 "/usr/include/stdio.h" 3 4
#pragma ident "@(#)stdio.h 1.78 99/12/08 SMI"
# 1 "/usr/include/iso/stdio_iso.h" 1 3 4
# 32 "/usr/include/iso/stdio_iso.h" 3 4
#pragma ident "@(#)stdio_iso.h 1.2 99/10/25 SMI"
# 1 "/usr/include/sys/feature_tests.h" 1 3 4
# 13 "/usr/include/sys/feature_tests.h" 3 4
#pragma ident "@(#)feature_tests.h 1.18 99/07/26 SMI"
# 1 "/usr/include/sys/isa_defs.h" 1 3 4
# 9 "/usr/include/sys/isa_defs.h" 3 4
#pragma ident "@(#)isa_defs.h 1.20 99/05/04 SMI"
# 16 "/usr/include/sys/feature_tests.h" 2 3 4
# 36 "/usr/include/iso/stdio_iso.h" 2 3 4
# 1 "/usr/include/sys/va_list.h" 1 3 4
# 9 "/usr/include/sys/va_list.h" 3 4
#pragma ident "@(#)va_list.h 1.12 99/05/04 SMI"
# 26 "/usr/include/sys/va_list.h" 3 4
typedef void *__va_list;
# 37 "/usr/include/iso/stdio_iso.h" 2 3 4
# 1 "/usr/include/stdio_tag.h" 1 3 4
# 9 "/usr/include/stdio_tag.h" 3 4
#pragma ident "@(#)stdio_tag.h 1.3 98/04/20 SMI"
# 21 "/usr/include/stdio_tag.h" 3 4
typedef struct __FILE __FILE;
# 38 "/usr/include/iso/stdio_iso.h" 2 3 4
# 1 "/usr/include/stdio_impl.h" 1 3 4
# 9 "/usr/include/stdio_impl.h" 3 4
#pragma ident "@(#)stdio_impl.h 1.8 99/06/10 SMI"
# 22 "/usr/include/stdio_impl.h" 3 4
typedef int ssize_t;
# 38 "/usr/include/stdio_impl.h" 3 4
struct __FILE
{
ssize_t _cnt;
unsigned char *_ptr;
unsigned char *_base;
unsigned char _flag;
unsigned char _file;
unsigned __orientation:2;
unsigned __ionolock:1;
unsigned __filler:5;
};
# 39 "/usr/include/iso/stdio_iso.h" 2 3 4
# 59 "/usr/include/iso/stdio_iso.h" 3 4
typedef long long __longlong_t;
# 75 "/usr/include/iso/stdio_iso.h" 3 4
typedef __FILE FILE;
typedef unsigned int size_t;
typedef long fpos_t;
# 147 "/usr/include/iso/stdio_iso.h" 3 4
extern __FILE __iob[20];
# 164 "/usr/include/iso/stdio_iso.h" 3 4
extern int remove(const char *);
extern int rename(const char *, const char *);
extern FILE *tmpfile(void);
extern char *tmpnam(char *);
extern int fclose(FILE *);
extern int fflush(FILE *);
extern FILE *fopen(const char *, const char *);
extern FILE *freopen(const char *, const char *, FILE *);
extern void setbuf(FILE *, char *);
extern int setvbuf(FILE *, char *, int, size_t);
extern int fprintf(FILE *, const char *, ...);
extern int fscanf(FILE *, const char *, ...);
extern int printf(const char *, ...);
extern int scanf(const char *, ...);
extern int sprintf(char *, const char *, ...);
extern int sscanf(const char *, const char *, ...);
extern int vfprintf(FILE *, const char *, __va_list);
extern int vprintf(const char *, __va_list);
extern int vsprintf(char *, const char *, __va_list);
extern int fgetc(FILE *);
extern char *fgets(char *, int, FILE *);
extern int fputc(int, FILE *);
extern int fputs(const char *, FILE *);
extern int getc(FILE *);
extern int putc(int, FILE *);
extern int getchar(void);
extern int putchar(int);
extern char *gets(char *);
extern int puts(const char *);
extern int ungetc(int, FILE *);
extern size_t fread(void *, size_t, size_t, FILE *);
extern size_t fwrite(const void *, size_t, size_t, FILE *);
extern int fgetpos(FILE *, fpos_t *);
extern int fseek(FILE *, long, int);
extern int fsetpos(FILE *, const fpos_t *);
extern long ftell(FILE *);
extern void rewind(FILE *);
extern void clearerr(FILE *);
extern int feof(FILE *);
extern int ferror(FILE *);
extern void perror(const char *);
extern int __filbuf(FILE *);
extern int __flsbuf(int, FILE *);
# 23 "/usr/include/stdio.h" 2 3 4
# 91 "/usr/include/stdio.h" 3 4
typedef long off_t;
typedef __longlong_t off64_t;
# 109 "/usr/include/stdio.h" 3 4
typedef __longlong_t fpos64_t;
# 137 "/usr/include/stdio.h" 3 4
extern unsigned char _sibuf[], _sobuf[];
# 179 "/usr/include/stdio.h" 3 4
extern unsigned char *_bufendtab[];
extern FILE *_lastbuf;
# 215 "/usr/include/stdio.h" 3 4
extern void setbuffer(FILE *, char *, size_t);
extern int setlinebuf(FILE *);
extern int snprintf(char *, size_t, const char *, ...);
extern int vsnprintf(char *, size_t, const char *, __va_list);
# 236 "/usr/include/stdio.h" 3 4
extern FILE *fdopen(int, const char *);
extern char *ctermid(char *);
extern int fileno(FILE *);
# 262 "/usr/include/stdio.h" 3 4
extern FILE *popen(const char *, const char *);
extern char *cuserid(char *);
extern char *tempnam(const char *, const char *);
extern int getopt(int, char *const *, const char *);
extern int getsubopt(char **, char *const *, char **);
extern char *optarg;
extern int optind, opterr, optopt;
extern int getw(FILE *);
extern int putw(int, FILE *);
extern int pclose(FILE *);
extern int fseeko(FILE *, off_t, int);
extern off_t ftello(FILE *);
# 291 "/usr/include/stdio.h" 3 4
extern FILE *fopen64(const char *, const char *);
extern FILE *freopen64(const char *, const char *, FILE *);
extern FILE *tmpfile64(void);
extern int fgetpos64(FILE *, fpos64_t *);
extern int fsetpos64(FILE *, const fpos64_t *);
extern int fseeko64(FILE *, off64_t, int);
extern off64_t ftello64(FILE *);
# 2 "/export/medusa/dclarke/build/test/hello.c" 2
int
main(int argc, char *argv[])
{
printf ( "Hello World!\n" );
return (0);
}
Execution times (seconds)
TOTAL : 0.02 0.00 0.07
103 kB
#
#
looks good to me.
Somewhere in the Makefile the -liconv is absent and the breaks the build.
Let me vi Makefile and modify this :
# Libs and linker options needed for plugin support
PLUGINLIBS = -ldl
to this :
# Libs and linker options needed for plugin support
PLUGINLIBS = -ldl -liconv
Then run gmake again and see what I get.
# rm cc1
# cd ..
# pwd
/opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build
#
# ptime gmake
A few minutes later I see ....
.
.
.
gmake[3]: Entering directory
`/opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build/gcc'
.
.
.
/opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build/./prev-gcc/xgcc
-B/opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build/./prev-gcc/
-B/opt/bw/sparc-sun-solaris2.8/bin/ -B/opt/bw/sparc-sun-solaris2.8/bin/
-B/opt/bw/sparc-sun-solaris2.8/lib/ -isystem
/opt/bw/sparc-sun-solaris2.8/include -isystem
/opt/bw/sparc-sun-solaris2.8/sys-include -g -O2 -DIN_GCC -W -Wall
-Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -Wold-style-definition -Wc++-compat
-DHAVE_CONFIG_H -static-libstdc++ -static-libgcc -o cc1 c-lang.o
c-family/stub-objc.o attribs.o c-errors.o c-decl.o c-typeck.o c-convert.o
c-aux-info.o c-objc-common.o c-parser.o tree-mudflap.o c-family/c-common.o
c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o
c-family/c-gimplify.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o
c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o
c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o
sol2-c.o \
cc1-checksum.o main.o libbackend.a ../libcpp/libcpp.a
../libdecnumber/libdecnumber.a ../libcpp/libcpp.a ./../intl/libintl.a
../libiberty/libiberty.a ../libdecnumber/libdecnumber.a
-L/opt/bw/lib/sparcv8 -lmpc -lmpfr -lgmp -ldl -liconv -L../zlib -lz
/opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build/./prev-gcc/xgcc
-B/opt/bw/src/GCC/gcc-4.6.2-RC-20111019-build/./prev-gcc/
-B/opt/bw/sparc-sun-solaris2.8/bin/ -B/opt/bw/sparc-sun-solaris2.8/bin/
-B/opt/bw/sparc-sun-solaris2.8/lib/ -isystem
/opt/bw/sparc-sun-solaris2.8/include -isystem
/opt/bw/sparc-sun-solaris2.8/sys-include -c -g -O2 -DIN_GCC -W
-Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -Wold-style-definition -Wc++-compat
-DHAVE_CONFIG_H -I. -I. -I../../gcc-4.6.2-RC-20111019/gcc
-I../../gcc-4.6.2-RC-20111019/gcc/.
-I../../gcc-4.6.2-RC-20111019/gcc/../include -I./../intl
-I../../gcc-4.6.2-RC-20111019/gcc/../libcpp/include -I/opt/bw/include
-I../../gcc-4.6.2-RC-20111019/gcc/../libdecnumber
-I../../gcc-4.6.2-RC-20111019/gcc/../libdecnumber/dpd -I../libdecnumber
../../gcc-4.6.2-RC-20111019/gcc/gcov.c -o gcov.o
.
.
.
etc etc and life goes on.
Seems as if -liconv got dropped somewhere and that was what was needed.
Did I miss something here ?
Dennis clarke
--
--
http://pgp.mit.edu:11371/pks/lookup?op=vindex&search=0x1D936C72FA35B44B
+-------------------------+-----------------------------------+
| Dennis Clarke | Solaris and Linux and Open Source |
| dclarke@blastwave.org | Respect for open standards. |
+-------------------------+-----------------------------------+