Open ricab opened 3 years ago
Describe the bug Trying to recreate a package (after changing code) fails in macOS.
To Reproduce
$ ninja package [6/7] Run CPack packaging tool... CPack: Create package using productbuild CPack: Install projects CPack Error: Problem running install command: bash -x /Users/travis/multipass/multipass-afp/packaging/macos/install-ssl-libs.sh /Users/travis/multipass/build-afp Please check /Users/travis/multipass/build-afp/_CPack_Packages/Darwin/productbuild/InstallOutput.log for errors CPack Error: Error when generating package: multipass FAILED: CMakeFiles/package.util cd /Users/travis/multipass/build-afp && /usr/local/Cellar/cmake/3.18.4/bin/cpack --config ./CPackConfig.cmake ninja: build stopped: subcommand failed.
Logs The last message in InstallOutput.log is:
error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: for: /Users/travis/multipass/build-afp/lib/libssh.dylib (for architecture x86_64) option "-add_rpath /Users/travis/multipass/build-afp/install-ssh-libs" would duplicate path, file already has LC_RPATH for: /Users/travis/multipass/build-afp/install-ssh-libs
Workaround
rm -rf lib
Indeed, the rpath fixup scripts don't deal well with being run multiple times.
We could copy their targets to an intermediary place when packaging, and have the scripts target them there.
Describe the bug Trying to recreate a package (after changing code) fails in macOS.
To Reproduce
Logs The last message in InstallOutput.log is:
Workaround