# Updating macOS port on Macports to v5.8.0, vtk gets installed into /usr/local/

**URL:** https://discourse.paraview.org/t/updating-macos-port-on-macports-to-v5-8-0-vtk-gets-installed-into-usr-local/3835
**Category:** ParaView Support
**Created:** [March 17, 2020, 12:32am UTC](https://discourse.paraview.org/t/updating-macos-port-on-macports-to-v5-8-0-vtk-gets-installed-into-usr-local/3835 "2020-03-17T00:32:50Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![rdbisme](https://discourse.paraview.org/user_avatar/discourse.paraview.org/rdbisme/32/2330_2.png) [@rdbisme](https://discourse.paraview.org/u/rdbisme)
#### Post date: [March 17, 2020, 12:32am UTC](https://discourse.paraview.org/t/updating-macos-port-on-macports-to-v5-8-0-vtk-gets-installed-into-usr-local/3835/1 "2020-03-17T00:32:50Z")

</div>

Hello,  
I’m trying to bump the version of Paraview on Macports, but after updating the version, the build gets to 100%, but VTK tries to get installed into `/usr/local`.

I have the feeling that the option `-DMACOS_APP_INSTALL_PREFIX` is not used anymore. Is there something I need to tweak?

```auto
:info:destroot make[2]: Nothing to be done for `Wrapping/Python/CMakeFiles/paraview_python_copy.dir/build'.
:info:destroot [100%] Built target paraview_python_copy
:info:destroot /opt/local/bin/cmake -E cmake_progress_start /opt/local/var/macports/build/_Users_rubendibattista_git_macports-ports_science_paraview/paraview/work/build/CMakeFiles 0
:info:destroot /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/Makefile2 preinstall
:info:destroot make[1]: Nothing to be done for `preinstall'.
:info:destroot Install the project...
:info:destroot /opt/local/bin/cmake -P cmake_install.cmake
:info:destroot -- Install configuration: "Release"
:info:destroot CMake Error at cmake_install.cmake:48 (file):
:info:destroot file cannot create directory: /usr/local/lib/cmake/paraview-5.8/vtk. Maybe
:info:destroot need administrative privileges.

```

Those are the configure options Macports forwards to `cmake`:

```auto
opt/local/bin/cmake -G "CodeBlocks - Unix Makefiles"
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_NAME_DIR="/opt/local/lib"
-DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr"
-DCMAKE_C_COMPILER="$CC"
-DCMAKE_CXX_COMPILER="$CXX"
-DCMAKE_POLICY_DEFAULT_CMP0025=NEW
-DCMAKE_POLICY_DEFAULT_CMP0060=NEW
-DCMAKE_VERBOSE_MAKEFILE=ON
-DCMAKE_COLOR_MAKEFILE=ON
-DCMAKE_FIND_FRAMEWORK=LAST
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-DCMAKE_MAKE_PROGRAM=/usr/bin/make
-DCMAKE_MODULE_PATH="/opt/local/share/cmake/Modules"
-DCMAKE_PREFIX_PATH="/opt/local/share/cmake/Modules"
-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON
-Wno-dev
-DBUILD_TESTING:BOOL=OFF
-DMACOSX_APP_INSTALL_PREFIX=/opt/local/var/macports/build/_Users_rubendibattista_git_macports-ports_science_paraview/paraview/work/destroot/Applications/MacPorts
-DBUILD_SHARED_LIBS:BOOL=ON
-DPARAVIEW_QT_VERSION=5
-DQt5_DIR=/opt/local/libexec/qt5
-DQT_HELP_GENERATOR=/opt/local/libexec/qt5/bin/qhelpgenerator
-DQT_XMLPATTERNS_EXECUTABLE=/opt/local/libexec/qt5/bin/xmlpatterns
-DVTK_USE_SYSTEM_LIBRARIES:BOOL=ON
-DVTK_USE_SYSTEM_XDMF2:BOOL=OFF
-DPARAVIEW_ENABLE_PYTHON:BOOL=ON
-DPYTHON_EXECUTABLE=/opt/local/bin/python3.7
-DPYTHON_INCLUDE_DIR=/opt/local/Library/Frameworks/Python.framework/Versions/3.7/Headers/
-DPYTHON_LIBRARY=/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7.dylib
-DVTK_USE_SYSTEM_MPI4PY:BOOL=ON
-DPARAVIEW_ENABLE_FFMPEG:BOOL=ON
-DPARAVIEW_ENABLE_XDMF3:BOOL=ON
-DCMAKE_OSX_ARCHITECTURES="x86_64"
-DCMAKE_OSX_DEPLOYMENT_TARGET="10.15"
-DCMAKE_OSX_SYSROOT="/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk"
-DCMAKE_CXX_COMPILER=/usr/bin/clang++
-DCMAKE_C_COMPILER=/usr/bin/clang
-DPARAVIEW_USE_MPI:BOOL=ON
-DMPI_C_COMPILER=mpicc-mpich-mp
-DMPI_CXX_COMPILER=mpicxx-mpich-mp
-DMPIEXEC=mpiexec-mpich-mp
-DMPI_Fortran_COMPILER=mpif90-mpich-mp
-DVTK_USE_SYSTEM_DIY2:BOOL=OFF
/opt/local/var/macports/build/_Users_rubendibattista_git_macports-ports_science_paraview/paraview/work/ParaView-v5.8.0
-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF

```

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [March 17, 2020, 1:53am UTC](https://discourse.paraview.org/t/updating-macos-port-on-macports-to-v5-8-0-vtk-gets-installed-into-usr-local/3835/2 "2020-03-17T01:53:50Z")

</div>

@ben.boeckel @cory.quammen

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [March 21, 2020, 2:26am UTC](https://discourse.paraview.org/t/updating-macos-port-on-macports-to-v5-8-0-vtk-gets-installed-into-usr-local/3835/3 "2020-03-21T02:26:25Z")

</div>

> [@rdbisme](#):
>
> ```auto
> :info:destroot file cannot create directory: /usr/local/lib/cmake/paraview-5.8/vtk. Maybe
> :info:destroot need administrative privileges.
> 
> ```

Does it need `sudo` privileges? Though…it seems that macports needs to update their CMake options. The `share/cmake/Modules` subdirectory is old and there’s nothing setting `CMAKE_INSTALL_PREFIX=/opt/local`, so the default of `/usr/local` still applies.

---

<div class="post-metadata">

### Author: ![rdbisme](https://discourse.paraview.org/user_avatar/discourse.paraview.org/rdbisme/32/2330_2.png) [@rdbisme](https://discourse.paraview.org/u/rdbisme)
#### Post date: [March 21, 2020, 8:01pm UTC](https://discourse.paraview.org/t/updating-macos-port-on-macports-to-v5-8-0-vtk-gets-installed-into-usr-local/3835/4 "2020-03-21T20:01:35Z")

</div>

Ehi @ben.boeckel, thanks. But the fact that `CMAKE_INSTALL_PREFIX` is missing is due to the fact that, theoretically, this should be an App bundle, shouldn’t it? For that reason, it should use `-DMACOSX_APP_INSTALL_PREFIX` as prefix to install the App bundle. Am I wrong?

And morevoer macports already has rights to write into `/opt/local`.

The problem here is that now it tries to install `vtk` following `CMAKE_INSTALL_PREFIX` instead of following the path for the App bundle.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [March 21, 2020, 9:33pm UTC](https://discourse.paraview.org/t/updating-macos-port-on-macports-to-v5-8-0-vtk-gets-installed-into-usr-local/3835/5 "2020-03-21T21:33:25Z")

</div>

It makes an app bundle, but it isn’t relocatable _as_ a bundle (the prefix as a whole is the relocatable bit right now). It’s basically a standard Unix-style install layout with `bin/Applications/paraview.app` using relative paths into that prefix. For a relocatable bundle, the superbuild is necessary.

---

<div class="post-metadata">

### Author: ![rdbisme](https://discourse.paraview.org/user_avatar/discourse.paraview.org/rdbisme/32/2330_2.png) [@rdbisme](https://discourse.paraview.org/u/rdbisme)
#### Post date: [March 21, 2020, 11:41pm UTC](https://discourse.paraview.org/t/updating-macos-port-on-macports-to-v5-8-0-vtk-gets-installed-into-usr-local/3835/6 "2020-03-21T23:41:10Z")

</div>

Yes, no problem about that. It always has been like that. So, do I need to specify the `-DCMAKE_INSTALL_PREFIX` then? 🙂

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [March 21, 2020, 11:49pm UTC](https://discourse.paraview.org/t/updating-macos-port-on-macports-to-v5-8-0-vtk-gets-installed-into-usr-local/3835/7 "2020-03-21T23:49:15Z")

</div>

Yeah, that’s the first step in the solution. I recommend going through `Documentation/dev/build.md` document to see what variables you actually need to set with the 9.0 release (since a lot of things got moved around). Anything not mentioned there or in CMake docs is either undocumented (and probably has some other way of handling it) or is no longer relevant.

---

<div class="post-metadata">

### Author: ![rdbisme](https://discourse.paraview.org/user_avatar/discourse.paraview.org/rdbisme/32/2330_2.png) [@rdbisme](https://discourse.paraview.org/u/rdbisme)
#### Post date: [April 7, 2020, 12:52am UTC](https://discourse.paraview.org/t/updating-macos-port-on-macports-to-v5-8-0-vtk-gets-installed-into-usr-local/3835/8 "2020-04-07T00:52:34Z")

</div>

Ehi @ben.boeckel could you please refer me to the part of `CMakeLists.txt` of ParaView that handles the creation of the macOS App bundle?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [April 7, 2020, 12:30pm UTC](https://discourse.paraview.org/t/updating-macos-port-on-macports-to-v5-8-0-vtk-gets-installed-into-usr-local/3835/9 "2020-04-07T12:30:50Z")

</div>

ParaView itself does not handle that. You need the [paraview-superbuild](https://gitlab.kitware.com/paraview/paraview-superbuild) for that. At least if you want a relocatable bundle.

The skeleton bundle in ParaView itself is made by `add_executable(MACOSX_BUNDLE)` in [`ParaViewClient.cmake`](https://gitlab.kitware.com/paraview/paraview/-/blob/master/CMake/ParaViewClient.cmake#L82).

---

<div class="post-metadata">

### Author: ![rdbisme](https://discourse.paraview.org/user_avatar/discourse.paraview.org/rdbisme/32/2330_2.png) [@rdbisme](https://discourse.paraview.org/u/rdbisme)
#### Post date: [April 7, 2020, 1:54pm UTC](https://discourse.paraview.org/t/updating-macos-port-on-macports-to-v5-8-0-vtk-gets-installed-into-usr-local/3835/10 "2020-04-07T13:54:47Z")

</div>

I don’t necessarily want a relocatable bundle.

Before 5.8.0 (and maybe 5.7.0), the normal `CMakeLists.txt` from paraview was able to generate a non-relocatable bundle (there was the build option `-DMACOSX_APP_INSTALL_PREFIX` to set where to put it).

Can I now stll make it?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [April 7, 2020, 5:30pm UTC](https://discourse.paraview.org/t/updating-macos-port-on-macports-to-v5-8-0-vtk-gets-installed-into-usr-local/3835/11 "2020-04-07T17:30:29Z")

</div>

There’s still a bundle (`bin/Applications/paraview.app` I think), but the install prefix is the point of relocatability, not the `paraview.app` directory.

---

<div class="post-metadata">

### Author: ![tcspestana](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/t/258eb7/32.png) [@tcspestana](https://discourse.paraview.org/u/tcspestana)
#### Post date: [October 16, 2020, 1:53pm UTC](https://discourse.paraview.org/t/updating-macos-port-on-macports-to-v5-8-0-vtk-gets-installed-into-usr-local/3835/12 "2020-10-16T13:53:36Z")

</div>

Hi Ruben, did you manage to get it fixed at the end?

---

<div class="post-metadata">

### Author: ![rdbisme](https://discourse.paraview.org/user_avatar/discourse.paraview.org/rdbisme/32/2330_2.png) [@rdbisme](https://discourse.paraview.org/u/rdbisme)
#### Post date: [October 16, 2020, 9:30pm UTC](https://discourse.paraview.org/t/updating-macos-port-on-macports-to-v5-8-0-vtk-gets-installed-into-usr-local/3835/13 "2020-10-16T21:30:45Z")

</div>

Ehi Tiago, unfortunately I did not have anymore bandwith to investigate that. I plan to do that, but at the moment I’m busy with my PhD thesis. 🙂

---

<div class="post-metadata">

### Author: ![salomchedlidze](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/f05b48/32.png) [@salomchedlidze](https://discourse.paraview.org/u/salomchedlidze)
#### Post date: [March 11, 2021, 6:07am UTC](https://discourse.paraview.org/t/updating-macos-port-on-macports-to-v5-8-0-vtk-gets-installed-into-usr-local/3835/14 "2021-03-11T06:07:03Z")

</div>

Hello,  
It is first time I am trying to build paraview; I tried to find the same error in this support group and maybe this one (I am replying to) is most similar.  
I am building paraview on a computing cluster. First I tried to build cmake by  
`make install`  
but it gives this error:

```
[100%] Built target foo
Install the project...
-- Install configuration: "Release"
CMake Error at Source/kwsys/cmake_install.cmake:46 (file):
  file cannot create directory: /usr/local/doc/cmake-3.20/cmsys. Maybe need
  administrative privileges.
Call Stack (most recent call first):
  cmake_install.cmake:47 (include)

make: *** [install] Error 1

```

Should I contact cluster support team or maybe there is easier solution?

Thanks,  
Salome

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [March 11, 2021, 8:55am UTC](https://discourse.paraview.org/t/updating-macos-port-on-macports-to-v5-8-0-vtk-gets-installed-into-usr-local/3835/15 "2021-03-11T08:55:31Z")

</div>

I doubt that you are using macOS and MacPorts.  
You probably need to use sudo or to set CMAKE\_INSTALL\_PREFIX.

If you have further questions, please open your own topic.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [March 11, 2021, 8:55am UTC](https://discourse.paraview.org/t/updating-macos-port-on-macports-to-v5-8-0-vtk-gets-installed-into-usr-local/3835/16 "2021-03-11T08:55:36Z")

</div>


