bullet3
bullet3 copied to clipboard
Having trouble compiling with Clang 18 due to outdated zlib
Hi, i just upgraded my llvm on mac M1, (im using the latest version of bullet in a cmake project, 3.25).
And im getting a zlib error,
In file included from /Users/djmittens/src/cc4e/vendor/assimp/contrib/zlib/zutil.c:10:
In file included from /Users/djmittens/src/cc4e/vendor/assimp/contrib/zlib/gzguts.h:21:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/usr/include/stdio.h:220:7: error: expected identifier or '('
220 | FILE *fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fdopen));
| ^
/Users/djmittens/src/cc4e/vendor/assimp/contrib/zlib/zutil.h:147:33: note: expanded from macro 'fdopen'
147 | # define fdopen(fd,mode) NULL /* No fdopen() */
| ^
/opt/homebrew/Cellar/llvm/18.1.4/lib/clang/18/include/__stddef_null.h:26:16: note: expanded from macro 'NULL'
26 | #define NULL ((void*)0)
| ^
In file included from /Users/djmittens/src/cc4e/vendor/assimp/contrib/zlib/zutil.c:10:
In file included from /Users/djmittens/src/cc4e/vendor/assimp/contrib/zlib/gzguts.h:21:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/usr/include/stdio.h:220:7: error: expected ')'
/Users/djmittens/src/cc4e/vendor/assimp/contrib/zlib/zutil.h:147:33: note: expanded from macro 'fdopen'
147 | # define fdopen(fd,mode) NULL /* No fdopen() */
| ^
im seeing a similar issue in this issue from cmake itself https://gitlab.kitware.com/cmake/cmake/-/issues/25755 and the solution seems to be to upgrade the version of zlib.