swiftenv icon indicating copy to clipboard operation
swiftenv copied to clipboard

Install latest Swift with DBUILD_SHARED_LIBS set to NO

Open Jeehut opened this issue 6 years ago • 0 comments

Currently there's SR-7039 open which prevents me from installing the amazing Mint package manager on my Ubuntu 16.04 CI running with Swift 4.1.3 (I also tried 4.0.3 and Snapshot-2018-08-02 without success). Here's the related issue on that on the Mint project.

In the discussion of SR-7039 Joel Saltzman explains a workaround in a comment which basically means I have to pass a different parameter when installing swift-corelibs-libdispatch during the Swift installation. So I was thinking of just doing that manually by running the following additional commands after installing Swift via swiftenv install 4.1.3 like so:

# Workaround for issue [SR-7039]
sudo apt-get install cmake ninja-build clang systemtap-sdt-dev libbsd-dev linux-libc-dev
cmake -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DBUILD_SHARED_LIBS=NO <path-to-source>
ninja
ninja install

But I actually have no idea what to specify to <path-to-source> or if this approach could even work after having already installed Swift. Is there a way I can pass the parameter -DBUILD_SHARED_LIBS=NO when installing Swift with swiftenv?

Thanks for any help!

Jeehut avatar Aug 04 '18 09:08 Jeehut