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-22] build fails when following the "getting started" on Ubuntu 14.04 #42645

Closed
swift-ci opened this issue Dec 3, 2015 · 6 comments
Closed
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Dec 3, 2015

Previous ID SR-22
Radar None
Original Reporter hwang (JIRA User)
Type Bug
Status Closed
Resolution Done
Environment

1:haohui@dell530n:~/source.swift/Hello[1019] 18:12:18
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.3 LTS"

1:haohui@dell530n:~/source.swift/Hello[1020] 18:14:48
$ ls Sources/
main.swift

1:haohui@dell530n:~/source.swift/Hello[1021] 18:15:45
$ cat Sources/main.swift
print("Hello, world!")

Additional Detail from JIRA
Votes 0
Component/s
Labels Bug
Assignee hwang (JIRA)
Priority Medium

md5: 0cdbb920e39a03c96a783f1f4c28fd86

Issue Description:

1:haohui@dell530n:~/source.swift/Hello[1018] 18:12:08
$ swift build
Linking Executable: .build/debug/Hello
<unknown>:0: error: link command failed with exit code 127 (use -v to see invocation)
<unknown>:0: error: build had 1 command failures
swift-build: exit(1): ["/opt/swift-2.2-SNAPSHOT-2015-12-01-b-ubuntu14.04/usr/bin/swift-build-tool", "-f", "/abyss/haohui/source.swift/Hello/.build/debug/Hello.o/llbuild.yaml"]

@gribozavr
Copy link
Collaborator

Please run 'sudo apt-get install clang'.

@swift-ci
Copy link
Collaborator Author

swift-ci commented Dec 3, 2015

Comment by H Wang (JIRA)

Thanks! I just found out about missing via strace.

4996 execve("clang+", ["clang+", "/abyss/haohui/source.swift/Hello"..., "L", "/opt/swift-2.2-SNAPSHOT-2015-12"..., "L", "/opt/swift-2.2-SNAPSHOT-2015-12"..., "-Xlinker", "-rpath", "Xlinker", "/opt/swift-2.2-SNAPSHOT-2015-12"..., "-lswiftCore", "@/tmp/main.swift-a403cd.autolink", "-Xlinker", "T", "/opt/swift-2.2-SNAPSHOT-2015-12"..., "-o", ...], [/* 35 vars */] <unfinished ...>
4994 write(2, " ", 1 <unfinished ...>
4996 <... execve resumed> ) = -1 ENOENT (No such file or directory)

@swift-ci
Copy link
Collaborator Author

swift-ci commented Dec 3, 2015

Comment by H Wang (JIRA)

Needs clang installed.

@ddunbar
Copy link
Member

ddunbar commented Dec 3, 2015

Note that we are considering adding a special case to the package manager to improve our diagnostics in this case, to make it more clear that this is just a case of missing "clang++". See:
apple/swift-package-manager#12

@gribozavr
Copy link
Collaborator

We have updated the getting started page to mention the clang requirement.

@mxcl
Copy link

mxcl commented Dec 7, 2015

I have also added a warning on build failure should clang++ not be detected in `PATH`.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Projects
None yet
Development

No branches or pull requests

4 participants