yonaskolb / Mint

A package manager that installs and runs executable Swift packages
MIT License
2.27k stars 122 forks source link

Mint cannot run programs which build .so files. #211

Open deatondg opened 3 years ago

deatondg commented 3 years ago

Some SwiftPM projects build .so files on Linux, and these must be kept around for the built executables to work correctly. For example, on Ubuntu 20.04

sudo apt install binaryen libsqlite3-dev
mint install swiftwasm/carton@main
carton

builds successfully but crashes when running carton with

carton: error while loading shared libraries: libSwiftPMDataModel.so: cannot open shared object file: No such file or directory

If carton is built manually, and the resulting .build/x86_64-unknown-linux-gnu/release/libSwiftPMDataModel.so is copied into $MINT_PATH/packages/github.com_swiftwasm_carton/build/main, then carton runs successfully.

Mint should preserve these .so files when building projects which create them.