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 / Linux Tier 2 compilation issues with g++ > 5.4

Author
Message
wasseydev
6
Years of Service
User Offline
Joined: 6th Dec 2017
Location:
Posted: 2nd Jan 2018 06:21
Hey, just noticed that there was another thread that touched on an issue that I encountered: https://forum.thegamecreators.com/thread/219884. Error messages are those such as:
/usr/bin/ld: ../../platform/linux/Lib/Release64/libAGKLinux.a(sweep.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC

I managed to solve that issue by trying a few different versions of gcc, and it seems that anything over 5.4 causes the issues. So whilst it works by installing an old version up to 5.4, doing that on a recent distro can be problematic, requiring it to be built from source without overriding the default versions - I did that on Debian Stretch 9.3, and Ubuntu 17.10.

So, any chance of having the libraries compiled under a more recent gcc so this issue is avoided? Realise that some people may need to guarantee compatibility with older distros, so maybe have two different libraries?
npink1981
6
Years of Service
User Offline
Joined: 20th Jul 2017
Location: London
Posted: 7th Jan 2018 17:05
If you add -no-pie to the ldflags in the MakeFile it should fix it. I've got the linux template to compile with gcc 6.3.
wasseydev
6
Years of Service
User Offline
Joined: 6th Dec 2017
Location:
Posted: 10th Jan 2018 02:47
Thanks, that worked for gcc 7.2 on Ubuntu 17.10. Good to learn about these things!

Login to post a reply

Server time is: 2024-03-29 04:52:13
Your offset time is: 2024-03-29 04:52:13