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

Fix unknown type name '__WAIT_STATUS' errors when compiling Julia on systems with older glibc versions. #30726

Closed

Conversation

mikhail-j
Copy link
Contributor

@StefanKarpinski @ararslan

When I compile Julia v1.0.3 on SUSE SLES 11 SP4, my compilation fails due to one of OpenBLAS's tests:

In file included from test_fork.c:36:0:
/usr/include/sys/wait.h:116:22: error: unknown type name ‘__WAIT_STATUS’
 extern __pid_t wait (__WAIT_STATUS __stat_loc);
                      ^
In file included from test_fork.c:36:0:
/usr/include/sys/wait.h:169:23: error: unknown type name ‘__WAIT_STATUS’
 extern __pid_t wait3 (__WAIT_STATUS __stat_loc, int __options,
                       ^
/usr/include/sys/wait.h:175:38: error: unknown type name ‘__WAIT_STATUS’
 extern __pid_t wait4 (__pid_t __pid, __WAIT_STATUS __stat_loc, int __options,
                                      ^
test_fork.c: In function ‘__ctest_fork_safety_run’:
test_fork.c:114:13: warning: implicit declaration of function ‘wait’ [-Wimplicit-function-declaration]
             pid_t wait_pid = wait(&child_status);
             ^
test_fork.c:116:13: warning: implicit declaration of function ‘WEXITSTATUS’ [-Wimplicit-function-declaration]
             ASSERT_EQUAL(0, WEXITSTATUS (child_status));
             ^
make[3]: *** [test_fork.o] Error 1
make[2]: *** [tests] Error 2
\033[33;1m*** Clean the OpenBLAS build with 'make -C deps clean-openblas'. Rebuild with 'make OPENBLAS_USE_THREAD=0' if OpenBLAS had trouble linking libpthread.so, and with 'make OPENBLAS_TARGET_ARCH=NEHALEM' if there were errors building SandyBridge support. Both these options can also be used simultaneously. ***\033[0m
make[1]: *** [scratch/openblas-e8a68ef261a33568b0f0cf53e0e2287e9f12e69e/build-compiled] Error 1
make: *** [julia-deps] Error 2

This particular issue was introduced in OpenMathLib/OpenBLAS#1450 (bug appears in OpenBLAS v0.3.0).

The software bug fix (OpenMathLib/OpenBLAS#1787) first appeared in OpenBLAS v0.3.4, so OpenBLAS v0.3.0 to v0.3.3 are affected by this bug.

This pull request adds the bug fix as a patch to OpenBLAS v0.3.2 (Julia v1.0.3) during compilation.

In addition, this bug fix could be backported to Julia v0.7.0 (also uses OpenBLAS v0.3.2).

Copy link
Member

@vchuravy vchuravy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@staticfloat What is your policy for OpenBLAS patches these days? Should this go though the buildbots/Yggdrasil?

@vchuravy vchuravy requested a review from staticfloat January 16, 2019 11:14
@staticfloat
Copy link
Member

For now, Yggdrasil is going to just mirror what happens here; since this is a build system fix (and we don't have build system problems on Yggdrasil) I don't think I'll even bother to carry this patch. So I think this is fine as-is.

@giordano
Copy link
Contributor

Julia 1.0 is no longer supported and we're using a much more recent version of openblas nowadays which includes the proposed fix, so I'm going to close this pull request. Thanks anyway for your contribution!

@giordano giordano closed this Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants