[blfs-support] Cyrus SASL compilation error

Ken Moffat zarniwhoop at ntlworld.com
Fri Mar 7 15:19:43 PST 2014

On Fri, Mar 07, 2014 at 10:47:01PM +0100, Armin K. wrote:
> On 03/07/2014 10:04 PM, Ken Moffat wrote:
> > 
> >  And looking back, we had CFLAGS=-fPIC at the end of configure in
> > BLFS-7.4, but without an explanation.
> > 
> >  It fell out in r12739 when Fernando applied a fix from Armin.  The
> > fPIC seems to have come in at r11674, amongst some tagging for 7.4.
> > I'll put it back, and add an explanation.
> I still can't reproduce it. I have -fPIC in my cflags even if I don't
> specify them.
 It occurred to me that the patch might have been intended to solve
this, so I double-checked in a manual build - no CFLAGS, no log -
and saw the error.
> make[2]: Entering directory '/home/armin/src/cyrus-sasl-2.1.26/sasldb'
> /bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.
> -I..  -I../include -I../include  -DOBSOLETE_CRAM_ATTR=1  -Wall -W -g -O2
> -MT allockey.lo -MD -MP -MF .deps/allockey.Tpo -c -o allockey.lo allockey.c
> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include
> -I../include -DOBSOLETE_CRAM_ATTR=1 -Wall -W -g -O2 -MT allockey.lo -MD
> -MP -MF .deps/allockey.Tpo -c allockey.c  -fPIC -DPIC -o .libs/allockey.o
> mv -f .deps/allockey.Tpo .deps/allockey.Plo

 I too noticed that -fPIC that -DPIC, but apparently it wasn't used
for the static lib which caused the problem.
> /bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.
> -I..  -I../include -I../include  -DOBSOLETE_CRAM_ATTR=1  -Wall -W -g -O2
> -MT db_berkeley.lo -MD -MP -MF .deps/db_berkeley.Tpo -c -o
> db_berkeley.lo db_berkeley.c
> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include
> -I../include -DOBSOLETE_CRAM_ATTR=1 -Wall -W -g -O2 -MT db_berkeley.lo
> -MD -MP -MF .deps/db_berkeley.Tpo -c db_berkeley.c  -fPIC -DPIC -o
> .libs/db_berkeley.o
> mv -f .deps/db_berkeley.Tpo .deps/db_berkeley.Plo
> /bin/sh ../libtool  --tag=CC   --mode=link gcc  -Wall -W -g -O2   -o
> libsasldb.la  allockey.lo db_berkeley.lo -ldb -lresolv
> libtool: link: ar cru .libs/libsasldb.a .libs/allockey.o
> .libs/db_berkeley.o
> libtool: link: ranlib .libs/libsasldb.a
> libtool: link: ( cd ".libs" && rm -f "libsasldb.la" && ln -s
> "../libsasldb.la" "libsasldb.la" )
 I see that in a later mail you pointed to a patch.  I _like_ patches
(easy to see if they still apply - if in any doubt use 'git apply')
but BLFS prefers to use simple things like sed, so I assume that
specifying CFLAGS= will meet with more approval.

das eine Mal als Tragödie, dieses Mal als Farce

More information about the blfs-support mailing list