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-1294] Ubuntu 16.04 swift fails to link: protected relocation issue #43902

Closed
trfiala mannequin opened this issue Apr 22, 2016 · 3 comments
Closed

[SR-1294] Ubuntu 16.04 swift fails to link: protected relocation issue #43902

trfiala mannequin opened this issue Apr 22, 2016 · 3 comments
Assignees

Comments

@trfiala
Copy link
Mannequin

trfiala mannequin commented Apr 22, 2016

Previous ID SR-1294
Radar None
Original Reporter @trfiala
Type Bug
Status Closed
Resolution Duplicate
Environment

Ubuntu 16.04 (final release) x86_64, clang-3.8, clang-3.6

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee @trfiala
Priority Medium

md5: 640fea68fd83309a7590e946e0eb7d4c

duplicates:

  • SR-1023 Build Error: Relocation R_X86_64_PC32

Issue Description:

I get the following linkage error, regardless of using clang-3.8 or clang-3.6 for the build (in both cases, with a symlink from /usr/bin/clang and /usr/bin/clang++ to the right one):

[565/652] Linking CXX shared library lib/swift/linux/x86_64/libswiftCore.so
FAILED: lib/swift/linux/x86_64/libswiftCore.so
: && /usr/bin/clang++ -fPIC -fno-stack-protector -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Werror=date-time -std=c++11 -fcolor-diagnostics -ffunction-sections -fdata-sections -Wdocumentation -Wimplicit-fallthrough -Wunreachable-code -Woverloaded-virtual -O3 -Wl,-z,defs -target x86_64-unknown-linux-gnu -isysroot / -lpthread -ldl -L/home/tfiala/src/lldb-github/build/buildbot_linux/swift-linux-x86_64/./lib/swift/linux/x86_64 -L/home/tfiala/src/lldb-github/build/buildbot_linux/swift-linux-x86_64/./bin/../lib/swift/linux/x86_64 -L/home/tfiala/src/lldb-github/build/buildbot_linux/swift-linux-x86_64/./bin/../lib/swift/linux -shared -Wl,-soname,libswiftCore.so -o lib/swift/linux/x86_64/libswiftCore.so lib/swift/linux/x86_64/swift_begin.o stdlib/public/core/linux/x86_64/Swift.o lib/swift/linux/x86_64/swift_end.o -L/home/tfiala/src/lldb-github/build/buildbot_linux/llvm-linux-x86_64/lib -L/home/tfiala/src/lldb-github/build/buildbot_linux/llvm-linux-x86_64/./lib lib/swift/linux/x86_64/libswiftRuntime.a lib/swift/linux/x86_64/libswiftStdlibStubs.a -licuuc -licui18n -Wl,-rpath,"$ORIGIN:/usr/lib/swift/linux" && :
/usr/bin/ld: stdlib/public/core/linux/x86_64/Swift.o: relocation R_X86_64_PC32 against protected symbol `_TMPSa' can not be used when making a shared object
/usr/bin/ld: final link failed: Bad value
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[565/652] Linking CXX static library lib/swift_static/linux/x86_64/libswiftCore.a
ninja: build stopped: subcommand failed.

I've also tried with gold linker and without.

@belkadan
Copy link
Contributor

belkadan commented Apr 25, 2016

@jckarter, rlovelett (JIRA User), where did we leave off with this? Is it already tracked elsewhere?

@swift-ci
Copy link
Collaborator

swift-ci commented Apr 25, 2016

Comment by Ryan Lovelett (JIRA)

This appears to be a duplicate of SR-1023. For which, there is a pull request; though it seems to have fallen off the review treadmill. I have been using the patch proposed in 2012 to build everything, including SwiftPM and Foundation. I've been rebasing it frequently to keep it fresh with the HEAD of master.

Though as I've pointed out on the mailing list I need help on what the best way to conditional the Driver patch.

@trfiala
Copy link
Mannequin Author

trfiala mannequin commented Apr 25, 2016

Dupe looks right.

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

No branches or pull requests

2 participants