checkra1n / PongoOS

pongoOS
https://checkra.in
Other
2.49k stars 405 forks source link

Cannot build on macOS 13 #145

Closed alfiecg24 closed 1 year ago

alfiecg24 commented 1 year ago

I cannot seem to build this repository on macOS Ventura.

Steps to reproduce:

Running make all EMBEDDED_CC_FLAGS="-Wno-error" without running make all first also fails when compiling newlib with the message "../stdio/lib.a": No such file or directory.

Running the commands above gives many errors to do with implicit declarations of iprintf and siprintf being invalid in C99. I am using the regular clang, gcc etc. from /usr/bin if that helps. Hope I can be of assistance if you need it.

alfiecg24 commented 1 year ago

Update: adding -Wno-implicit-function-declaration to the flags fails to build with these errors


src/kernel/support/sbrk.c:33:1: error: unknown type name 'caddr_t'
caddr_t _sbrk(int size) {
^
src/kernel/support/sbrk.c:42:13: error: use of undeclared identifier 'caddr_t'
    return (caddr_t)cursor_copy;
            ^
2 errors generated.
Siguza commented 1 year ago

It should be EMBEDDED_CFLAGS, not EMBEDDED_CC_FLAGS. If you redefine the latter, you wipe out all the default flags.

alfiecg24 commented 1 year ago

Ah okay, I must have misread an answer on another issue. Thanks for the help - issue is solved.