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

Fernando de Oliveira famobr at yahoo.com.br
Sun Jan 25 09:31:50 PST 2015

I am almost ready to close ticket #6058:



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:


Can be easily reproduced:

$ cat > conftest.c << "EOF"
int main() { return 0; }
$ 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:


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 \

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

Again, any collaboration is welcome and much appreciated.



More information about the blfs-dev mailing list