build fbc fails on OS X

General FreeBASIC programming questions.
Post Reply
srvaldez
Posts: 3379
Joined: Sep 25, 2005 21:54

build fbc fails on OS X

Post by srvaldez »

previously I was able to build FB on OS X ok with some warning, but the latest git-repo fails

Code: Select all

src/compiler/obj/fb.c:1364:2: error: indirect goto in function with no address-of-label expressions
        goto *vr$4;
        ^
src/compiler/obj/fb.c:2552:3: error: indirect goto in function with no address-of-label expressions
                goto *vr$44;
                ^
src/compiler/obj/fb.c:2860:2: error: indirect goto in function with no address-of-label expressions
        goto *vr$123;
        ^
3 errors generated.
make: *** [src/compiler/obj/fb.o] Error 1
any help will be much appreciated.

[edit] it could very well be a problem with my C compiler, will try with the gnu tool chain, because I tried to build a snapshot from feb of 2017 with the same problem.
builds ok using gcc-7.1 with warnings, I get tons of these

Code: Select all

src/gfxlib2/gfx_draw.c:225:30: warning: this statement may fall through [-Wimplicit-fallthrough=]
    case 'H': case 'U': angle += 90;
                        ~~~~~~^~~~~
srvaldez
Posts: 3379
Joined: Sep 25, 2005 21:54

Re: build fbc fails on OS X

Post by srvaldez »

there's a problem for me in using fbc built with gcc-7.1 in that all my inline asm code won't compile, even if built with an older version of the Xcode command line tools.
at present am using the patched version by TeeEmCee https://github.com/rversteegen/fbc/tree ... 8132d23bbd because it fixes some issues on the Mac
marcov
Posts: 3462
Joined: Jun 16, 2005 9:45
Location: Netherlands
Contact:

Re: build fbc fails on OS X

Post by marcov »

Usually on Mac "as" is some alias for the older CCtools or LLVM assembler in newer versions. Often in such cases GNU assembler is called GAS,

See also https://stackoverflow.com/questions/144 ... r-gcc-uses
srvaldez
Posts: 3379
Joined: Sep 25, 2005 21:54

Re: build fbc fails on OS X

Post by srvaldez »

I wanted to use the lates version of FB so that if there were any issues I could report them, but it looks like I will stay with the 2016 version.
@marcov
thank you for the link, however I am skeptical that building the gnu tools would solve my problem, besides it takes an awful long time.
Post Reply