GNU bug report logs - #17750
libtool strips fcilkplus and sanitizer flags

Previous Next

Package: libtool;

Reported by: Julian Taylor <jtaylor.debian <at> googlemail.com>

Date: Tue, 10 Jun 2014 20:23:01 UTC

Severity: normal

To reply to this bug, email your comments to 17750 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-libtool <at> gnu.org:
bug#17750; Package libtool. (Tue, 10 Jun 2014 20:23:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Julian Taylor <jtaylor.debian <at> googlemail.com>:
New bug report received and forwarded. Copy sent to bug-libtool <at> gnu.org. (Tue, 10 Jun 2014 20:23:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Julian Taylor <jtaylor.debian <at> googlemail.com>
To: bug-libtool <at> gnu.org
Subject: libtool strips fcilkplus and sanitizer flags
Date: Tue, 10 Jun 2014 22:10:41 +0200
[Message part 1 (text/plain, inline)]
hi,
gcc-4.9 now supports cilkplus with the -fcilkplus flag.
libtool strips this flag from LDFLAGS leading to an wrongly linked library.
To reproduce choose a random libtool based project (e.g. libmatheval)
and add this function in a random file (e.g. lib/node.c):


#include <cilk/cilk.h>
int n(char * a)
{
a = cilk_spawn atoi(a);
return a;
}


then configure build with:
./configure  CFLAGS="-fcilkplus" LDFLAGS="-fcilkplus" CC=gcc-4.9


during linking -fcilkplus is not used and the library is underlinked
root <at> ubuntu:/libmatheval-1.1.11+dfsg# ldd -r ./lib/.libs/libmatheval.so
	linux-vdso.so.1 (0x00007fffccdc4000)
	/usr/lib/libeatmydata/libeatmydata.so (0x00007eff50cfd000)
	/usr/lib/cowdancer/libcowdancer.so (0x00007eff50af9000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007eff507f3000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007eff5044a000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007eff50246000)
	/lib64/ld-linux-x86-64.so.2 (0x00007eff5110f000)
undefined symbol: __cilkrts_rethrow	(./lib/.libs/libmatheval.so)
undefined symbol: __cilkrts_enter_frame_1	(./lib/.libs/libmatheval.so)
undefined symbol: __cilkrts_save_fp_ctrl_state	(./lib/.libs/libmatheval.so)
undefined symbol: __cilkrts_sync	(./lib/.libs/libmatheval.so)
undefined symbol: __cilkrts_leave_frame	(./lib/.libs/libmatheval.so)
undefined symbol: __cilkrts_enter_frame_fast_1	(./lib/.libs/libmatheval.so)

it needs to be linked against libcilkrts.so.5

This is identical to libtools stripping of fopenmp and the fix is the
same, add -fcilkplus to the whitelist.

Similar the new -fsanitizer= flags are stripped from LDFLAGS, they
should probably be added too.

Cheers,
Julian Taylor

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to bug-libtool <at> gnu.org:
bug#17750; Package libtool. (Fri, 03 May 2019 13:56:01 GMT) Full text and rfc822 format available.

Message #8 received at 17750 <at> debbugs.gnu.org (full text, mbox):

From: Vincent Lefevre <vincent <at> vinc17.net>
To: Julian Taylor <jtaylor.debian <at> googlemail.com>
Cc: 17750 <at> debbugs.gnu.org
Subject: Re: libtool strips fcilkplus and sanitizer flags
Date: Fri, 3 May 2019 15:55:53 +0200
Hi,

On 2014-06-10 22:10:41 +0200, Julian Taylor wrote:
> This is identical to libtools stripping of fopenmp and the fix is the
> same, add -fcilkplus to the whitelist.
> 
> Similar the new -fsanitizer= flags are stripped from LDFLAGS, they
> should probably be added too.

The -fsanitizer=* one was fixed in 2015, but there are still issues
due to the fact that -static-* options are not passed to the linker
(-static-libasan in my case).

I've posted a patch for both -fcilkplus and -static-* there:

  http://lists.gnu.org/archive/html/libtool-patches/2019-05/msg00000.html

For Debian users, it does not apply, and I've posted a specific
patch there:

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=751161#14

-- 
Vincent Lefèvre <vincent <at> vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)




This bug report was last modified 5 years and 3 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.