Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Upgraded stuff, now it says I need to compile with -fPIC (Xubuntu)

Author
Message
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 11th Nov 2018 20:20
Hi peeps

Today, I've upgraded AppGameKit to the newest version and Xubuntu to 18.04, I think some G++ compiler have been updated too. I now get a whole lot of these errors where it says I need to recompile with -fPIC.

/usr/bin/ld: ../../platform/linux/Lib/Release64/libAGKLinux.a(poly1305.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC

I've tried adding -fPIC to the build command but that won't compile either, it says:
make: PIC: No such file or directory
make: *** No rule to make target 'PIC'. Stop.

I'm using Netbeans 8.2 btw.

Does anybody know what I can do?
13/0
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 11th Nov 2018 23:46
They have made some upgrades to the renderer in agk but that should not cause this?

Probably some things thats changed in ubuntu?

They are fighting over rights to parts in Linux lately?
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 12th Nov 2018 10:45
Crap :-( I can't update my servers before I've fixed this issue.
13/0
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 12th Nov 2018 20:39
AGK is not built with position independent code enabled (PIC) so the final executable cannot be position independent either. It seems 18.04 tries to build position independent executables by default, you can tell it not to by using the option -no-pie
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 14th Nov 2018 14:06
Awesome Paul, thanks, I will try that when I get back from vacation My solution for now for was to install Xubuntu 16 on an old laptop and bring that on our getaway. Your software is awesome! Coding with AGK2 is so easy.
13/0
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 16th Nov 2018 12:51
It worked perfectly! Thank you!
13/0
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 28th Nov 2018 11:18
Or so I thought The build command says it completed successfully, but there is no new executable.
13/0
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 28th Nov 2018 17:26
I can't find any reports that -no-pie is broken in general, have you tried cleaning the project first and deleting any existing executable?
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 28th Nov 2018 18:45
Yes, I've deleted my executable, and I always run Clean->Build. I can't rule out that I've messed something up while trying to get stuff working. I did move the entire project to a Ubuntu 16 laptop, same result until I removed -no-pie.
13/0

Login to post a reply

Server time is: 2024-04-19 14:14:38
Your offset time is: 2024-04-19 14:14:38