spitbol / x64

SPITBOL x64 provides raw power and speed for non-numeric computation on the x86_64 architecture
GNU General Public License v3.0
256 stars 23 forks source link

Building for an Intel Mac #34

Open russurquhart1 opened 6 months ago

russurquhart1 commented 6 months ago

Hi, As i said in the mailing list. The version of Clang (11.0 i think), installed by default, does not recognize '-mlong-double-64' option. (I checked my default gcc compiler and that also did not support this option.) I'm not running the latest version of MAC OS, I'm still running version 10.15.7 because I have an application that discontinued support for, after this OS version. I think I'll try first removing the option from the Make file, and see if that works and goes further. If there are still issues, I thought I'd install the latest gcc from brew, point CC to the gcc location, and try again. Thoughts?

Thanks again,

Russ

russurquhart1 commented 6 months ago

I removed the '-mlong-double-64' option, and it seemed to progress further, but I think the issues being found relate to the old Clang being used. Here are the errors:

(base) russurquhart@Russs-MBP x64 % make bootsbl
cp bootstrap/sbl.asm . cp bootstrap/err.asm . nasm -f elf64 -d m64 -l err.lst err.asm nasm -f elf64 -d m64 -l int.lst int.asm nasm -f elf64 -d m64 -l sbl.lst sbl.asm cc -Dm64 -m64 -no-pie -fPIC -mfpmath=sse -ffloat-store -Wno-unused-command-line-argument -Wno-ignored-optimization-argument -c osint/.c In file included from osint/math.c:21: In file included from osint/port.h:382: In file included from osint/sproto.h:209: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/unistd.h:719:7: error: conflicting types for 'setkey' void setkey(const char ) __DARWIN_ALIAS(setkey); ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdlib.h:239:7: note: previous declaration is here void setkey(const char *) __DARWIN_ALIAS(setkey); ^ In file included from osint/math.c:21: In file included from osint/port.h:382: In file included from osint/sproto.h:209: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/unistd.h:745:6: error: conflicting types for 'getsubopt' int getsubopt(char , char const , char ); ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdlib.h:205:6: note: previous declaration is here int getsubopt(char , char const , char ); ^ 2 errors generated. osint/syslinux.c:21:10: fatal error: 'malloc.h' file not found

include

     ^~~~~~~~~~

1 error generated. make: *** [bootsbl] Error 1

Do you think I should try installing gcc from brew and pointing CC to it, and then try building that way?

Thanks,

Russ

CheyenneWills commented 6 months ago

I would try using gcc. If you already have a version of gcc installed, all you should need to do is make sure it's in your path and do a CC=gcc make ...

The error on the missing malloc.h header.. it looks like you can just remove that include (it should be picked up in stdlib.h)

CheyenneWills commented 6 months ago

The other error (about conflicting types), might be due to a header file getting pulled in twice.

russurquhart1 commented 6 months ago

I set CC to point to /usr/bin/gcc

And I commented out the include for malloc.h in osint/syslinux.c

Still got the type errors:

(base) russurquhart@Russs-MBP x64 % make bootsbl
cp bootstrap/sbl.asm . cp bootstrap/err.asm . nasm -f elf64 -d m64 -l err.lst err.asm nasm -f elf64 -d m64 -l int.lst int.asm nasm -f elf64 -d m64 -l sbl.lst sbl.asm /usr/bin/gcc -Dm64 -m64 -no-pie -fPIC -mfpmath=sse -ffloat-store -Wno-unused-command-line-argument -Wno-ignored-optimization-argument -c osint/.c In file included from osint/math.c:21: In file included from osint/port.h:382: In file included from osint/sproto.h:209: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/unistd.h:719:7: error: conflicting types for 'setkey' void setkey(const char ) __DARWIN_ALIAS(setkey); ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdlib.h:239:7: note: previous declaration is here void setkey(const char *) __DARWIN_ALIAS(setkey); ^ In file included from osint/math.c:21: In file included from osint/port.h:382: In file included from osint/sproto.h:209: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/unistd.h:745:6: error: conflicting types for 'getsubopt' int getsubopt(char , char const , char ); ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdlib.h:205:6: note: previous declaration is here int getsubopt(char , char const , char ); ^ 2 errors generated. make: *** [bootsbl] Error 1 (base) russurquhart@Russs-MBP x64 %

