building flexprop
David Betz
Posts: 14,519
in Propeller 2
I've been away from P1 and P2 programming for a while so I decided to update my flexprop repository and try building it for the Mac but I'm not sure how to do that. If I just type 'make' I get a usage message saying I should do 'make install'. What if I just want to build without doing an installation?

Comments
I decided to just try 'make install' since it installs to a local directory but then I ran into this problem:
`cc -o flexprop.bin src/flexprop_native.c -I/usr/local/opt/tcl-tk/include -L/usr/local/opt/tcl-tk/lib -ltk8.6 -ltcl8.6 -lz -lpthread -lm
In file included from src/flexprop_native.c:23:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/tk.h:86:11: fatal error: 'X11/Xlib.h' file not found
include <X11/Xlib.h>
1 error generated.
`
Is there a way to just build the command line tools? Surely they don't require X11.
Yes, clone the spin2cpp repo and run
makethere. The tools (spin2cpp,flexspin,flexcc) will appear in thebuilddirectoryThanks! That worked. I used to do it that way. I'm not sure why I switched to the flex prop repository. Anyway, the Mac build generated the following warnings.
gcc -MMD -MP -g -Og -Wall -fwrapv -I. -I./backends -I./frontends -I./build -DFLEXSPIN_BUILD -o build/common.o -c frontends/common.c frontends/common.c:711:24: warning: format string is not a string literal (potentially insecure) [-Wformat-security] fprintf(stderr,colorANSI[color]); ^~~~~~~~~~~~~~~~ frontends/common.c:711:24: note: treat the string as an argument to avoid this fprintf(stderr,colorANSI[color]); ^ "%s", 1 warning generated. gcc -MMD -MP -g -Og -Wall -fwrapv -I. -I./backends -I./frontends -I./build -DFLEXSPIN_BUILD -o build/outbc.o -c backends/bytecode/outbc.c backends/bytecode/outbc.c:2575:43: warning: taking the absolute value of unsigned type 'uint32_t' (aka 'unsigned int') has no effect [-Wabsolute-value] bool haveStep = !stepConst || abs(stepConstVal) != 1; ^ backends/bytecode/outbc.c:2575:43: note: remove the call to 'abs' since unsigned values cannot be negative bool haveStep = !stepConst || abs(stepConstVal) != 1; ^~~ 1 warning generated. gcc -MMD -MP -g -Og -Wall -fwrapv -I. -I./backends -I./frontends -I./build -DFLEXSPIN_BUILD -o build/bc_spin1.o -c backends/bytecode/bc_spin1.c backends/bytecode/bc_spin1.c:13:32: warning: unknown warning group '-Wmisleading-indentation', ignored [-Wunknown-warning-option] #pragma GCC diagnostic ignored "-Wmisleading-indentation" // GCC is very smart ^ 1 warning generated.