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-1631] swift-integration-tests failing, unable to find libFoundation.so #44240

Closed
ddunbar opened this issue May 27, 2016 · 5 comments
Closed
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@ddunbar
Copy link
Member

ddunbar commented May 27, 2016

Previous ID SR-1631
Radar None
Original Reporter @ddunbar
Type Bug
Status Closed
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s
Labels Bug
Assignee @ddunbar
Priority Medium

md5: c7127d94bb61db4b50e58913c9513879

relates to:

  • SR-1650 Fix DT_RUNPATH directives for installable toolchains
  • SR-1625 gold linker requires LD_LIBRARY_PATH, whereas bfd did not. Why?

Issue Description:

The integration tests are failing, the built binaries are unable to find their runtime libraries:

Command 7: "/tmp/swift-integration-tests/test-xctest-package/Output/test-xctest-package.py.tmp.dir/tool/.build/debug/tool"
Command 7 Result: 127
Command 7 Output:
None

Command 7 Stderr:
/tmp/swift-integration-tests/test-xctest-package/Output/test-xctest-package.py.tmp.dir/tool/.build/debug/tool: error while loading shared libraries: libFoundation.so: cannot open shared object file: No such file or directory
@ddunbar
Copy link
Member Author

ddunbar commented May 27, 2016

I am investigating, but I think this is fallout from the linker changes on swift master.

@ddunbar
Copy link
Member Author

ddunbar commented May 31, 2016

This occurs when linking XCTest without directly importing Foundation, and is fallout from the switch to Gold. FWIW, we can work around this by using gold's --disable-new-dflags option.

Several references:

  1. https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/1253638
  2. https://sourceware.org/ml/binutils/2014-02/msg00031.html
  3. https://lists.gnu.org/archive/html/bug-binutils/2013-02/msg00014.html

Based on that, I think the "official answer" here my be that our libraries had broken RPATHs previously, and so the switch to Gold broke it. I'm investigating what exactly we need to fix to get this working again.

@ddunbar
Copy link
Member Author

ddunbar commented May 31, 2016

Fix here:
apple/swift-corelibs-xctest#120

This solves the immediate problem, although I think there are more issues that really should be resolved to get our embedded DT_RUNPATH directives to be "correct".

@ddunbar
Copy link
Member Author

ddunbar commented May 31, 2016

Merged:
apple/swift-corelibs-xctest@b80b061

@ddunbar
Copy link
Member Author

ddunbar commented May 31, 2016

Filed:
https://bugs.swift.org/browse/SR-1650
for auditing this area.

@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

1 participant