Subject: Re: solaris/gcc problem
To: Manuel Bouyer <>
From: Pierre Bourgin <>
List: tech-pkg
Date: 02/08/2004 21:07:19

I had the same problem with gcc-3.3.2 from SunFreeware a few days ago ...

I found that /usr/local/lib/ does not exist, but 
/usr/local/lib/ has a link for works !

% ls -l /usr/local/lib/
/usr/local/lib/ ->

I don't know exactly what's the problem, since I did not have to spend 
on it. It was the only quirk solution, since is one of the 
only .so file provided with gcc-3.3.2 from SunFreeware ...

I also noticed that some packages built in this way don't rely on 
/usr/local/lib/, but I don't remember which (I can retrieve 
this information if it's matter).

Concerning Solaris8/gcc-3.3.2, I also noticed that pkgsrc (24jan04) 
heavily rely on /usr/ucblib listed in LD_LIBRARY_PATH ... does it come 
from gcc-3.3.2 or pkgsrc ? I don't know.

just my 2 cents.

Pierre Bourgin

Manuel Bouyer a écrit:
> Hi,
> I'm trying to build misc/less from a current pkgsrc, after installing
> gcc3-c (from the same pkgsrc). I have USE_GCC3 set in /etc/mk.conf.
> The build dies with:
> checking for sparc64-sun-solaris2-gcc... gcc
> checking for C compiler default output... configure: error: C compiler cannot create executables
> config.log says:
> configure:1599: checking for C compiler default output
> configure:1602: gcc -O -I/usr/local/include   -I/usr/local/include   -Lnot_found
> -Wl,-Rnot_found -L/usr/local/gcc/lib -Wl,-R/usr/local/gcc/lib -L/usr/local/lib -
> l,-R/usr/local/lib conftest.c  >&5
> ld: fatal: library -lgcc: not found
> ld: fatal: library -lgcc_eh: not found
> ld: fatal: library -lgcc: not found
> ld: fatal: library -lgcc_eh: not found
> ld: fatal: File processing errors. No output written to a.out
> collect2: ld returned 1 exit status
> (I don't from where these "not_found" come from).
> work/.work.log says:
> /usr/local/bin/gcc --version
> /usr/local/bin/gcc -v
> /usr/local/bin/gcc -V
> /usr/local/bin/gcc -O -I/local/metal1/pkgbuild/misc/less/work.metal/.buildlink/include -I/local/metal1/pkgbuild/misc/less/work.metal/.buildlink/include -Lnot_found -Wl,-Rnot_found -L/local/metal1/pkgbuild/misc/less/work.metal/.buildlink/gcc/lib -Wl,-R/usr/local/gcc/lib -L/local/metal1/pkgbuild/misc/less/work.metal/.buildlink/lib -Wl,-R/usr/local/lib conftest.c
> /usr/ccs/bin/as -Qy -s -xarch=v9 -o /var/tmp//ccYnsi1s.o /var/tmp//ccAPeykL.s
> /usr/ccs/bin/ld -Y P,/usr/lib/sparcv9 -Qy /usr/local/gcc3/lib/gcc-lib/sparc64-sun-solaris2/3.3.2/crt1.o /usr/local/gcc3/lib/gcc-lib/sparc64-sun-solaris2/3.3.2/crti.o /usr/ccs/lib/sparcv9/values-Xa.o /usr/local/gcc3/lib/gcc-lib/sparc64-sun-solaris2/3.3.2/crtbegin.o -Lnot_found -L/local/metal1/pkgbuild/misc/less/work.metal/.buildlink/gcc/lib -L/local/metal1/pkgbuild/misc/less/work.metal/.buildlink/lib -L/local/metal1/pkgbuild/misc/less/work.metal/.buildlink/gcc3/lib/gcc-lib/sparc64-sun-solaris2/3.3.2 -L/usr/ccs/bin -L/usr/ccs/lib/sparcv9 -L/usr/ccs/lib -L/local/metal1/pkgbuild/misc/less/work.metal/.buildlink/gcc3/lib/gcc-lib/sparc64-sun-solaris2/3.3.2/../../../sparcv9 -L/local/metal1/pkgbuild/misc/less/work.metal/.buildlink/gcc3/lib/gcc-lib/sparc64-sun-solaris2/3.3.2/../../.. -L/lib/sparcv9 -L/usr/lib/sparcv9 -R/usr/local/gcc3/lib -Rnot_found -R/usr/local/gcc/lib -R/usr/local/lib /var/tmp//ccYnsi1s.o -lgcc -lgcc_eh -lc -lgcc -lgcc_eh -lc /usr/local/gcc3/lib/gcc-lib/sparc64-s
un-solaris2/3.3.2/crtend.o /usr/local/gcc3/lib/gcc-lib/sparc64-sun-solaris2/3.3.2/crtn.o
> The problem seems to be that work/.buildlink/lib is empty.
> Any idea ?