[systemd-devel] Compilation with gcc-4.9 fails

Cristian Rodríguez crrodriguez at opensuse.org
Tue Apr 22 19:06:15 PDT 2014


El 22/04/14 20:05, Jan Engelhardt escribió:
>
> On Monday 2014-03-03 07:51, Jan Engelhardt wrote:
>>
>> When building with GCC 4.9.0 [svn r208221], then the following happens:
>> [...]
>> $ nm src/libsystemd/sd-bus/.libs/libsystemd_la-sd-bus.o
>> 0000000000000001 C __gnu_lto_slim
>> 0000000000000001 C __gnu_lto_v1
>> $ make
>> [...]
>>   CCLD     libgudev-1.0.la
>> /usr/bin/ld.gold: error: .libs/libgudev-1.0.ver:2:1: syntax error, unexpected LOCAL, expecting STRING or QUOTED_STRING or EXTERN
>> /usr/bin/ld.gold: fatal error: unable to parse version script file .libs/libgudev-1.0.ver
>> collect2: error: ld returned 1 exit status
>
> A workaround is to use
>
> 	./configure NM=gcc-nm-4.9
>
>
> Ultimately this is something for the libtool and/or gcc projects to
> tackle, systemd is not the culprit here.
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>

Complete workaround, you also have to export AR=gcc-ar-4.9
for systemd git head to build correctly without modification.

Still this pesky warning shows up everywhere..

/usr/include/bits/poll2.h: In function 'bus_poll':
/usr/include/bits/poll2.h:71:2: warning: call to '__ppoll_chk_warn' 
declared with attribute warning: ppoll called with fds buffer too small 
file nfds entries [enabled by default]
   return __ppoll_chk (__fds, __nfds, __timeout, __ss, __bos (__fds));


happens with lto enabled only.. guess it is another compiler bug..
-- 
Cristian
"I don't know the key to success, but the key to failure is trying to 
please everybody."


More information about the systemd-devel mailing list