# VTK-8.2.0 install failure MacOS Mojave VTK\_USE\_X=On

**URL:** https://discourse.vtk.org/t/vtk-8-2-0-install-failure-macos-mojave-vtk-use-x-on/1726
**Category:** Support
**Created:** [September 9, 2019, 6:26pm UTC](https://discourse.vtk.org/t/vtk-8-2-0-install-failure-macos-mojave-vtk-use-x-on/1726 "2019-09-09T18:26:51Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![chenager](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/c/2acd7d/32.png) [@chenager](https://discourse.vtk.org/u/chenager)
#### Post date: [September 9, 2019, 6:26pm UTC](https://discourse.vtk.org/t/vtk-8-2-0-install-failure-macos-mojave-vtk-use-x-on/1726/1 "2019-09-09T18:26:51Z")

</div>

Although I can successfully build VTK-8.2.0 with Qt and VTK\_USE\_COCOA=On I need to install it to use X11 and when I turn VTK\_USE\_X=On and COCOA=Off and direct VTK to /opt/local/lib for OpenGL install then I get this error message:

Undefined symbols for architecture x86\_64:  
“\_kCFCoreFoundationVersionNumber”, referenced from:  
vtkOpenGLRenderer::HaveApplePrimitiveIdBug() in vtkOpenGLRenderer.cxx.o  
ld: symbol(s) not found for architecture x86\_64  
clang: error: linker command failed with exit code 1 (use -v to see invocation)  
make[2]: \*\*\* [lib/libvtkRenderingOpenGL2-8.2.1.dylib] Error 1  
make[1]: \*\*\* [Rendering/OpenGL2/CMakeFiles/vtkRenderingOpenGL2.dir/all] Error 2  
make: \*\*\* [all] Error 2

Any suggestions?

Chuck

---

<div class="post-metadata">

### Author: ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)
#### Post date: [September 10, 2019, 5:08pm UTC](https://discourse.vtk.org/t/vtk-8-2-0-install-failure-macos-mojave-vtk-use-x-on/1726/2 "2019-09-10T17:08:22Z")

</div>

I don’t think anyone uses the combination of MacOS + X11 with VTK. In other words, “here be dragons”, you are in unexplored territory. I’m sure it can be tweaked so that it works, but don’t know how many “tweaks” are needed. Probably lots.

---

<div class="post-metadata">

### Author: ![chenager](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/c/2acd7d/32.png) [@chenager](https://discourse.vtk.org/u/chenager)
#### Post date: [September 10, 2019, 5:41pm UTC](https://discourse.vtk.org/t/vtk-8-2-0-install-failure-macos-mojave-vtk-use-x-on/1726/3 "2019-09-10T17:41:44Z")

</div>

this software tries to.

[https://www.ctcms.nist.gov/oof/oof3d/prerequisites.html](https://www.ctcms.nist.gov/oof/oof3d/prerequisites.html)

But, I have it running on my linux server so I guess it’s a no never mind now.

---

<div class="post-metadata">

### Author: ![dhomeier](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/d/ec9cab/32.png) [@dhomeier](https://discourse.vtk.org/u/dhomeier)
#### Post date: [April 11, 2020, 5:46pm UTC](https://discourse.vtk.org/t/vtk-8-2-0-install-failure-macos-mojave-vtk-use-x-on/1726/4 "2020-04-11T17:46:46Z")

</div>

If it’s still of interest to get it built on the Mac, I had the same error on Sierra and found it wants to lookup that symbol to check the OS X version for applying a bug fix. As the fix should no longer be necessary on 10.12 and later, simply commenting the whole block out worked for me:

```auto
--- VTK-8.2.0-orig/Rendering/OpenGL2/vtkOpenGLRenderer.cxx 2019-01-30 18:15:13.000000000 +0100
+++ VTK-8.2.0/Rendering/OpenGL2/vtkOpenGLRenderer.cxx 2020-04-11 05:54:12.000000000 +0200
@@ -766,10 +766,10 @@
     // Apple fixed this bug in OS X 10.11 beta 15A216g.
     // kCFCoreFoundationVersionNumber10_10_Max = 1199, we use the raw number
     // because the constant isn't present in older SDKs.
- if (kCFCoreFoundationVersionNumber <= 1199)
- {
- this->HaveApplePrimitiveIdBugValue = true;
- }
+ // if (kCFCoreFoundationVersionNumber <= 1199)
+ // {
+ // this->HaveApplePrimitiveIdBugValue = true;
+ // }
 
     // but exclude systems we know do not have it
     std::string renderer = (const char *)glGetString(GL_RENDERER);

```
