Open HamAndRock opened 6 years ago
Hey, this seems like an issue with LTO as the linker denies the object file (which is now not machine code but some kind of IR, which needs extra support). Could you try editing the Makefile and remove the -flto
flag from the following line:
OFLAGS = -O3 -flto
and then compile, just to confirm?
And while you're at it, also post the output from gcc --version
and ld --version
.
gcc vesion: gcc (Debian 6.3.0-18) 6.3.0 20170516 ld version: GNU ld (GNU Binutils for Debian) 2.30
This is new output:
root@vmi167482:/home/game/W3/aura-bot# make -j 5 [g++] src/crc32.o [g++] src/csvparser.o [g++] src/config.o [g++] src/bncsutilinterface.o [g++] src/bnetprotocol.o [g++] src/gameplayer.o [g++] src/gameslot.o [g++] src/gpsprotocol.o [g++] src/gameprotocol.o [g++] src/bnet.o [g++] src/auradb.o [g++] src/sha1.o [g++] src/aura.o [g++] src/stats.o [g++] src/socket.o [g++] src/map.o [g++] src/irc.o [g++] src/fileutil.o [g++] src/game.o [cc] src/sqlite3.o /usr/bin/ld: src/sqlite3.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status Makefile:75: recipe for target 'aura++' failed make: *** [aura++] Error 1
Ok it compiled by adding -fPIC to OFLAGS, if you have any other solution or better way tell me, never worked with this, so its random guess that works :D.
Hey, could you try reverting the temporary changes and trying again after installing binutils-gold
rather than plain old binutils
? The difference being that the gold linker supports LTO out-of-the-box. And perhaps you won't have a problem at all then.
The second issue regarding PIC is Debian related: https://www.debian.org/releases/stretch/ppc64el/release-notes/ch-information.en.html#pie-is-now-default
Going to need some kind of distro-detection check.
I am trying to build aura bot, but when i try to compile aure itself it thorws this error, doing it on Debian 9. Thanks for any help, HamAndRock.
root@vmi167482:/home/game/W3/aura-bot# make -j 5 [g++] src/crc32.o [g++] src/csvparser.o [g++] src/config.o [g++] src/bncsutilinterface.o [g++] src/bnetprotocol.o [g++] src/gameslot.o [g++] src/gpsprotocol.o [g++] src/gameplayer.o [g++] src/gameprotocol.o [g++] src/bnet.o [g++] src/sha1.o [g++] src/socket.o [g++] src/auradb.o [g++] src/aura.o [g++] src/map.o [g++] src/fileutil.o [g++] src/game.o [g++] src/stats.o [g++] src/irc.o [cc] src/sqlite3.o src/sqlite3.o: file not recognized: File format not recognized collect2: error: ld returned 1 exit status Makefile:75: recipe for target 'aura++' failed make: *** [aura++] Error 1 root@vmi167482:/home/game/W3/aura-bot#