Any ideas for this? Thanks for all your help.

CheyenneWills commented 6 months ago

I'll go through the code to see what includes are being used vs what is actually needed.

CheyenneWills commented 5 months ago

I pushed a branch mac-WIP that can be used to while working on the Intel Mac port.

Try building against this branch. For the Mac build, there may be more include problems and you might need to play around with changing some of the includes. . It could very well be that the Mac development environment has moved some of the stuff into different header files. You can try commenting out some of the system includes in osint/port.h, do a build, then see which Mac specific include contains the definitions that are missing.

russurquhart1 commented 5 months ago

The changes I made in the things that I showed you were on my local branch. Should I push those to this new branch? Or just pull down the new branch and make sure that it has those changes in them?

Sent from the all new AOL app for iOS

On Tuesday, January 9, 2024, 8:49 PM, Cheyenne Wills @.***> wrote:

I pushed a branch mac-WIP that can be used to while working on the Intel Mac port.

Try building against this branch. For the Mac build, there may be more include problems and you might need to play around with changing some of the includes. . It could very well be that the Mac development environment has moved some of the stuff into different header files. You can try commenting out some of the system includes in osint/port.h, do a build, then see which Mac specific include contains the definitions that are missing.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

CheyenneWills commented 5 months ago

You can commit your changes to a local branch on your system, then rebase that branch on top of the one I created -- depends on how comfortable you are with git.

Otherwise, use the branch I created, and make the same set of changes (if needed).

russurquhart1 commented 5 months ago

I commented out the unistd.h include file in port.h and got much further. it eventually failed with a linker error:

