Subject: gcc failed to build
To: None <tech-pkg@NetBSD.org>
From: David Wilson <dave@overbearing.org>
List: tech-pkg
Date: 10/16/2004 16:09:01
Greetings,
I am trying to install gcc from pkgsrc, with little success. The C and C++ compilers look like they where installed, after editing the Makefile to remove gcc-java, fortran, and objectiveC. However, the compilers were put in directory:
/usr/pkg/gcc3/bin/
not in:
/usr/pkg/bin/
as per:
http://www.netbsd.org/Documentation/pkgsrc/using.html
<BLOCKQUOTE>
After you've installed packages, be sure to have /usr/pkg/bin in your PATH so you can actually start the just installed program.
</BLOCKQUOTE>
I can make symlinks to get installed packages in subdirectories to work, but it defeats the purpose of usuing a package managment system. If I am required to add a new path element each time I add a new package, then, I can use gnu stow to manage the symlinks, but this creates another layer of administrative dificulty to manage.
This is a record of what looks like a sucsessful installation of C and C++ after removing the languages that did not install. The method I used to do this was:
1) get gcc and iconv from sunfreeware. I did this because the recommeneded bootstrap and install of gcc in binary form was denied:
ncftp ftp://ftp.netbsd.org/pub/pkgsrc/packages/
ncftp /pub/pkgsrc/packages > ls -la
total 1
drwxrwxr-x 5 234 netbsd 512 Sep 28 16:37 .
drwxr-xr-x 6 234 netbsd 512 Sep 20 21:22 ..
drwxrwxr-x 3 1287 netbsd 512 Sep 28 16:37 IRIX-6.5
drwxrwxr-x 3 1133 netbsd 512 Oct 8 19:23 Interix-3.5
lrwxrwxr-x 1 234 netbsd 25 Aug 3 14:39 NetBSD-1.5 -> ../../NetBSD/packages/1.5
lrwxrwxr-x 1 234 netbsd 27 Aug 3 14:39 NetBSD-1.5.1 -> ../../NetBSD/packages/1.5.1
lrwxrwxr-x 1 234 netbsd 27 Aug 3 14:39 NetBSD-1.5.2 -> ../../NetBSD/packages/1.5.2
lrwxrwxr-x 1 234 netbsd 27 Aug 3 14:39 NetBSD-1.5.3 -> ../../NetBSD/packages/1.5.3
lrwxrwxr-x 1 234 netbsd 25 Aug 3 14:39 NetBSD-1.6 -> ../../NetBSD/packages/1.6
lrwxrwxr-x 1 234 netbsd 27 Aug 3 14:39 NetBSD-1.6.1 -> ../../NetBSD/packages/1.6.1
lrwxrwxr-x 1 234 netbsd 27 Aug 3 14:39 NetBSD-1.6.2 -> ../../NetBSD/packages/1.6.2
drwxrws--- 3 1284 netbsd 512 Jan 22 2004 SunOS-5.9
ncftp /pub/pkgsrc/packages > cd SunOS-5.9/
Could not chdir to SunOS-5.9/: server said: SunOS-5.9: Permission denied.
2) get the solaris bootstrap kit. Are you guys aware that a bogus version of the pkgsrc material is in circulation? I started this project by installing pkgsrc from this site:
http://solarpack.sourceforge.net/
the howto and the repositories are out of date and in one case give conflicting advice with the official site. it is now (I think) correctly configured (see below for environment variables).
3) edit Makefile
4) run make install
[otto gcc3]# bmake distclean
===> Cleaning for gcc3-3.3.4
===> Dist cleaning for gcc3-3.3.4
[root@otto gcc3]# bmake install
===> Checking for vulnerabilities in gcc3-3.3.4
===> Extracting for gcc3-3.3.4
===> Required installed package gcc3-c-3.3.4{,nb*}: gcc3-c-3.3.4 found
===> Required installed package gcc3-c++-3.3.4{,nb*}: gcc3-c++-3.3.4 found
===> Required installed package patch>=2.2: patch-2.5.4nb2 found
===> Patching for gcc3-3.3.4
===> Overriding tools for gcc3-3.3.4
===> Creating toolchain wrappers for gcc3-3.3.4
===> Installing for gcc3-3.3.4
===> Registering installation for gcc3-3.3.4
gcc3-3.3.4 requires installed package gcc3-c++-3.3.4
gcc3-3.3.4 requires installed package gcc3-c-3.3.4
[root@otto gcc3]# gcc --version
gcc (GCC) 3.3.2
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[root@otto gcc3]# /usr/pkg/bin/gcc
bash: /usr/pkg/bin/gcc: No such file or directory
[root@otto gcc3]# find / -name gcc
/usr/pkg/gcc3/bin/gcc
/usr/local/bin/gcc
[root@otto bin]# /usr/pkg/gcc3/bin/gcc --version
gcc (GCC) 3.3.4
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This is what happens when I try to run bmake install in /usr/pkgsrc/lang/gcc3 (with the default Makefile)
checking for iconv... yes
checking for iconv declaration...
extern size_t iconv (iconv_t cd, const char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
./configure: test: argument expected
gmake: *** [configure-target-libjava] Error 1
*** Error code 2
Stop.
bmake: stopped in /usr/pkgsrc/lang/gcc3-java
*** Error code 1
Stop.
bmake: stopped in /usr/pkgsrc/lang/gcc3-java
*** Error code 1
Stop.
bmake: stopped in /usr/pkgsrc/lang/gcc3-java
*** Error code 1
Stop.
bmake: stopped in /usr/pkgsrc/lang/gcc3
*** Error code 1
Stop.
bmake: stopped in /usr/pkgsrc/lang/gcc3
I installed iconv by bmake install in /usr/pkgsrc/converters/libiconv
my environment is as follows:
[root@otto pkgsrc]# 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
COLUMNS=125
CONFIG_SHELL=/bin/ksh
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/lib:/usr/local/lib
LINES=83
LOGNAME=root
MACHTYPE=sparc-sun-solaris2.9
MAIL=/var/mail/root
MAILCHECK=60
OLDPWD=/usr/pkgsrc/converters
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]="130")
PPID=17967
PS1=$'[\\u@\\h \\W]\\$ '
PS2=$'> '
PS4=$'+ '
PWD=/usr/pkgsrc
SHELL=/sbin/sh
SHELLOPTS=braceexpand:hashall:histexpand:monitor:history:interactive-comments:emacs
SHLVL=1
TERM=xterm
TZ=US/Pacific
UID=0
_=iconv
Can Anybody help me with these problems?
Regards,
-David Wilson