Duke4.net Forums: [FIXED] Compile error on Ubunt 12.10 - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[FIXED] Compile error on Ubunt 12.10  "LTO problem"

User is offline   Zagro 

#1

Using Ubuntu 12.10 and its gcc-4.7.2 I get this compile error for mapster32:

/usr/bin/ld: Warning: alignment 1 of symbol `symbols' in osd.o (symbol from plugin) is smaller than 4 in obj/common.o
engine.o (symbol from plugin): attenzione: memset used with constant zero length parameter; this could be due to transposed parameters
In file included from src/build.c:677:0,
                 from /usr/include/stdint.h:45,
                 from :473:
/usr/include/i386-linux-gnu/bits/stdio2.h: In function ‘kzaddstack’:
/usr/include/i386-linux-gnu/bits/stdio2.h:282:2: warning: call to ‘__fread_chk_warn’ declared with attribute warning: fread called with bigger size * nmemb than length of destination buffer [enabled by default]
In file included from src/build.c:4918:0,
                 from /usr/lib/gcc/i686-linux-gnu/4.7/include/stdarg.h:40,
                 from :102:
/usr/include/i386-linux-gnu/bits/stdio2.h: In function ‘kread’:
/usr/include/i386-linux-gnu/bits/stdio2.h:282:2: warning: call to ‘__fread_chk_warn’ declared with attribute warning: fread called with bigger size * nmemb than length of destination buffer [enabled by default]
In file included from src/polymost.c:1154:0,
                 from :167:
/usr/include/i386-linux-gnu/bits/stdio2.h: In function ‘suckbitsnextblock’:
/usr/include/i386-linux-gnu/bits/stdio2.h:282:2: warning: call to ‘__fread_chk_warn’ declared with attribute warning: fread called with bigger size * nmemb than length of destination buffer [enabled by default]
`gotpic' referenced in section `.text' of /tmp/ccFStfnO.ltrans5.ltrans.o: defined in discarded section `COMMON' of engine.o (symbol from plugin)
`gotpic' referenced in section `.text' of /tmp/ccFStfnO.ltrans5.ltrans.o: defined in discarded section `COMMON' of engine.o (symbol from plugin)
`gotpic' referenced in section `.text' of /tmp/ccFStfnO.ltrans5.ltrans.o: defined in discarded section `COMMON' of engine.o (symbol from plugin)
`gotpic' referenced in section `.text' of /tmp/ccFStfnO.ltrans5.ltrans.o: defined in discarded section `COMMON' of engine.o (symbol from plugin)
`gotpic' referenced in section `.text' of /tmp/ccFStfnO.ltrans0.ltrans.o: defined in discarded section `COMMON' of engine.o (symbol from plugin)
`gotpic' referenced in section `.text' of /tmp/ccFStfnO.ltrans0.ltrans.o: defined in discarded section `COMMON' of engine.o (symbol from plugin)
`gotpic' referenced in section `.text' of /tmp/ccFStfnO.ltrans0.ltrans.o: defined in discarded section `COMMON' of engine.o (symbol from plugin)
`gotpic' referenced in section `.text' of /tmp/ccFStfnO.ltrans0.ltrans.o: defined in discarded section `COMMON' of engine.o (symbol from plugin)
`gotpic' referenced in section `.text' of /tmp/ccFStfnO.ltrans7.ltrans.o: defined in discarded section `COMMON' of engine.o (symbol from plugin)
`gotpic' referenced in section `.text' of /tmp/ccFStfnO.ltrans7.ltrans.o: defined in discarded section `COMMON' of engine.o (symbol from plugin)
`gotpic' referenced in section `.text' of /tmp/ccFStfnO.ltrans7.ltrans.o: defined in discarded section `COMMON' of engine.o (symbol from plugin)
`gotpic' referenced in section `.text' of /tmp/ccFStfnO.ltrans7.ltrans.o: defined in discarded section `COMMON' of engine.o (symbol from plugin)
`gotpic' referenced in section `.text' of /tmp/ccFStfnO.ltrans7.ltrans.o: defined in discarded section `COMMON' of engine.o (symbol from plugin)
`gotpic' referenced in section `.text' of /tmp/ccFStfnO.ltrans7.ltrans.o: defined in discarded section `COMMON' of engine.o (symbol from plugin)
`gotpic' referenced in section `.text' of /tmp/ccFStfnO.ltrans17.ltrans.o: defined in discarded section `COMMON' of engine.o (symbol from plugin)
`gotpic' referenced in section `.text' of /tmp/ccFStfnO.ltrans17.ltrans.o: defined in discarded section `COMMON' of engine.o (symbol from plugin)
`gotpic' referenced in section `.text' of /tmp/ccFStfnO.ltrans17.ltrans.o: defined in discarded section `COMMON' of engine.o (symbol from plugin)
`gotpic' referenced in section `.text' of /tmp/ccFStfnO.ltrans17.ltrans.o: defined in discarded section `COMMON' of engine.o (symbol from plugin)
`gotpic' referenced in section `.text' of /tmp/ccFStfnO.ltrans26.ltrans.o: defined in discarded section `COMMON' of engine.o (symbol from plugin)
`gotpic' referenced in section `.text' of /tmp/ccFStfnO.ltrans26.ltrans.o: defined in discarded section `COMMON' of engine.o (symbol from plugin)
collect2: error: ld returned 1 exit status
Failed linking executable mapster32!


EDIT: apparently with gcc 4.7.2 LTO gets enabled by default in eduke making linking much slower.

This post has been edited by Zagro: 30 December 2012 - 01:12 AM

0

User is offline   Plagman 

  • Former VP of Media Operations

#2

Yeah, use `make LTO=0` until this is fixed; LTO also causes the link error.
0

User is offline   Zagro 

#3

View PostPlagman, on 09 November 2012 - 08:11 AM, said:

Yeah, use `make LTO=0` until this is fixed; LTO also causes the link error.


This works indeed, thanks.

Do you think it's an eduke or a gcc bug? If it's a gcc bug do you have the link to the bug?

Thanks.
0

User is offline   Plagman 

  • Former VP of Media Operations

#4

I think it was our bug, though it seems weird that GCC choses to have no visibility into with symbols are used from inline ASM even though it's obviously generating relocs that go with them. In any case, HEAD should now build fine with any combination of CPLUSPLUS/RELEASE/LTO.
0

User is offline   Zagro 

#5

View PostPlagman, on 09 November 2012 - 03:42 PM, said:

I think it was our bug, though it seems weird that GCC choses to have no visibility into with symbols are used from inline ASM even though it's obviously generating relocs that go with them. In any case, HEAD should now build fine with any combination of CPLUSPLUS/RELEASE/LTO.


Confirmed, thanks. Interestingly:
  • Without LTO:
    -rwxrwxr-x 1 fabio fabio 1632372 nov 13 16:32 eduke32
    -rwxrwxr-x 1 fabio fabio 1145096 nov 13 16:33 mapster32

  • With LTO:
    -rwxrwxr-x 1 fabio fabio 1568192 nov 13 16:36 eduke32
    -rwxrwxr-x 1 fabio fabio 1131840 nov 13 16:37 mapster32


Also, in gcc-4.8 (I tried only on 4.7.2):
 o LTO partitioning has been rewritten for better reliability and maintanibility. Several important bugs leading to link failures have been fixed.

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options