Subject: Re: g++ does not find libgcc
To: Georg Schwarz <email@example.com>
From: grant beattie <grant@NetBSD.org>
Date: 03/31/2004 08:23:24
Content-Type: text/plain; charset=us-ascii
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?
compiler.mk 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/gcc.mk has smarts to add the right rpath based on which
version of gcc is being used.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)
-----END PGP SIGNATURE-----