(base) russurquhart@Russs-MBP x64 % make bootsbl cp bootstrap/sbl.asm . cp bootstrap/err.asm . nasm -f elf64 -d m64 -l err.lst err.asm nasm -f elf64 -d m64 -l int.lst int.asm nasm -f elf64 -d m64 -l sbl.lst sbl.asm /usr/bin/gcc -Dm64 -m64 -no-pie -fPIC -mfpmath=sse -ffloat-store -Wno-unused-command-line-argument -Wno-ignored-optimization-argument -c osint/*.c osint/compress.c:142:22: warning: implicit declaration of function 'read' is invalid in C99 [-Wimplicit-function-declaration] bufcnt = read(fd, buffer, BUFF_SIZE); ^ 1 warning generated. osint/doset.c:46:29: warning: implicit declaration of function 'lseek' is invalid in C99 [-Wimplicit-function-declaration] : LSEEK(ioptr->fdn, (FILEPOS)0, 1)); ^ osint/sproto.h:207:15: note: expanded from macro 'LSEEK'

define LSEEK lseek

          ^

osint/doset.c:86:26: warning: implicit declaration of function 'lseek' is invalid in C99 [-Wimplicit-function-declaration] newcurrent = LSEEK(ioptr->fdn, newoffset, 0); ^ osint/sproto.h:207:15: note: expanded from macro 'LSEEK'

define LSEEK lseek

          ^

osint/doset.c:112:16: warning: implicit declaration of function 'lseek' is invalid in C99 [-Wimplicit-function-declaration] return LSEEK(ioptr->fdn, target, 0); / unbuffered I/O / ^ osint/sproto.h:207:15: note: expanded from macro 'LSEEK'

define LSEEK lseek

          ^

osint/doset.c:123:15: warning: implicit declaration of function 'lseek' is invalid in C99 [-Wimplicit-function-declaration] = LSEEK(ioptr->fdn, (FILEPOS)0, 1); / record current position / ^ osint/sproto.h:207:15: note: expanded from macro 'LSEEK'

define LSEEK lseek

          ^

4 warnings generated. osint/flush.c:32:21: warning: implicit declaration of function 'write' is invalid in C99 [-Wimplicit-function-declaration] n = write(ioptr->fdn, bfptr->buf, bfptr->fill); ^ osint/flush.c:67:17: warning: implicit declaration of function 'lseek' is invalid in C99 [-Wimplicit-function-declaration] n = LSEEK(ioptr->fdn, bfptr->offset, 0); ^ osint/sproto.h:207:15: note: expanded from macro 'LSEEK'

define LSEEK lseek

          ^

2 warnings generated. osint/getargs.c:221:17: warning: implicit declaration of function 'write' is invalid in C99 [-Wimplicit-function-declaration] write(STDERRFD, "Illegal option -", 17); ^ 1 warning generated. osint/gethost.c:39:15: warning: implicit declaration of function 'read' is invalid in C99 [-Wimplicit-function-declaration] cnt = read(fd, scptr->str, maxlen); ^ osint/gethost.c:40:9: warning: implicit declaration of function 'close' is invalid in C99 [-Wimplicit-function-declaration] close(fd); ^ 2 warnings generated. osint/main.c:215:5: warning: implicit declaration of function 'write' is invalid in C99 [-Wimplicit-function-declaration] write(STDERRFD, s, length(s)); ^ osint/main.c:238:5: warning: implicit declaration of function 'write' is invalid in C99 [-Wimplicit-function-declaration] write(STDOUTFD, s, length(s)); ^ 2 warnings generated. osint/osclose.c:49:8: warning: implicit declaration of function 'close' is invalid in C99 [-Wimplicit-function-declaration] if(close(ioptr->fdn) < 0) ^ 1 warning generated. osint/ospipe.c:37:8: warning: implicit declaration of function 'pipe' is invalid in C99 [-Wimplicit-function-declaration] if(pipe(fd) < 0) ^ osint/ospipe.c:58:23: warning: implicit declaration of function 'fork' is invalid in C99 [-Wimplicit-function-declaration] switch(childpid = fork()) { ^ osint/ospipe.c:64:9: warning: implicit declaration of function 'close' is invalid in C99 [-Wimplicit-function-declaration] close(parentfd); ^ osint/ospipe.c:84:9: warning: implicit declaration of function 'dup' is invalid in C99 [-Wimplicit-function-declaration] dup(childfd); ^ osint/ospipe.c:143:5: warning: implicit declaration of function 'execl' is invalid in C99 [-Wimplicit-function-declaration] execl(shellpath, pathlast(shellpath), "-c", cmdbuf, (char )0); ^ 5 warnings generated. osint/osread.c:67:25: warning: implicit declaration of function 'read' is invalid in C99 [-Wimplicit-function-declaration] n = read(fdn, &c, 1); ^ osint/osread.c:84:21: warning: implicit declaration of function 'read' is invalid in C99 [-Wimplicit-function-declaration] n = read(fdn, cp, recsiz); ^ osint/osread.c:134:21: warning: implicit declaration of function 'read' is invalid in C99 [-Wimplicit-function-declaration] n = read(fdn, cp, recsiz); ^ osint/osread.c:275:25: warning: implicit declaration of function 'read' is invalid in C99 [-Wimplicit-function-declaration] n = read(fdn, bfptr->buf, bfptr->size); ^ osint/osread.c:322:9: warning: implicit declaration of function 'read' is invalid in C99 [-Wimplicit-function-declaration] n = read(ioptr->fdn, bfptr->buf, bfptr->size); ^ 5 warnings generated. osint/oswrite.c:70:22: warning: implicit declaration of function 'write' is invalid in C99 [-Wimplicit-function-declaration] actcnt = write(fdn, cp, linelen); ^ osint/oswrite.c:172:25: warning: implicit declaration of function 'write' is invalid in C99 [-Wimplicit-function-declaration] m = write(fdn, cp, n); ^ 2 warnings generated. osint/swcinp.c:140:19: warning: implicit declaration of function 'dup' is invalid in C99 [-Wimplicit-function-declaration] originp = dup(0); ^ osint/swcinp.c:157:9: warning: implicit declaration of function 'close' is invalid in C99 [-Wimplicit-function-declaration] close(0); ^ osint/swcinp.c:202:17: warning: implicit declaration of function 'write' is invalid in C99 [-Wimplicit-function-declaration] write(STDERRFD, "Can't open ", 11); ^ osint/swcinp.c:218:9: warning: implicit declaration of function 'close' is invalid in C99 [-Wimplicit-function-declaration] close(0); ^ osint/swcinp.c:244:20: warning: implicit declaration of function 'dup' is invalid in C99 [-Wimplicit-function-declaration] if((save_fd0 = dup(0)) >= 0) { ^ osint/swcinp.c:245:9: warning: implicit declaration of function 'close' is invalid in C99 [-Wimplicit-function-declaration] close(0); ^ osint/swcinp.c:260:9: warning: implicit declaration of function 'close' is invalid in C99 [-Wimplicit-function-declaration] close(0); ^ osint/swcinp.c:262:9: warning: implicit declaration of function 'dup' is invalid in C99 [-Wimplicit-function-declaration] dup(save_fd0); ^ 8 warnings generated. osint/swcoup.c:92:19: warning: implicit declaration of function 'dup' is invalid in C99 [-Wimplicit-function-declaration] origoup = dup(1); / save std output / ^ osint/swcoup.c:93:9: warning: implicit declaration of function 'close' is invalid in C99 [-Wimplicit-function-declaration] close(1); / close std output / ^ 2 warnings generated. osint/sysbs.c:107:37: warning: implicit declaration of function 'read' is invalid in C99 [-Wimplicit-function-declaration] if(doset(ioptr, -1L, 1) < 0L || read(ioptr->fdn, &c, 1) != 1) ^ 1 warning generated. osint/sysdc.c:47:9: warning: implicit declaration of function 'write' is invalid in C99 [-Wimplicit-function-declaration] write(STDERRFD, "LINUX SPITBOL", 13); ^ 1 warning generated. osint/sysep.c:25:5: warning: implicit declaration of function 'write' is invalid in C99 [-Wimplicit-function-declaration] write(1, "\f", 1); ^ 1 warning generated. osint/sysif.c:39:5: warning: implicit declaration of function 'dup' is invalid in C99 [-Wimplicit-function-declaration] dup(fd); / Create fd 0 for previous file / ^ osint/sysif.c:40:5: warning: implicit declaration of function 'close' is invalid in C99 [-Wimplicit-function-declaration] close(fd); / Release dup'ed fd of old file / ^ osint/sysif.c:63:29: warning: implicit declaration of function 'dup' is invalid in C99 [-Wimplicit-function-declaration] inc_fd[nesting++] = dup(0); / Save current input file / ^ osint/sysif.c:64:9: warning: implicit declaration of function 'close' is invalid in C99 [-Wimplicit-function-declaration] close(0); / Make fd 0 available / ^ osint/sysif.c:117:13: warning: implicit declaration of function 'close' is invalid in C99 [-Wimplicit-function-declaration] close(fd); / Close last include file */ ^ 5 warnings generated. osint/sysrw.c:35:8: warning: implicit declaration of function 'lseek' is invalid in C99 [-Wimplicit-function-declaration] if(LSEEK(iob->fdn, (FILEPOS)0, 1) < (FILEPOS)0) ^ osint/sproto.h:207:15: note: expanded from macro 'LSEEK'

