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-6082] Produce a better error message if Swift is run on a system without clang++ #48637

Open
belkadan opened this issue Oct 6, 2017 · 1 comment
Labels
compiler The Swift compiler itself good first issue Good for newcomers improvement legacy driver Area → compiler: the integrated C++ legacy driver. Succeeded by the swift-driver project Linux Platform: Linux

Comments

@belkadan
Copy link
Contributor

belkadan commented Oct 6, 2017

Previous ID SR-6082
Radar rdar://problem/23197056
Original Reporter @belkadan
Type Improvement
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Improvement, Driver, Linux, StarterBug
Assignee None
Priority Medium

md5: 0ed0a272c70aa068a13e89f859372a45

relates to:

  • SR-834 Very unhelpful error message when clang++ cannot be invoked

Issue Description:

Swift on Linux (and other non-Apple platforms) calls clang++ to perform linking; if it's not found, we used to get this lousy error message:

<unknown>:0: error: link command failed with exit code 127 (use -v to see invocation)

We should do better. (It's possible we already do do better; I just don't have access to a Linux system without clang++ installed at the moment. If you have such a system, you can help out with this bug by downloading Swift from https://swift.org/download/ and seeing what echo 'print("hello")' | swiftc - produces.)

@swift-ci
Copy link
Contributor

Comment by Alistair McMillan (JIRA)

On a brand new install of Ubuntu 16.04 running echo 'print("hello")' | swiftc - produces the following message...

/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by ./swiftc

So I updated libstdc++ using instructions from https://stackoverflow.com/a/46613765/35794 and now running echo 'print("hello")' | swiftc - produces...

<unknown>:0: error: link command failed with exit code 127 (use -v to see invocation)

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler The Swift compiler itself good first issue Good for newcomers improvement legacy driver Area → compiler: the integrated C++ legacy driver. Succeeded by the swift-driver project Linux Platform: Linux
Projects
None yet
Development

No branches or pull requests

2 participants