How to handle “unrecognized command line option”
When compiling Atlantis, especially on Mac and Linux (which means it can turn up in Docker too potentially) you may hit the compile error
error: unrecognized command line option
For example
cc: error: unrecognized command line option ‘-Wformat-overflow’Makefile:453: recipe for target ’atBioltoXML.o’ failedmake[2]: *** [atBioltoXML.o] Error 1make[2]: Leaving directory ‘/home/Atlantis/atlantis-trunk/atlantis/ConvertAtlantis’Makefile:373: recipe for target ’all-recursive’ failedmake[1]: *** [all-recursive] Error 1make[1]: Leaving directory ‘/ocean/dlatorne/Atlantis/atlantis-trunk/atlantis’Makefile:314: recipe for target ’all’ failedmake: *** [all] Error 2
This seems a bit confronting for new code users but the fix is usually fairly straightforward. The error is typically because different compilers have different assumed inbuilt compiler flags, if yours is an older compiler it might not recognise a flag so you just need to comment it out by following these steps
Within the Atlantis code directory go to subdirectory atlantis
Open the file PreRules.am
Search on the unrecognsied option (in the example above that would be Wformat-overflow)
Comment out that line of the file by putting a # at the start of the line, for example
#WARN += -Wformat-overflow
Try to compile and see if that fixes the problem
If you’re still stuck email the development team at atlantis@csiro.au