Swift does not release for Alpine Linux. So I try to create swift-format static binary in Ubuntu and copy it to super-linter docker image.
My Dockerfile
FROM swiftlang/swift:nightly-bionic
WORKDIR /swift-format
RUN git clone --branch 0.50300.0 --depth 1 https://github.com/apple/swift-format.git .
RUN swift build --static-swift-stdlib --configuration release
It causes compile error (linker error):
#9 26.28 [24/93] Compiling SwiftSyntax AbsolutePosition.swift #9 26.28 /swift-format/.build/checkouts/swift-syntax/Sources/SwiftSyntax/SyntaxParser.swift:17:8: error: no such module '_InternalSwiftSyntaxParser' #9 26.28 import _InternalSwiftSyntaxParser
I find dynamic library of _InternalSwiftSyntaxParser, but I miss to find static library.
$ docker run -it --rm swiftlang/swift:nightly-bionic /bin/bash root@a10b2d6fc367:/# swift --version Swift version 5.3-dev (LLVM bcee1b98f3b26c5, Swift dbcf7fe1bf76226) Target: x86_64-unknown-linux-gnu root@a10b2d6fc367:/# ls /usr/lib/swift/linux/lib_InternalSwiftSyntaxParser.so
Please enclose static library version of libSwiftSyntaxParser.
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: 1f02bbd7c2de3b78563baefd38f745f0
Issue Description:
I would like to use apple/swift-format in GitHub Actions.
github/super-linter is famous GitHub Action, which supports many programming languages.
https://github.com/github/super-linter#supported-linters
super-linter runs on Docker with Alpine Linux: https://github.com/github/super-linter/blob/v3.14.3/Dockerfile#L28
Swift does not release for Alpine Linux. So I try to create swift-format static binary in Ubuntu and copy it to super-linter docker image.
My Dockerfile
It causes compile error (linker error):
I find dynamic library of _InternalSwiftSyntaxParser, but I miss to find static library.
https://github.com/apple/swift/tree/main/tools/libSwiftSyntaxParser
$ docker run -it --rm swiftlang/swift:nightly-bionic /bin/bash
root@a10b2d6fc367:/# swift --version
Swift version 5.3-dev (LLVM bcee1b98f3b26c5, Swift dbcf7fe1bf76226)
Target: x86_64-unknown-linux-gnu
root@a10b2d6fc367:/# ls /usr/lib/swift/linux/lib_InternalSwiftSyntaxParser.so
Please enclose static library version of libSwiftSyntaxParser.
The text was updated successfully, but these errors were encountered: