On Fri, Mar 07, 2014 at 04:17:29PM +0100, Sergei Antonov wrote:
> Hello!
> I follow this instruction to build Cyrus SASL-2.1.26:
> http://www.linuxfromscratch.org/blfs/view/svn/postlfs/cyrus-sasl.html
> 
> "make -j1" results in a link error about PIC:
> 
> libtool: link: gcc -shared  -fPIC -DPIC  .libs/sasldb.o
> .libs/sasldb_init.o .libs/plugin_common.o  -Wl,--whole-archive
> ../sasldb/.libs/libsasldb.a -Wl,--no-whole-archive  -ldb -lresolv  -O2
>   -Wl,-soname -Wl,libsasldb.so.3 -o .libs/libsasld
> b.so.3.0.0
> /usr/bin/ld: ../sasldb/.libs/libsasldb.a(allockey.o): relocation
> R_X86_64_32 against `.rodata.str1.1' can not be used when making a
> shared object; recompile with -fPIC
> ../sasldb/.libs/libsasldb.a(allockey.o): could not read symbols: Bad value
> collect2: error: ld returned 1 exit status
> 
> What may cause this?
> 
 The cause is as it says.  On 32-bit x86 you can build shared
objects using static libs compiled without -fPIC, on 64-nit x86 you
cannot.  I guess that whoever originally updated the book was using
i686.  Once upon a time, many packages had similar problems, but most
have now been fixed upstream.

 I did notice that I build it by passing CFLAGS=-fPIC at the end of
my configure command, but I forgot to check if that was necessary
(it isn't a package I _use_).

 My bad, seems something like that _is_ needed on x86_64.
> 
> And a slight correction: && is missing after "pushd saslauthd" and
> "popd" build commands.

 Yes, for consistency.

 Unless anyone else is interested I'll take a look, maybe some time
this weekend.

ĸen
-- 
das eine Mal als Tragödie, dieses Mal als Farce
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to