Unable to build vapor 18.3.3 with Swift 5.5 on Ubuntu 20.04
titimoby opened this issue · 4 comments
Describe the bug
Unable to build vapor 18.3.3 with Swift 5.5 on Ubuntu 20.04
To Reproduce
After having installed Swift 5.5, I follow the linux guide:
git clone https://github.com/vapor/toolbox.git
cd toolbox
git checkout 18.3.3
make install
Expected behavior
I expect a vapor binary
Environment
- Vapor Framework version: Instructions only mention vapor toolbox, maybe I missed something
- Vapor Toolbox version: 18.3.3
- OS version: Ubuntu 20.04
Additional context
last part of log, I can provide complete log if useful. I just don't know how you wants full logs attached.
1. Swift version 5.5 (swift-5.5-RELEASE)
2.
3. While evaluating request ExecuteSILPipelineRequest(Run pipelines { PrepareOptimizationPasses, EarlyModulePasses, HighLevel,Function+EarlyLoopOpt, HighLevel,Module+StackPromote, Serialize, MidLevel,Function, ClosureSpecialize, LowLevel,Function, LateLoopOpt, SIL Debug Info Generator } on SIL for NIOPosix.NIOPosix)
4. While running pass #19711 SILModuleTransform "GlobalOpt".
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
/home/gitpod/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0x5a1fd93]
/home/gitpod/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0x5a1dc7e]
/home/gitpod/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0x5a20115]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x153c0)[0x7f46e36ad3c0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb)[0x7f46e315518b]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x12b)[0x7f46e3134859]
/lib/x86_64-linux-gnu/libc.so.6(+0x25729)[0x7f46e3134729]
/lib/x86_64-linux-gnu/libc.so.6(+0x36f36)[0x7f46e3145f36]
/home/gitpod/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0x103f8cf]
/home/gitpod/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0x1041ec8]
/home/gitpod/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0x10ef649]
/home/gitpod/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0xd9f510]
/home/gitpod/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0xda1e0a]
/home/gitpod/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0xd9bd78]
/home/gitpod/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0xd9bd2b]
/home/gitpod/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0xdbc8ba]
/home/gitpod/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0xda72c3]
/home/gitpod/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0xd9bf55]
/home/gitpod/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0xda8e1f]
/home/gitpod/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0x6f7c12]
/home/gitpod/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0x56bcba]
/home/gitpod/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0x56b68e]
/home/gitpod/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0x55ed13]
/home/gitpod/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0x4b140e]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7f46e31360b3]
/home/gitpod/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0x4b104e]
Swift/ErrorType.swift:200: Fatal error: Error raised at top level: build.ShellError(terminationStatus: 1)
Current stack trace:
0 libswiftCore.so 0x00007f62b31fca10 swift_reportError + 50
1 libswiftCore.so 0x00007f62b32751a0 _swift_stdlib_reportFatalErrorInFile + 109
2 libswiftCore.so 0x00007f62b2f824d2 <unavailable> + 1414354
3 libswiftCore.so 0x00007f62b2f821fb <unavailable> + 1413627
4 libswiftCore.so 0x00007f62b2f80ee0 _assertionFailure(_:_:file:line:flags:) + 447
5 libswiftCore.so 0x00007f62b2fe1c80 swift_errorInMain + 731
6 build 0x00005603b3abc127 <unavailable> + 8487
7 libc.so.6 0x00007f62b29e6fc0 __libc_start_main + 243
8 build 0x00005603b3abbe9e <unavailable> + 7838
make: *** [Makefile:5: build] Illegal instruction
make: *** Deleting file 'build'
@titimoby I'm assuming you're referring to the toolbox, not Vapor. Have you tried swift build -c release --disable-sandbox
instead of make install
?
I'm referring to the only things that is mentioned in https://docs.vapor.codes/4.0/install/linux/
So it makes sense that the only binary called vapor
is the toolbox.
I used your suggested compile and it works.
>> vapor --version
note: this Swift project does not depend on Vapor.
framework: not found
toolbox: 18.3.3
The makefile uses a swift build script that uses more options.
Is there a way I can help having a multi platform makefile?
I misread that. Yeah the binary output of building the toolbox is called vapor. Some of the build options like --enable-test-discovery
have been deprecated, which is probably why you encountered the error with make install
. You're welcome to submit a PR to update the script to cater to multiple Swift versions beyond 5.2!
This is a compiler error caused by a bug in Swift 5.5 and not related to Vapor. The makefile should work fine on all platforms once Swift is fixed! I'll close the issue for now but feel free to reopen if there are any other problems!