I’m trying to install Frobtards 1.2.3 on a Mint 21.3 system. I had to run configure a few times before I had all the pre-reqs installed, but it finished successfully. Now when running make I get this:
In file included from tads3/osifcnet.h:942,
from tads3/vmdatasrc.h:23,
from tads3/charmap.cpp:31:
./tads3/unix/osnetunix.h:222:20: error: missing '(' after "__has_builtin"
222 | # if __has_builtin == 0
| ^~
./tads3/unix/osnetunix.h:222:23: error: missing binary operator before token "0"
222 | # if __has_builtin == 0
| ^
make[1]: *** [Makefile:7076: tads3/charmap.o] Error 1
make[1]: Leaving directory '/opt/frobtads-1.2.3'
make: *** [Makefile:3461: all] Error 2
This is not my field of expertise at all, but you might be using the wrong kind of compiler? That’s the only reason I can think of for getting syntax errors in a C header file.
The current release, 2.0, does not contain the offending # if __has_builtin == 0 code. It was removed here.
(I infer that this __has_builtin C extension originated with Clang, and was later added to GCC, which is probably what precipitated this breakage – that is, GCC’s behaviour has changed since this code was written. There is a defined way to test whether the compiler understands __has_builtin before trying an actual __has_builtin(foo) test, but it’s documented as #if defined __has_builtin – on my system, neither GCC nor Clang likes the flavour your error mentions, which I guess is intended to do the same thing. FrobTADS issue #15 mentions the same build failure, but I suspect either of the solutions presented there only works kind of incidentally.)