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

[libc] Fix GPU test build error #92235

Merged
merged 1 commit into from
May 15, 2024
Merged

[libc] Fix GPU test build error #92235

merged 1 commit into from
May 15, 2024

Conversation

jplehr
Copy link
Contributor

@jplehr jplehr commented May 15, 2024

This fixes a build error on the AMDGPU buildbot introduced in PR #92172

@llvmbot
Copy link
Collaborator

llvmbot commented May 15, 2024

@llvm/pr-subscribers-libc

Author: Jan Patrick Lehr (jplehr)

Changes

This fixes a build error on the AMDGPU buildbot introduced in PR #92172


Full diff: https://github.com/llvm/llvm-project/pull/92235.diff

1 Files Affected:

  • (modified) libc/src/__support/StringUtil/tables/stdc_errors.h (+1-2)
diff --git a/libc/src/__support/StringUtil/tables/stdc_errors.h b/libc/src/__support/StringUtil/tables/stdc_errors.h
index a9c1527834550..6873d6bd51074 100644
--- a/libc/src/__support/StringUtil/tables/stdc_errors.h
+++ b/libc/src/__support/StringUtil/tables/stdc_errors.h
@@ -15,11 +15,10 @@
 
 namespace LIBC_NAMESPACE {
 
-LIBC_INLINE_VAR constexpr const MsgTable<4> STDC_ERRORS = {
+LIBC_INLINE_VAR constexpr const MsgTable<3> STDC_ERRORS = {
     MsgMapping(0, "Success"),
     MsgMapping(EDOM, "Numerical argument out of domain"),
     MsgMapping(ERANGE, "Numerical result out of range"),
-    MsgMapping(EILSEQ, "Invalid or incomplete multibyte or wide character"),
 };
 
 } // namespace LIBC_NAMESPACE

@lntue
Copy link
Contributor

lntue commented May 15, 2024

Look like you also need to update libc/test/src/string/strerror_test.cpp:100:

[3952/4270] Running unit test libc.test.src.string.strerror_test.__unit__
FAILED: projects/libc/test/src/string/CMakeFiles/libc.test.src.string.strerror_test.__unit__ /var/lib/buildkite-agent/builds/linux-56-59b8f5d88-2sq4t-1/llvm-project/github-pull-requests/build/projects/libc/test/src/string/CMakeFiles/libc.test.src.string.strerror_test.__unit__
cd /var/lib/buildkite-agent/builds/linux-56-59b8f5d88-2sq4t-1/llvm-project/github-pull-requests/build/projects/libc/test/src/string && /var/lib/buildkite-agent/builds/linux-56-59b8f5d88-2sq4t-1/llvm-project/github-pull-requests/build/projects/libc/test/src/string/libc.test.src.string.strerror_test.__unit__.__build__
[ RUN      ] LlvmLibcStrErrorTest.KnownErrors
/var/lib/buildkite-agent/builds/linux-56-59b8f5d88-2sq4t-1/llvm-project/github-pull-requests/libc/test/src/string/strerror_test.cpp:154: FAILURE
      Expected: __llvm_libc_19_0_0_git::strerror(static_cast<int>(i))
      Which is: Unknown error 84
To be equal to: message_array[i]
      Which is: Invalid or incomplete multibyte or wide character
[  FAILED  ] LlvmLibcStrErrorTest.KnownErrors

This fixes a build error on the AMDGPU buildbot introduced in PR
llvm#92172
@jhuber6 jhuber6 merged commit ccbf908 into llvm:main May 15, 2024
3 of 4 checks passed
@michaelrj-google
Copy link
Contributor

We will need to figure out a more permanent solution for errno numbers on GPUs because I would like to revert this patch when possible. Having a valid EILSEQ strerror on platforms that support it is important.

@jhuber6
Copy link
Contributor

jhuber6 commented May 15, 2024

We will need to figure out a more permanent solution for errno numbers on GPUs because I would like to revert this patch when possible. Having a valid EILSEQ strerror on platforms that support it is important.

I think this was broken on the CPU build beforehand, at least it was when I checked it, so reverting this would make that fail again.

@robincaloudis
Copy link
Contributor

robincaloudis commented May 15, 2024

We will need to figure out a more permanent solution for errno numbers on GPUs because I would like to revert this patch when possible. Having a valid EILSEQ strerror on platforms that support it is important.

I think this was broken on the CPU build beforehand, at least it was when I checked it, so reverting this would make that fail again.

This is true. #92172 broke fuchsia-x86_64-linux and openmp-offload-libc-amdgpu-runtime. I have not yet fully understood all details of the problem. I keep you updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants