adesutherland / CREXX

REXX Language implementation
Other
13 stars 3 forks source link

f0049 macOS build is broken #366

Closed rvjansen closed 2 months ago

rvjansen commented 2 months ago
[70/414] Building C object interpreter/CMakeFiles/rxvm.dir/rxvmintp.c.o
FAILED: interpreter/CMakeFiles/rxvm.dir/rxvmintp.c.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc  -I/Users/rvjansen/apps/crexx-f0049/interpreter/. -I/Users/rvjansen/apps/crexx_release/machine -I/Users/rvjansen/apps/crexx-f0049/interpreter/../assembler -I/Users/rvjansen/apps/crexx-f0049/rxpa -I/Users/rvjansen/apps/crexx-f0049/interpreter/../machine -I/Users/rvjansen/apps/crexx-f0049/interpreter/../platform -I/Users/rvjansen/apps/crexx-f0049/interpreter/../avl_tree -I/Users/rvjansen/apps/crexx-f0049/interpreter/../utf8 -I/Users/rvjansen/apps/crexx-f0049/interpreter/../decimal -I/Users/rvjansen/apps/crexx-f0049/machine/. -I/Users/rvjansen/apps/crexx-f0049/machine/../platform -O3 -DNDEBUG -std=gnu99 -flto=thin -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -MD -MT interpreter/CMakeFiles/rxvm.dir/rxvmintp.c.o -MF interpreter/CMakeFiles/rxvm.dir/rxvmintp.c.o.d -o interpreter/CMakeFiles/rxvm.dir/rxvmintp.c.o -c /Users/rvjansen/apps/crexx-f0049/interpreter/rxvmintp.c
/Users/rvjansen/apps/crexx-f0049/interpreter/rxvmintp.c:942:9: error: call to undeclared function 'max'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        decAlloc(op1R,set.digits*2);
        ^
/Users/rvjansen/apps/crexx-f0049/interpreter/rxvmintp.c:929:19: note: expanded from macro 'decAlloc'
        needbytes=max(100,needbytes);                                \
                  ^
/Users/rvjansen/apps/crexx-f0049/interpreter/rxvmintp.c:942:9: note: did you mean 'fmax'?
/Users/rvjansen/apps/crexx-f0049/interpreter/rxvmintp.c:929:19: note: expanded from macro 'decAlloc'
        needbytes=max(100,needbytes);                                \
                  ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/math.h:533:15: note: 'fmax' declared here
extern double fmax(double, double);
              ^
/Users/rvjansen/apps/crexx-f0049/interpreter/rxvmintp.c:957:9: error: call to undeclared function 'max'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        decAlloc(op1R,set.digits*2);
        ^
/Users/rvjansen/apps/crexx-f0049/interpreter/rxvmintp.c:929:19: note: expanded from macro 'decAlloc'
        needbytes=max(100,needbytes);                                \
                  ^
/Users/rvjansen/apps/crexx-f0049/interpreter/rxvmintp.c:975:5: error: call to undeclared function 'max'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    decAlloc(op1R,set.digits*2);
    ^
/Users/rvjansen/apps/crexx-f0049/interpreter/rxvmintp.c:929:19: note: expanded from macro 'decAlloc'
        needbytes=max(100,needbytes);                                \
                  ^
/Users/rvjansen/apps/crexx-f0049/interpreter/rxvmintp.c:1001:9: error: call to undeclared function 'max'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        decAlloc(op1R,set.digits+1);
        ^
/Users/rvjansen/apps/crexx-f0049/interpreter/rxvmintp.c:929:19: note: expanded from macro 'decAlloc'
        needbytes=max(100,needbytes);                                \
                  ^
/Users/rvjansen/apps/crexx-f0049/interpreter/rxvmintp.c:1012:9: error: call to undeclared function 'max'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        decAlloc(op1R,set.digits+1);
        ^
/Users/rvjansen/apps/crexx-f0049/interpreter/rxvmintp.c:929:19: note: expanded from macro 'decAlloc'
        needbytes=max(100,needbytes);                                \
                  ^
/Users/rvjansen/apps/crexx-f0049/interpreter/rxvmintp.c:1023:9: error: call to undeclared function 'max'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        decAlloc(op1R,set.digits+1);
        ^
/Users/rvjansen/apps/crexx-f0049/interpreter/rxvmintp.c:929:19: note: expanded from macro 'decAlloc'
        needbytes=max(100,needbytes);                                \
                  ^
/Users/rvjansen/apps/crexx-f0049/interpreter/rxvmintp.c:1045:27: warning: format specifies type 'int' but the argument has type 'rxinteger' (aka 'long long') [-Wformat]
    printf("Compare %d\n",op1R->int_value);
                    ~~    ^~~~~~~~~~~~~~~
                    %lld
/Users/rvjansen/apps/crexx-f0049/interpreter/./rxvmintp.h:185:34: note: expanded from macro 'op1R'
#define op1R                     (REG_OP(1))
                                 ^
1 warning and 6 errors generated.
rvjansen commented 2 months ago

I suspect some include file to be missing or incomplete

Peter-Jacob commented 2 months ago

ha, ha, poor MacOs it doesn't know the max function! I will push a version which doesn't need MAX()

rvjansen commented 2 months ago

yes, that builds perfectly again! Thanks!