pvzig / SlackKit

Build Slack apps, in Swift
MIT License
1.02k stars 139 forks source link

Build fails on Ubuntu 18.04 #167

Closed khakionion closed 5 years ago

khakionion commented 5 years ago

Ubuntu 18.04.03, Swift 5.0.2, SlackKit "upToNextMinor 4.3.0"

Build silently fails, final output from swift build --verbose is like this:

/usr/bin/clang -target x86_64-unknown-linux --sysroot / -fPIC -g -O0 -DSWIFT_PACKAGE=1 -DDEBUG=1 -fblocks -fmodules -fmodule-name=CNIOOpenSSL -I /home/pseudo/gaijinbot/.build/checkouts/swift-nio-ssl/Sources/CNIOOpenSSL/include -fmodule-map-file=/home/pseudo/gaijinbot/.build/checkouts/swift-nio-ssl-support/module.modulemap -fmodules-cache-path=/home/pseudo/gaijinbot/.build/x86_64-unknown-linux/debug/ModuleCache -MD -MT dependencies -MF /home/pseudo/gaijinbot/.build/x86_64-unknown-linux/debug/CNIOOpenSSL.build/shims.c.d -c /home/pseudo/gaijinbot/.build/checkouts/swift-nio-ssl/Sources/CNIOOpenSSL/shims.c -o /home/pseudo/gaijinbot/.build/x86_64-unknown-linux/debug/CNIOOpenSSL.build/shims.c.o :

. $

khakionion commented 5 years ago

I did confirm that a basic Swift app that only includes Foundation can build and run in this environment.

khakionion commented 5 years ago

And, happens with SlackKit 4.4.0 as well it seems.

pvzig commented 5 years ago

CI currently isn't building 18.04 as it's not supported (https://github.com/Microsoft/azure-pipelines-image-generation/issues/506) so this has probably been broken for a while.

Looks like it's something related to swift-nio-ssl...

khakionion commented 5 years ago

Okay, so yeah, this issue doesn’t happen on swift-nio-ssl 2.x.

When I have some time I’ll checkout vapor/websocket and see if there are any relatively straightforward fixes.

khakionion commented 5 years ago

The root cause was that I didn't have libssl-dev installed. I filed a bug with Swift for the silent failure when building with SPM: https://bugs.swift.org/browse/SR-11380