Skip to content

Fix broken libc.so symlink in RHEL SDK built from Docker #40

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

Merged
merged 1 commit into from
Nov 3, 2023

Conversation

euanh
Copy link
Contributor

@euanh euanh commented Nov 3, 2023

What looks like a search-replace error in 527128c added a spurious "await" in the target of the rhel-ubi9.sdk/usr/lib64/libc.so symlink:

x86_64-unknown-linux-gnu/rhel-ubi9.sdk/usr/lib64/libc.so -> libc.await so.6

This causes the linker to be unable to find libc:

% swift build --experimental-swift-sdk 5.9-RELEASE_rhel_ubi9_x86_64
Building for debugging...
warning: Could not read SDKSettings.json for SDK at: /Users/euanh/Library/org.swift.swiftpm/swift-sdks/5.9-RELEASE_rhel_ubi9_x86_64.artifactbundle/5.9-RELEASE_rhel_ubi9_x86_64/x86_64-unknown-linux-gnu/rhel-ubi9.sdk
<unknown>:0: warning: glibc not found for 'x86_64-unknown-linux-gnu'; C stdlib may be unavailable
<unknown>:0: warning: glibc not found for 'x86_64-unknown-linux-gnu'; C stdlib may be unavailable
warning: Could not read SDKSettings.json for SDK at: /Users/euanh/Library/org.swift.swiftpm/swift-sdks/5.9-RELEASE_rhel_ubi9_x86_64.artifactbundle/5.9-RELEASE_rhel_ubi9_x86_64/x86_64-unknown-linux-gnu/rhel-ubi9.sdk
error: link command failed with exit code 1 (use -v to see invocation)
ld.lld: error: unable to find library -lc
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
error: fatalError
[5/6] Linking hello-world

I don't see any other similar search-replace problems in 527128c.

What looks like a search-replace error in 527128c
added a spurious "await" in the target of the rhel-ubi9.sdk/usr/lib64/libc.so symlink:

  x86_64-unknown-linux-gnu/rhel-ubi9.sdk/usr/lib64/libc.so -> libc.await so.6

This causes the linker to be unable to find libc:

  % swift build --experimental-swift-sdk 5.9-RELEASE_rhel_ubi9_x86_64
  Building for debugging...
  warning: Could not read SDKSettings.json for SDK at: /Users/euanh/Library/org.swift.swiftpm/swift-sdks/5.9-RELEASE_rhel_ubi9_x86_64.artifactbundle/5.9-RELEASE_rhel_ubi9_x86_64/x86_64-unknown-linux-gnu/rhel-ubi9.sdk
  <unknown>:0: warning: glibc not found for 'x86_64-unknown-linux-gnu'; C stdlib may be unavailable
  <unknown>:0: warning: glibc not found for 'x86_64-unknown-linux-gnu'; C stdlib may be unavailable
  warning: Could not read SDKSettings.json for SDK at: /Users/euanh/Library/org.swift.swiftpm/swift-sdks/5.9-RELEASE_rhel_ubi9_x86_64.artifactbundle/5.9-RELEASE_rhel_ubi9_x86_64/x86_64-unknown-linux-gnu/rhel-ubi9.sdk
  error: link command failed with exit code 1 (use -v to see invocation)
  ld.lld: error: unable to find library -lc
  clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
  error: fatalError
  [5/6] Linking hello-world

I don't see any other similar search-replace problems in
527128c.
@euanh euanh requested a review from MaxDesiatov as a code owner November 3, 2023 11:40
@euanh
Copy link
Contributor Author

euanh commented Nov 3, 2023

This problem is specific to RHEL-based SDKs. I'm still investigating problems with Ubuntu-based Docker SDKs as mentioned in #31 (review)

@MaxDesiatov
Copy link
Contributor

@swift-ci test

@MaxDesiatov MaxDesiatov enabled auto-merge (squash) November 3, 2023 11:46
@MaxDesiatov MaxDesiatov merged commit e7a283a into swiftlang:main Nov 3, 2023
@euanh euanh deleted the fix-rhel-symlink branch November 3, 2023 11:56
@euanh euanh added the bug Something isn't working label Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants