BMax 1.51: Building Modules on MacOS - Error unknown argument: '-fno-tree-vrp'

Started by therevills, May 26, 2018, 02:54:29

Previous topic - Next topic

therevills

Someone(!) deleted the BlitzMax folder off the Mac and now I need to set it up again...

So I downloaded BMX 1.51 from Itch, copied across my modules to mod folder and did a rebuild all, but I am getting an error:

Compiling:blitz_app.c
clang: error: unknown argument: '-fno-tree-vrp'
Build Error: failed to compile /Applications/BlitzMax151/mod/brl.mod/blitz.mod/blitz_app.c
Process complete


I've googled and from that a possible solution was to add: -Werror=unused-command-line-argument-hard-error-in-future

And from this post (https://www.syntaxbomb.com/index.php?topic=61.0) I have added it to Blitz.bmx:

?MacOS
ModuleInfo "CC_OPTS: -Werror=unused-command-line-argument-hard-error-in-future"
?

Also tried with ?MacosX86

But I still get the error! Any ideas?

Cheers,
Steve

markcwm

My guess is it's a dependency issue, so try reinstalling xcode.

Also, you should build pub first, then brl, then maxgui as I've always had problems just building everything at the same time.

therevills

Thanks for replying Mark :)

Here is what I have found, the version on Itch is actually version 1.52 even though the filename states it's 1.51... and 1.52 has the following line twice in bmk_make.bmx:

If opt_release cc_opts:+" -O3 -fno-tree-vrp -DNDEBUG"

So I downloaded the 1.51 release from Github: https://github.com/blitz-research/blitzmax/releases/tag/v151 and rebuilt it from scratch. This version doesnt have the above line and works okay on the Mac.


markcwm

No problem, I kind of enjoy compiler issues.

Nice find. It seems there's no BRL Bmx on Itch not sure why but Skid must have got permission to host it.

You should probably post your fix there too.