[blfs-dev] Stunnel-5.10 configure: problem with ld from Binutils-2.24

Pierre Labastie pierre.labastie at neuf.fr
Sun Jan 25 12:12:32 PST 2015


Le 25/01/2015 18:31, Fernando de Oliveira a écrit :
> I am almost ready to close ticket #6058:
> 
> stunnel-5.10
> 
> http://wiki.linuxfromscratch.org/blfs/ticket/6058#comment:2
> 
> There was a problem, now solved, but I need more info, because it may
> not happen in all (B)LFS systems, perhaps only in those with
> Binutils-2.24. LFS-svn is now using Binutils-2.25.
> 
> In the following, I describe with more detail the error, how to test if
> your system has the problem, a patch for Binutils-2.24. I also ask for
> some info in more detail.
> 
> Thanks in advance for the collaboration.
> 
> Configure error:
> 
> {{{
> checking for objdir... .libs
> checking if gcc supports -fno-rtti -fno-exceptions... no
> checking for gcc option to produce PIC... -fPIC -DPIC
> checking if gcc PIC flag -fPIC -DPIC works... yes
> checking if gcc static flag -static works... *** Error in `/usr/bin/ld':
> corrupted double-linked list: 0x08a277a0 ***
> }}}
> 
> This error is well known:
> 
> https://sourceware.org/bugzilla/show_bug.cgi?id=16428
> 
> Can be easily reproduced:
> 
> $ cat > conftest.c << "EOF"
> int main() { return 0; }
> EOF
> $ gcc -fPIE -pie -static conftest.c
> *** Error in `/usr/bin/ld': corrupted double-linked list: 0x09ce5488 ***
> 
> Problem is the use of "-pie -static". They seem to be incompatible with
> each other.
> 
> Back to stunnel, found at config.log:
> $ grep pie config.log | grep static
> LDFLAGS=' -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -static'
> 
> After some search, I found the part of configure that performs the
> "static flag" test. We encourage to disable static, so, this test is not
> important for BLFS. I disabled it:
> 
> sed -i '10542,10567s/^/# /' configure
> 
> Problem is gone and installed package works fine!!!
> 
> After some reading, I understand that the problem is not with
> Stunnel-5.10, but with Binutils-2.24.
> 
> There is a patch for Binutils to avoid that error:
> 
> https://sourceware.org/ml/binutils/2014-01/msg00080.html
> 
> Don't know if this is fixed in Binutils-2.25.
> 
> The only required dependency for stunnel is OpenSSL, so, it would be
> appreciated if someone could make the simple test above and also run
> 
> ./configure --prefix=/usr        \
>             --sysconfdir=/etc    \
>             --localstatedir=/var \
>             --disable-systemd
> 
> for Stunnel-5.10.
> 
> For the book, it is necessary to confirm that the problem is really with
> Binutils-2.24. Also, it is important to know if the problem has gone
> with Binutils-2.25. These results will be in the updated page.
> 
> I'm using gcc-4.9.2, i686. Apparently, the problem is architecture
> independent.
> 
> Again, any collaboration is welcome and much appreciated.
> 
> Thanks.
> 

Tested on an i686 VM, gcc-4.9.2, binutils-2.25: everything seems OK (program
installed but not tested).

The interesting (not so actually) story is with x86_64: the test fails silently:
---------------------------
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
--------------------------
Since we do not want static libraries, the package builds fine.


Pierre


More information about the blfs-dev mailing list