Subject: Re: g++ does not find libgcc
To: Georg Schwarz <>
From: grant beattie <>
List: tech-pkg
Date: 03/31/2004 08:23:24
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Mar 28, 2004 at 08:41:18PM +0200, Georg Schwarz wrote:

> However, it does work only if PKGSRC_COMPILER is not set. Once PKGSRC_COM=
> is set, that compiler is being used regardless of the GCC_REQD setting.
> Also, CC_VERSION is not set correctly. It reads gcc-0. I would have
> expected it to be gc-2.95.3. Could it be that buildlink expects gcc to
> be in the shell path? fakes the version number early on in the process so that
you can match on eg. CC_VERSION:Mgcc*

you should see the right value if you "make show-var VARNAME=3DCC_VERSION
PKG_PHASE=3Dbuild", I think.

buildlink actually prepends the path to the compiler wrappers in the
configure and build phases. setting PKGSRC_COMPILER=3Dgcc and
GCC_REQD=3D2.95 should work, as they are designed to work together.
indeed PKGSRC_COMPILER defaults to 'gcc' if otherwise undefined.

> > pkgsrc has a compiler framework in mk/compiler which is designed to
> > handle the location of gcc libraries and amongst other things.
> /usr/local/pkg/gcc-2.95.3/bin/g++ should be usable as a standalone as wel=
> shouldn't it?

as well as a standalone gcc installation will work, yes. out of the
box, gcc's spec file doesn't add the rpath required to find shared
libraries. in the case of 2.95.x, that's only libstdc++.

mk/compiler/ has smarts to add the right rpath based on which
version of gcc is being used.


Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.2.4 (NetBSD)