Hopson97 / open-builder

Open "Minecraft-like" game with multiplayer support and Lua scripting support for the both client and server
https://github.com/Hopson97/open-builder/projects/3
GNU General Public License v3.0
700 stars 80 forks source link

Update to gcc-8 for <filesystem> and <optional> #175

Closed cedricschwyter closed 4 years ago

cedricschwyter commented 4 years ago

In response to #174.

cedricschwyter commented 4 years ago

Wait, somehow this does not work

cedricschwyter commented 4 years ago

The thing is, if you export the CC and CXX environment variables in the install script, the clang++ build will be built with g++...

cedricschwyter commented 4 years ago

This is exactly how I did it in my project, but it does not seem to work here. Does the scripts/build.sh somehow export to the environment variables C and CXX?

Hopson97 commented 4 years ago

Shouldn't do as far as I know, it only runs cmake and then make

cedricschwyter commented 4 years ago

Alright, apparently that fixed it. The mistake was this: if I export to environment variables from the install script, these updated environment variables will obviously not be updated outside of the shell of the script. So the install scripts gets run once with the --no-build flag, does thus not run the scripts/build.sh script. It exits. A new shell gets spawned when scripts/build.sh is run. That shell will not overtake the updated values of the environment variables as these 'died' with the old shell. It's fixed now.

cedricschwyter commented 4 years ago

What you have to take into account though is that by exporting to the compiler environment variables you prohibit GitHub Actions from compiling with a different compiler aka Clang in this case. So, I went ahead and deleted the job for the Clang-compilation because it is rendered obsolete by this export to environment variables. It is an 'unpretty' fix, if you insisted on having a Clang-compilation (which I don't think is really necessary) we would have to come up with another solution.

Hopson97 commented 4 years ago

Having just g++ is probably fine.

Also, just want to say thanks so much for your contributions this project, your additions have been very useful :)

cedricschwyter commented 4 years ago

Anytime, it's a pleasure ;)