Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having trouble compiling with Clang 18 due to outdated zlib #4607

Open
djmittens opened this issue Apr 24, 2024 · 0 comments
Open

Having trouble compiling with Clang 18 due to outdated zlib #4607

djmittens opened this issue Apr 24, 2024 · 0 comments

Comments

@djmittens
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant