Subject: Re: pkgsrc/Solaris: LD_LIBRARY_PATH
To: John Nemeth <>
From: Mehul N. Sanghvi <>
List: pkgsrc-users
Date: 08/04/2007 10:24:24
John Nemeth said the following on 8/4/2007 8:12 AM:
> On Dec 24,  5:34pm, "Mehul N. Sanghvi" wrote:
> } Tobias Nygren said the following on 8/3/2007 9:11 PM:
>      I'm guessing that this compiler came from sunfreeware and it is
> what was used to compile the one in /usr/pkg/gcc3/bin/gcc.  I have seen
> this problem in the past.  Basically, the version of GCC from
> sunfreeware generates code that requires libiconv for some reason.  My
> solution was to use the sunfreeware GCC to build my own GCC.  This GCC
> required libiconv, but generated code that didn't.  So, I then used
> this GCC to rebuild itself thus creating a version of GCC that didn't
> require libiconv.  A royal pain in the neck to have to build GCC twice,
> but it works.  Try setting LD_LIBRARY_PATH then doing 'make && make
> upgrade' in lang/gcc3 to rebuild GCC.  Hopefully, the new version won't
> require libiconv.  The reason for doing the plain 'make' first is that
> one of the first things 'make upgrade' does is to delete the existing
> package which would be a bit of a problem.

The /usr/pkg/gcc3/bin/gcc is from a binary download site for Solaris/SPARC:


So maybe they used the one from sunfreeware.  Not sure.

I tried doing what you suggested but the "make upgrade" part fails:

% bmake upgrade
bmake: don't know how to make upgrade. Stop

bmake: stopped in /usr/pkgsrc/lang/gcc3-c

The first part of your suggestion (make && make upgrade)  worked just fine, in 
that it built a gcc.

Although at this point I think it might not work anyway since my pkg_install is 
broken as well.  I did a "bmake replace" on it, and of course it removed the 
original pack first and then the build for it failed (something about O_RDONLY 
not being found).  Wonder if that would give me the error I'm seeing with doing 
a "bmake upgrade".



Mehul N. Sanghvi