# Compile error building VTK-9.3.0.rc1 on MacOS sequoia

**URL:** https://discourse.vtk.org/t/compile-error-building-vtk-9-3-0-rc1-on-macos-sequoia/15528
**Category:** Support
**Created:** [April 21, 2025, 11:44pm UTC](https://discourse.vtk.org/t/compile-error-building-vtk-9-3-0-rc1-on-macos-sequoia/15528 "2025-04-21T23:44:01Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Tomasso](https://discourse.vtk.org/user_avatar/discourse.vtk.org/tomasso/32/5786_2.png) [@Tomasso](https://discourse.vtk.org/u/Tomasso)
#### Post date: [April 21, 2025, 11:44pm UTC](https://discourse.vtk.org/t/compile-error-building-vtk-9-3-0-rc1-on-macos-sequoia/15528/1 "2025-04-21T23:44:01Z")

</div>

Building VTK-9.3.0.rc1 on MacOS Sequoia, running xcode Version 16.3 (16E140). Following compile error occurs:

```auto
[1%] Building C object ThirdParty/zlib/vtkzlib/CMakeFiles/zlib.dir/zutil.c.o
cd /Users/oreilly/VTK-9.3.0.rc1/build/ThirdParty/zlib/vtkzlib && /Applications/X
code.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -DZLI
B_DLL -I/Users/oreilly/VTK-9.3.0.rc1/build/ThirdParty/zlib/vtkzlib -I/Users/orei
lly/VTK-9.3.0.rc1/ThirdParty/zlib/vtkzlib -isystem /Users/oreilly/VTK-9.3.0.rc1/
build/ThirdParty/zlib -isystem /Users/oreilly/VTK-9.3.0.rc1/ThirdParty/zlib -g -
arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX
.platform/Developer/SDKs/MacOSX15.4.sdk -mmacosx-version-min=15.3 -fPIC -MD -MT 
ThirdParty/zlib/vtkzlib/CMakeFiles/zlib.dir/zutil.c.o -MF CMakeFiles/zlib.dir/zu
til.c.o.d -o CMakeFiles/zlib.dir/zutil.c.o -c /Users/oreilly/VTK-9.3.0.rc1/Third
Party/zlib/vtkzlib/zutil.c
In file included from /Users/oreilly/VTK-9.3.0.rc1/ThirdParty/zlib/vtkzlib/zutil
.c:8:
/Users/oreilly/VTK-9.3.0.rc1/ThirdParty/zlib/vtkzlib/zutil.h:170:11: warning: 'O
S_CODE' macro redefined [-Wmacro-redefined]
  170 | # define OS_CODE 19
      | ^
/Users/oreilly/VTK-9.3.0.rc1/ThirdParty/zlib/vtkzlib/zutil.h:141:11: note: previ
ous definition is here
  141 | # define OS_CODE 7
      | ^
In file included from /Users/oreilly/VTK-9.3.0.rc1/ThirdParty/zlib/vtkzlib/zutil
.c:10:
In file included from /Users/oreilly/VTK-9.3.0.rc1/ThirdParty/zlib/vtkzlib/gzgut
s.h:21:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOS
X.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/stdio.h:61:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/_stdio.h:318:7: error: expected identifier or '('
  318 | FILE *fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0,__ DARWIN_ALIAS(fdopen));
      | ^

```

Anyone know how I can fix this?  
Thanks!

---

<div class="post-metadata">

### Author: ![jamesobutler](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jamesobutler/32/7579_2.png) [@jamesobutler](https://discourse.vtk.org/u/jamesobutler)
#### Post date: [April 23, 2025, 2:56am UTC](https://discourse.vtk.org/t/compile-error-building-vtk-9-3-0-rc1-on-macos-sequoia/15528/2 "2025-04-23T02:56:13Z")

</div>

This was fixed in an updated zlib version that VTK originally included in the 9.4 release (see linked commit below). It resolved issues with newer clang versions as you’ve experienced. If possible, I would suggest using VTK 9.4.2 instead of 9.3.0rc1.

> <https://github.com/Kitware/VTK/commit/5a568a68d734c37e688133c869892245b5e1d170>
>
> \# By Zlib Upstream
> \* upstream-zlib:
> zlib 2024-04-16 (17427660)

---

<div class="post-metadata">

### Author: ![Tomasso](https://discourse.vtk.org/user_avatar/discourse.vtk.org/tomasso/32/5786_2.png) [@Tomasso](https://discourse.vtk.org/u/Tomasso)
#### Post date: [April 23, 2025, 5:19pm UTC](https://discourse.vtk.org/t/compile-error-building-vtk-9-3-0-rc1-on-macos-sequoia/15528/3 "2025-04-23T17:19:57Z")

</div>

Unfortunately build of VTK 9.4.2 also fails on macos sequoia, for a different reaon - [documented here](https://gitlab.kitware.com/vtk/vtk/-/issues/19586)

---

<div class="post-metadata">

### Author: ![Tomasso](https://discourse.vtk.org/user_avatar/discourse.vtk.org/tomasso/32/5786_2.png) [@Tomasso](https://discourse.vtk.org/u/Tomasso)
#### Post date: [April 23, 2025, 11:02pm UTC](https://discourse.vtk.org/t/compile-error-building-vtk-9-3-0-rc1-on-macos-sequoia/15528/4 "2025-04-23T23:02:45Z")

</div>

Anyone know when [this VTK bug will be fixed on MacOS Sequoia](https://gitlab.kitware.com/vtk/vtk/-/issues/19586)?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [April 24, 2025, 5:59am UTC](https://discourse.vtk.org/t/compile-error-building-vtk-9-3-0-rc1-on-macos-sequoia/15528/5 "2025-04-24T05:59:28Z")

</div>

This is already fixed in master.

---

<div class="post-metadata">

### Author: ![Tomasso](https://discourse.vtk.org/user_avatar/discourse.vtk.org/tomasso/32/5786_2.png) [@Tomasso](https://discourse.vtk.org/u/Tomasso)
#### Post date: [April 29, 2025, 2:33am UTC](https://discourse.vtk.org/t/compile-error-building-vtk-9-3-0-rc1-on-macos-sequoia/15528/6 "2025-04-29T02:33:14Z")

</div>

Sweet, master builds on Sequoia! Does anyone know when these fixes will be incoporated into a release? (My app requires VTK 9.3+ on MacOS Sequoia, would be nice if it used an official VTK release)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [April 29, 2025, 5:43am UTC](https://discourse.vtk.org/t/compile-error-building-vtk-9-3-0-rc1-on-macos-sequoia/15528/7 "2025-04-29T05:43:42Z")

</div>

It will be available in the upcoming v9.5.0 release.
