Skip to content
Prev 56715 / 63421 Next

configure script issue with -flto with recent gcc and system ar/ranlib

On 4/25/19 6:11 PM, Thomas K?nig wrote:
Thanks. I can reproduce with Leap 42.3 and gcc-8, the binutils ar fails 
with errors "plugin needed to handle lto object". This is because "ar" 
cannot find the LTO plugin liblto_plugin.so. The plugin needs to be in 
directory /usr/lib/bfd-plugins for ar/nm/ranlib to find it. On 42.3, gcc 
installation fails to create that directory and link its plugin there. I 
read that the problem is fixed in Leap 45. To work this around in Leap 
42.3, one may build R using the wrappers (AR=gcc-ar RANLIB=gcc-ranlib 
NM=gcc-nm) or create the link.

mkdir /usr/lib/bfd-plugins
ln -s /usr/lib64/gcc/x86_64-suse-linux/8/liblto_plugin.so 
/usr/lib/bfd-plugins

Similar wrappers exist also for LLVM, but I read that LLVM installation 
on Leap 42.3 links its plugin properly from /usr/lib/bfd-plugins.

Best
Tomas