smcameron / space-nerds-in-space

Multi-player spaceship bridge simulator game. Captain your starship through adventures with your friends. See https://smcameron.github.io/space-nerds-in-space
GNU General Public License v2.0
723 stars 73 forks source link

Compile issue - mathutils.c #355

Closed drofsirreb closed 8 months ago

drofsirreb commented 8 months ago

First time I'm trying to install this. Using an old laptop with Ubuntu 18.04.6

All went well until the point where I run the 'make' command.. I then get the following:

COMPILE mathutils.c cc: error: unrecognized command line option '-Wstringop-truncation'; did you mean '-Wline-truncation'? Makefile:967: recipe for target 'object_files/mathutils.o' failed make: *** [object_files/mathutils.o] Error 1

Any advice would be appreciated

drofsirreb commented 8 months ago

I found the solution. My version of gcc was 7.5 Once updated to latest version (10), compile works seemingly fine

smcameron commented 8 months ago

Glad you figured it out.

Yeah, stringop-trunction was added in gcc 8, in 2018. Another option would have been to delete -Wstringop-truncation from COMPSPECCFLAGS in the Makefile.