Subject: unable to build GCJ from pkgsrc
To: None <tech-pkg@netbsd.org>
From: None <pkgsrc@overbearing.org>
List: tech-pkg
Date: 01/20/2005 21:44:30
Dear NetBSD pkgsrc folks,
I am attempting to bootstrap GCC on Solaris 9 for sparc. Although I am able to use a precompiled version of GCC to compile a C compiler and several other languages, the compile fails for GCJ. This in itself is not such a problem because GCJ is not yet a fully functional java compiler, but because the library issue I am having will affect other software I want to build.
After making the following changes I am now able to finish configure for GCJ:
Exported environment variables:
CFLAGS=-liconv
C_INCLUDE_FLAGS=/usr/pkg/gcc3/lib/gcc-lib/sparc-sun-solaris2/3.3.4/include:/usr/pkg/gcc3/include:/usr/pkg/include:/usr/include
LD_LIBRARY_PATH=/usr/pkg/gcc3/lib:/usr/pkg/lib:/usr/lib
LIBRARY_PATH=/usr/pkg/gcc3/lib:/usr/pkg/lib:/usr/lib
I have crle as follows:
Configuration file [version 4]: /var/ld/ld.config
Default Library Path (ELF): /usr/pkg/gcc3/lib:/usr/pkg/lib:/usr/lib
Trusted Directories (ELF): /usr/lib/secure (system default)
The error message I am getting is like so:
gcc -g -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -L/usr/pkg/lib -L/usr/pkg/gcc3/lib -Wl,-R/usr/pkg/lib -Wl,-R/usr/pkg/gcc3/lib -o jc1 \
java/parse.o java/class.o java/decl.o java/expr.o java/constants.o java/lang.o java/typeck.o java/except.o java/verify.o java/zextract.o java/jcf-io.o java/win32-host.o java/jcf-parse.o java/mangle.o java/mangle_name.o java/builtins.o java/jcf-write.o java/buffer.o java/check-init.o java/jcf-depend.o java/jcf-path.o java/xref.o java/boehm.o java/java-tree-inline.o mkdeps.o main.o libbackend.a -lz -lintl ../libiberty/libiberty.a
Undefined first referenced
symbol in file
libiconv_close java/parse.o (symbol belongs to implicit dependency /usr/pkg/lib/libiconv.so.2)
libiconv_open java/parse.o (symbol belongs to implicit dependency /usr/pkg/lib/libiconv.so.2)
libiconv java/parse.o (symbol belongs to implicit dependency /usr/pkg/lib/libiconv.so.2)
ld: fatal: Symbol referencing errors. No output written to jc1
collect2: ld returned 1 exit status
gmake: *** [jc1] Error 1
*** Error code 2
Stop.
bmake: stopped in /usr/pkgsrc/lang/gcc3-java
*** Error code 1
Stop.
Below is my environment.
Please let me know what I am doing wrong? I would very much like to build GCC from pkgsrc.
Regards,
-David Wilson
[root@otto gcc3-java]# set
ANT_HOME=/usr/local/ant
BASH=/usr/bin/bash
BASH_VERSINFO=([0]="2" [1]="05" [2]="0" [3]="1" [4]="release" [5]="sparc-sun-solaris2.9")
BASH_VERSION=$'2.05.0(1)-release'
CC=gcc
CFLAGS=-liconv
COLUMNS=96
C_INCLUDE_PATH=/usr/pkg/gcc3/lib/gcc-lib/sparc-sun-solaris2/3.3.4/include:/usr/pkg/gcc3/include:/usr/pkg/include:/usr/include
DIRSTACK=()
EUID=0
GROUPS=()
HISTFILE=/root/.bash_history
HISTFILESIZE=50000
HISTSIZE=50000
HOME=/root
HOSTNAME=otto
HOSTTYPE=sparc
HZ=
IFS=$' \t\n'
JAVA_HOME=/usr/java
LD_LIBRARY_PATH=/usr/pkg/gcc3/lib:/usr/pkg/lib:/usr/lib
LIBRARY_PATH=/usr/pkg/gcc3/lib:/usr/pkg/lib:/usr/lib
LINES=71
LOGNAME=root
MACHTYPE=sparc-sun-solaris2.9
MAIL=/var/mail/root
MAILCHECK=60
OLDPWD=/root
OPTERR=1
OPTIND=1
OSTYPE=solaris2.9
OS_PLATFORM=sparc
OS_VERSION=5.9
PATH=/usr/pkg/bin:/usr/pkg/sbin:/usr/local/bin:/usr/ccs/bin:/usr/dt/bin:/usr/openwin/bin:/usr/sbin:/usr/local/sbin:/usr/bin:/usr/ucb:/etc:/usr/sfw/bin:/usr/local/ant/bin
PIPESTATUS=([0]="0")
PPID=2740
PS1=$'[\\u@\\h \\W]\\$ '
PS2=$'> '
PS4=$'+ '
PWD=/usr/pkgsrc/lang/gcc3-java
SHELL=/sbin/sh
SHELLOPTS=braceexpand:hashall:histexpand:monitor:history:interactive-comments:emacs
SHLVL=1
TERM=xterm
TZ=US/Pacific
UID=0