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-9093] Cannot use Swift 4.2 on Linux Ubuntu 18.04 #51590

Open
swift-ci opened this issue Oct 26, 2018 · 4 comments
Open

[SR-9093] Cannot use Swift 4.2 on Linux Ubuntu 18.04 #51590

swift-ci opened this issue Oct 26, 2018 · 4 comments
Labels

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Oct 26, 2018

Previous ID SR-9093
Radar None
Original Reporter adtrevor (JIRA User)
Type Bug
Additional Detail from JIRA
Votes 0
Component/s
Labels Bug
Assignee None
Priority Medium

Watchers: @shahmishal

md5: b1a5c6e62d6a98544fcdb47d4f77f7f0

Issue Description:

After downloading Swift 4.2 on Ubuntu 18.04 and installing clang there is this error when trying to compile even the simplest program:

/usr/bin/ld: cannot find -lstdc++

Here is the full text of the error (when calling swift build):

Linking ./.build/x86_64-unknown-linux/debug/MonTest /usr/bin/ld.gold : erreur : -lstdc++ introuvable clang: error: linker command failed with exit code 1 (use -v to see invocation) <unknown>:0: error: link command failed with exit code 1 (use -v to see invocation) error: terminated(1): /home/username/Bureau/swift-4.2-release/usr/bin/swift-build-tool -f /home/username/MonTest/.build/debug.yaml main output:

And the same error with the -v option :

lsb_release -r which clang /home/username/Bureau/swift-4.2-release/usr/bin/swiftc --driver-mode=swift -L /home/username/Bureau/swift-4.2-release/usr/lib/swift/pm/4_2 -lPackageDescription -suppress-warnings -swift-version 4.2 -I /home/username/Bureau/swift-4.2-release/usr/lib/swift/pm/4_2 -sdk / /home/username/MonTest/Package.swift -fileno 5 /home/username/Bureau/swift-4.2-release/usr/bin/swift-build-tool -f /home/username/MonTest/.build/debug.yaml main -v /home/username/Bureau/swift-4.2-release/usr/bin/swiftc -target x86_64-unknown-linux -sdk / -g -L /home/username/MonTest/.build/x86_64-unknown-linux/debug -o /home/username/MonTest/.build/x86_64-unknown-linux/debug/MonTest -module-name MonTest -emit-executable -Xlinker '-rpath=$ORIGIN' @/home/username/MonTest/.build/x86_64-unknown-linux/debug/MonTest.product/Objects.LinkFileList /usr/bin/ld.gold : erreur : -lstdc++ introuvable clang: error: linker command failed with exit code 1 (use -v to see invocation) <unknown>:0: error: link command failed with exit code 1 (use -v to see invocation) error: terminated(1): /home/username/Bureau/swift-4.2-release/usr/bin/swift-build-tool -f /home/username/MonTest/.build/debug.yaml main -v output:

Even when installing all possible recommended dependencies for Swift the problem isn't solved.

@belkadan
Copy link
Contributor

belkadan commented Oct 29, 2018

@shahmishal, have we seen this before?

@shahmishal
Copy link
Member

shahmishal commented Oct 29, 2018

@belkadanI have not seen this issue before, adtrevor (JIRA User) I am going to try to reproduce this issue on new Ubuntu 18.04 system. Can you provide the steps you took to install Swift and other packages?

@swift-ci
Copy link
Collaborator Author

swift-ci commented Oct 31, 2018

Comment by Pop Flamingo (JIRA)

@shahmishal Thank you for your reply, the issue I have is that this isn't a clean Ubuntu install, so there are already installed packages that might be interfering.

I followed the installation steps described on swift.org, installed the latest clang version and also ran `sudo apt-get -y install libicu-dev libpython2.7 libcurl4` as this was required to make it work on clean Google Cloud instance I used, but unfortunately this didn't solve it on this machine.

@swift-ci
Copy link
Collaborator Author

swift-ci commented Oct 31, 2018

Comment by Pop Flamingo (JIRA)

About the required dependencies on Ubuntu 18.04, I did a new install and it seems that all I needed to install on a clean Google instance was clang and libpython2.7, it would be great if the install instructions were updated to match those.

About the problematic machine, I have to say that I don't understand at all what concretely causes this issue since all dependencies should be installed.

@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
Projects
None yet
Development

No branches or pull requests

3 participants