inviwo / inviwo

Inviwo - Interactive Visualization Workshop
BSD 2-Clause "Simplified" License
451 stars 138 forks source link

Package Verification fails on MacOS #240

Open Sparkier opened 6 years ago

Sparkier commented 6 years ago

Issue

On MacOS, even after disabling the UnitTests, the packaging does not work correctly. We get the following error:

CPack: - Install project: inviwo-projects
CMake Error at /usr/local/Cellar/cmake/3.12.2/share/cmake/Modules/BundleUtilities.cmake:1106 (message):
 error: verify_app failed
Call Stack (most recent call first):
 /usr/local/Cellar/cmake/3.12.2/share/cmake/Modules/BundleUtilities.cmake:964 (verify_app)
 /Users/travis/build/onc/inviwo/build/apps/inviwo/cmake_install.cmake:54 (fixup_bundle)
 /Users/travis/build/onc/inviwo/build/apps/cmake_install.cmake:37 (include)
 /Users/travis/build/onc/inviwo/build/cmake_install.cmake:75 (include)

Additionally to building on a local machine, we have done this build on Travis, where you can directly look at the build result. https://travis-ci.org/onc/inviwo/builds/428512261

Steps to reproduce

git clone https://github.com/inviwo/inviwo.git
git submodule update --init --recursive
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DIVW_PACKAGE_PROJECT=ON -DIVW_PACKAGE_INSTALLER=ON -DIVW_UNITTESTS=OFF -DIVW_UNITTESTS_RUN_ON_BUILD=OFF
cmake .. -DCMAKE_BUILD_TYPE=Release -DIVW_PACKAGE_PROJECT=ON -DIVW_PACKAGE_INSTALLER=ON -DIVW_UNITTESTS=OFF -DIVW_UNITTESTS_RUN_ON_BUILD=OFF
cmake --build . --target package

Environment information

petersteneteg commented 6 years ago

hehe, just fun right, Nice thing about the cmake BundleUtilities is the very nice informative error messages :)

This could be python related, wrote this note some time back.. "Issue with the python lib, python as a sub app bundle inside of the framework which will give an error in the app validation. CPack will copy /usr/local/opt/python3/Frameworks/Python.framework/Versions/3.5/Python into the app but /usr/local/opt/python3/Frameworks/Python.framework/Versions/3.5/Python/Resources contains the embedded python app. By temporarily removing the Resources folder the packaging will work."

Might be of help....

Sparkier commented 6 years ago

Thanks, that was it (however you managed to find that out 😄), I think we can close this issue.

petersteneteg commented 6 years ago

Well it took a bit off digging ;) Ideally we should have a automatic fix for this in our package system...

Sparkier commented 6 years ago

Probably yes, we fixed it directly in Travis for building the dmg that can be uploaded directly to git upon release, however, anyone building this themselves will run into the same issue. When doing this in CMake, however, since copying this happens automatically, one would have to remove this folder (at least temporarily) from this location. I don't know if auto-removing something with CMake deep in /usr/local/ is a good idea.

petersteneteg commented 6 years ago

Yes, exactly which is why the issue is still there...