logoalt Hacker News

doublerabbittoday at 2:28 PM1 replyview on HN

COI compiles on FreeBSD but the example app didn't.

   Fatal error: 'stdint.h' file not found
Yet exists within /usr/include

Not a rant, but developers, please include testing on FreeBSD. Git issue raised.


Replies

io_erictoday at 2:52 PM

Fixed! The issue was specific to FreeBSD's clang setup. When compiling with --target=wasm32 and -nostdlib, clang on Linux/macOS still finds minimal freestanding headers for the wasm32 target, but FreeBSD's clang doesn't have these configured by default - even though stdint.h exists, it's not in the search path for cross-compilation targets.

The fix was adding freestanding stdint.h and stddef.h to webcc's compat layer using compiler built-ins (__SIZE_TYPE__, etc.). This makes webcc work consistently across all platforms without relying on platform-specific clang configurations.

I hope it works now for you - hit me up if there are still problems!

show 1 reply