apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <jor...@redhat.com>
Subject Re: 64-bit build errors
Date Mon, 02 Jan 2006 12:20:49 GMT
On Wed, Dec 28, 2005 at 07:17:46PM -0600, Daniel May wrote:
> I was able to successfully build APR on Red Hat EL 4.  I have a shared
> library I am trying to build that is linking in APR statically.  I get
> the following error:
> /usr/bin/ld: /usr/local/apr/lib/libapr-1.a(apr_strings.o): relocation
> R_X86_64_32 against `a local symbol' can not  be used when making a
> shared object; 
> recompile with -fPIC
> /usr/local/apr/lib/libapr-1.a: could not read symbols: Bad value
> If I link against the shared APR lib it works fine.  I included -fPIC in
> my make, but it did not help.

You used -fPIC when building what, your library or APR?  If you want to 
link APR statically into a shared library (though this is generally a 
pretty bad idea), you need to build APR with -fPIC, e.g. using:

  CFLAGS="-fPIC" ./configure ..



View raw message