Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build aura bot - src/sqlite3.o #59

Open
HamAndRock opened this issue Mar 4, 2018 · 4 comments
Open

Cannot build aura bot - src/sqlite3.o #59

HamAndRock opened this issue Mar 4, 2018 · 4 comments
Labels

Comments

@HamAndRock
Copy link

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#

@Josko
Copy link
Owner

Josko commented Mar 5, 2018

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.

@HamAndRock
Copy link
Author

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

@HamAndRock
Copy link
Author

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.

@Josko
Copy link
Owner

Josko commented Apr 5, 2018

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.

@Josko Josko added the Bug label Apr 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants