From owner-freebsd-amd64@FreeBSD.ORG Wed Apr 27 19:21:17 2005 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 64B3F16A4CE for ; Wed, 27 Apr 2005 19:21:17 +0000 (GMT) Received: from obsecurity.dyndns.org (CPE0050040655c8-CM00111ae02aac.cpe.net.cable.rogers.com [69.194.102.111]) by mx1.FreeBSD.org (Postfix) with ESMTP id F3E9043D49 for ; Wed, 27 Apr 2005 19:21:16 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id EA2C0513A7; Wed, 27 Apr 2005 12:21:12 -0700 (PDT) Date: Wed, 27 Apr 2005 12:21:12 -0700 From: Kris Kennaway To: Michael Hopkins Message-ID: <20050427192112.GA30646@xor.obsecurity.org> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="W/nzBZO5zC0uMSeA" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i cc: "freebsd-amd64@freebsd.org" Subject: Re: Shared library relocation R_X86_64_32 solution on amd64? X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Apr 2005 19:21:17 -0000 --W/nzBZO5zC0uMSeA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 27, 2005 at 10:23:39AM +0100, Michael Hopkins wrote: >=20 >=20 > Hi all >=20 > I have been doing some research about why gnustep-base won't link on amd6= 4. > It seems as if the problem I am getting here is quite common. > ------------------------------------------------------------------------ > gmake[1]: Leaving directory > `/usr/home/mwh/Coding/Obj-C/gnustep/core/base/Source' > Making all in SSL... > gmake[1]: Entering directory > `/usr/home/mwh/Coding/Obj-C/gnustep/core/base/SSL' > Making all for bundle SSL... > Creating SSL.bundle/amd64/freebsd/gnu-gnu-gnu... > Compiling file GSSSLHandle.m ... > Linking bundle SSL ... > /usr/bin/ld: /usr/lib/libobjc.a(Protocol.o): relocation R_X86_64_32 can n= ot > be used when making a shared object; recompile with -fPIC > /usr/lib/libobjc.a: could not read symbols: Bad value > gmake[2]: *** [SSL.bundle/amd64/freebsd/gnu-gnu-gnu/SSL] Error 1 > gmake[1]: *** [SSL.all.bundle.variables] Error 2 > gmake[1]: Leaving directory > `/usr/home/mwh/Coding/Obj-C/gnustep/core/base/SSL' > gmake: *** [internal-all] Error 2 > ------------------------------------------------------------------------ >=20 > It has been mentioned a few times on this list: my understanding of this > issue is that you can't link to shared libraries unless they have been > compiled with -fPIC. Is that right? Yes, and libobjc.a isn't a shared library, so you can't link it into one. > continue. >=20 > I have two main questions in this post. >=20 > 1) What installs libobjc.a? I want to reinstall it with CFLAGS +=3D -fPI= C. I > assumed that it was installed by gcc-objc but after reinstalling that with > -fPIC the libobjc.a library was untouched! Since it's in /usr/lib, it's part of the base system. We don't seem to install a shared library version of that, so you should talk to kan@. > 2) What is the standard method for dealing with this problem on amd64? I= 'm > sure it will hit a lot of people on many different ports and if it's a ti= er > 1 platform then don't we need to have a proper strategy for dealing with > this? Well, yeah, there is a proper strategy. "Link shared objects to shared libraries". Kris --W/nzBZO5zC0uMSeA Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQFCb+YoWry0BWjoQKURAnXDAJ0UBlr1rUd1ul1BEbOlOV8Nk2hX/gCg5S7l /dvni2iosRpVLqfJS+rPGXg= =3m40 -----END PGP SIGNATURE----- --W/nzBZO5zC0uMSeA--