Subject: Re: g++ does not find libgcc
To: Georg Schwarz <geos@epost.de>
From: grant beattie <grant@NetBSD.org>
List: tech-pkg
Date: 03/31/2004 08:23:24
--R6XNva+j4+N/cnqI
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=
PILER
> 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.
>=20
> /usr/local/pkg/gcc-2.95.3/bin/g++ should be usable as a standalone as wel=
l,
> 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.
grant.
--R6XNva+j4+N/cnqI
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)
iD8DBQFAafNcluYOb9yiFXoRArSgAJ4tBWwTg+o705N2Ey6NIf3QqK52IwCgi3zl
17OtVstIQDawe4ChdcBGQDY=
=NV0d
-----END PGP SIGNATURE-----
--R6XNva+j4+N/cnqI--