define LSEEK lseek

          ^

1 warning generated. osint/sysxi.c:408:13: warning: implicit declaration of function 'read' is invalid in C99 [-Wimplicit-function-declaration] n = read(fd, (char ) &svfheader.magic1, sizeof(svfheader.magic1)); ^ osint/sysxi.c:592:13: warning: implicit declaration of function 'write' is invalid in C99 [-Wimplicit-function-declaration] write(STDERRFD, cp, length(cp)); ^ osint/sysxi.c:653:5: warning: implicit declaration of function 'execle' is invalid in C99 [-Wimplicit-function-declaration] execle(shellpath, pathlast(shellpath), "-c", cp, (char ) NULL, environ); / no return / ^ 3 warnings generated. osint/wrtaout.c:45:12: warning: implicit declaration of function 'access' is invalid in C99 [-Wimplicit-function-declaration] if(access(tmpfnbuf, 0) != 0) ^ osint/wrtaout.c:77:15: warning: implicit declaration of function 'write' is invalid in C99 [-Wimplicit-function-declaration] if((uword)write(aoutfd, startadr, size) != size) ^ osint/wrtaout.c:137:5: warning: implicit declaration of function 'close' is invalid in C99 [-Wimplicit-function-declaration] close(aoutfd); ^ osint/wrtaout.c:139:9: warning: implicit declaration of function 'unlink' is invalid in C99 [-Wimplicit-function-declaration] unlink(fn); / delete old file, if any / ^ osint/wrtaout.c:144:9: warning: implicit declaration of function 'unlink' is invalid in C99 [-Wimplicit-function-declaration] unlink(tmpfnbuf); ^ osint/wrtaout.c:164:15: warning: implicit declaration of function 'read' is invalid in C99 [-Wimplicit-function-declaration] if((uword)read(fd, startadr, size) != size) ^ 6 warnings generated. /usr/bin/gcc -Dm64 -m64 -no-pie -fPIC -mfpmath=sse -ffloat-store -Wno-unused-command-line-argument -Wno-ignored-optimization-argument *.o -obootsbl -lm ld: warning: ignoring file err.o, building for macOS-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ) ld: warning: ignoring file int.o, building for macOS-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ) ld: warning: ignoring file sbl.o, building for macOS-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ) Undefined symbols for architecture x86_64: "_b_icl", referenced from: _getint in syshs.o _zyshs in syshs.o "_b_scl", referenced from: _cpys2sc in cpys2sc.o _checkstr in syshs.o _zyshs in syshs.o _zysou in sysou.o _zysxi in sysxi.o "_b_xnt", referenced from: _zysio in sysio.o "_b_xrt", referenced from: _zysio in sysio.o "_c_aaa", referenced from: _putsave in sysxi.o _getsave in sysxi.o "_c_yyy", referenced from: _putsave in sysxi.o _getsave in sysxi.o "_dnamb", referenced from: _putsave in sysxi.o _rereloc in sysxi.o _unreloc in sysxi.o _getsave in sysxi.o "_dnamp", referenced from: _putsave in sysxi.o _getsave in sysxi.o "_errors", referenced from: _zysem in sysem.o "_flprt", referenced from: _rereloc in sysxi.o _unreloc in sysxi.o "_flptr", referenced from: _rereloc in sysxi.o _unreloc in sysxi.o "_g_aaa", referenced from: _putsave in sysxi.o _getsave in sysxi.o "_get_fp", referenced from: _zysxi in sysxi.o "_gtcef", referenced from: _rereloc in sysxi.o _unreloc in sysxi.o "_hasfpu", referenced from: _main in main.o "_headv", referenced from: _gethost in gethost.o _zysdc in sysdc.o _makeexec in syslinux.o "_hshtb", referenced from: _putsave in sysxi.o _getsave in sysxi.o "_id1blk", referenced from: _gethost in gethost.o _zysid in sysid.o _putsave in sysxi.o "_id2blk", referenced from: _zysid in sysid.o "_inf", referenced from: _f_etx in math.o _f_lnf in math.o _f_tan in math.o "_inpbuf", referenced from: _zysio in sysio.o _stdioinit in sysstdio.o _getsave in sysxi.o "_lowspminx", referenced from: _zyshs in syshs.o "_minimal", referenced from: _getsave in sysxi.o "_minimal_id", referenced from: _getsave in sysxi.o "_phrases", referenced from: _msgcopy in sysem.o "_pmhbs", referenced from: _rereloc in sysxi.o _unreloc in sysxi.o "_polct", referenced from: _catchbrk in break.o "_r_fcb", referenced from: _oswait in oswait.o "_reg_block", referenced from: _putsave in sysxi.o _getsave in sysxi.o "_reg_cp", referenced from: _main in main.o _rereloc in sysxi.o _unreloc in sysxi.o _getsave in sysxi.o "_reg_ia", referenced from: _main in main.o _makeexec in syslinux.o _zysst in sysst.o _zystm in systm.o _zysxi in sysxi.o "_reg_ra", referenced from: _f_atn in math.o _f_chp in math.o _f_cos in math.o _f_etx in math.o _f_lnf in math.o _f_sin in math.o _f_sqr in math.o ... "_reg_size", referenced from: _putsave in sysxi.o _getsave in sysxi.o "_reg_wa", referenced from: _main in main.o _zysbs in sysbs.o _zysef in sysef.o _zysem in sysem.o _zysen in sysen.o _zysfc in sysfc.o _zyshs in syshs.o ... "_reg_wb", referenced from: _main in main.o _zysea in sysea.o _zysej in sysej.o _zysfc in sysfc.o _makeexec in syslinux.o _zyspp in syspp.o _zysst in sysst.o ... "_reg_wc", referenced from: _main in main.o _zysea in sysea.o _zysfc in sysfc.o _zysil in sysil.o _zysio in sysio.o _zyspp in syspp.o _zysst in sysst.o ... "_reg_xl", referenced from: _main in main.o _zysdt in sysdt.o _zysea in sysea.o _zysej in sysej.o _zysfc in sysfc.o _check2str in syshs.o _save2str in syshs.o ... "_reg_xr", referenced from: _main in main.o _zysdt in sysdt.o _zysea in sysea.o _zysem in sysem.o _zysfc in sysfc.o _zysgc in sysgc.o _check2str in syshs.o ... "_reg_xs", referenced from: _zyshs in syshs.o "_restart", referenced from: _main in main.o "_s_aaa", referenced from: _putsave in sysxi.o _getsave in sysxi.o "_s_yyy", referenced from: _putsave in sysxi.o _getsave in sysxi.o "_startup", referenced from: _main in main.o "_state", referenced from: _putsave in sysxi.o _getsave in sysxi.o "_stbas", referenced from: _zysxi in sysxi.o _putsave in sysxi.o _rereloc in sysxi.o _unreloc in sysxi.o _getsave in sysxi.o "_stmcs", referenced from: _catchbrk in break.o "_stmct", referenced from: _catchbrk in break.o "_ticblk", referenced from: _zyshs in syshs.o "_tscblk", referenced from: _osopen in osopen.o _doshell in ospipe.o _zysbx in sysbx.o _zysdt in sysdt.o _zysea in sysea.o _zysem in sysem.o _zysfc in sysfc.o ... "_ttybuf", referenced from: _ttyinit in systty.o "_w_yyy", referenced from: _putsave in sysxi.o _getsave in sysxi.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [bootsbl] Error 1 (base) russurquhart@Russs-MBP x64 %

CheyenneWills commented 5 months ago

There are 2 issues you are now running into.

1st, while you removing the unistd.h include "fixed" the error, you have missing macros and other declarations. To fix, you will need to determine what includes from the Mac SDK are needed to resolve those.

The 2nd problem is that you are missing one or more libraries needed from the Mac SDK (these would be adding new -l{something} to the "cc" command were all the .o files are linked (e.g. $(CC) $(CFLAGS) *.o -o sbl -lm -l{something for Mac}

russurquhart1 commented 5 months ago

Ok, thanks, I'll look into that!

russurquhart1 commented 5 months ago

BTW, do you happen to know the file where those macros would be, in a normal Linux system?

CheyenneWills commented 5 months ago

BTW, do you happen to know the file where those macros would be, in a normal Linux system?

They are in the unistd.h

So you will need to investigate where the Mac SDK has those macros, or figure out what is causing the error when using the Mac SDK unistd.h file.