Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-14001] Missing static library of libSwiftSyntaxParser for static build #313

Open
swift-ci opened this issue Dec 28, 2020 · 2 comments
Open

Comments

@swift-ci
Copy link

@swift-ci swift-ci commented Dec 28, 2020

Previous ID SR-14001
Radar rdar://problem/72864705
Original Reporter mtgto (JIRA User)
Type Improvement
Additional Detail from JIRA
Votes 0
Component/s swift-format, SwiftSyntax
Labels Improvement
Assignee None
Priority Medium

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

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.

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.

@typesanitizer
Copy link

@typesanitizer typesanitizer commented Jan 6, 2021

@swift-ci create

@keith
Copy link
Collaborator

@keith keith commented Feb 25, 2021

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants