From owner-freebsd-questions@FreeBSD.ORG Wed Mar 7 22:25:34 2012 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EB38106566C for ; Wed, 7 Mar 2012 22:25:34 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr1.xs4all.nl (smtp-vbr1.xs4all.nl [194.109.24.21]) by mx1.freebsd.org (Postfix) with ESMTP id 996128FC08 for ; Wed, 7 Mar 2012 22:25:33 +0000 (UTC) Received: from slackbox.erewhon.net (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr1.xs4all.nl (8.13.8/8.13.8) with ESMTP id q27M9N0l026392; Wed, 7 Mar 2012 23:09:24 +0100 (CET) (envelope-from rsmith@xs4all.nl) Received: by slackbox.erewhon.net (Postfix, from userid 1001) id 8AFF412344; Wed, 7 Mar 2012 23:09:23 +0100 (CET) Date: Wed, 7 Mar 2012 23:09:23 +0100 From: Roland Smith To: Doug Hardie Message-ID: <20120307220923.GB72419@slackbox.erewhon.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+g7M9IMkV8truYOl" Content-Disposition: inline In-Reply-To: X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: "questions@FreeBSD.org" Subject: Re: Dynamic Libraries X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 22:25:34 -0000 --+g7M9IMkV8truYOl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 07, 2012 at 12:53:13AM -0800, Doug Hardie wrote: > All this works just fine on i386. However, when I compile everything on > AMD64 I get an error message that says the lower level library needs to be > compiled with fPIC. If I add that to the Makefile for the lower level > library and rebuild everything, it all works again. I don't understand w= hy > the fPIC is required for AMD64. It is a requirement of the architecture. It is explained e.g. in:=20 http://www.technovelty.org/code/c/amd64-pic.html =20 > Also, how do I tell if the lower level library is being dynamically linked > at run time, or being directly incorporated into the mid level library or > top level application?=20 Examine the application with 'ldd -a '. That will give you a list of all dynamic objects used by an application, and for each of those dynamic objects the dynamic objects that they depend on. See ldd(1). If your low-level libraries don't show up in that, they are not dynamically loaded. Roland --=20 R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) --+g7M9IMkV8truYOl Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk9X3JMACgkQEnfvsMMhpyUKYACglkPqvBeSOFGVmLue0hdfEJih yjkAoKcaMeKn/7zGjC1ipt0K/fkShcbb =fxd+ -----END PGP SIGNATURE----- --+g7M9IMkV8truYOl--