You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a cross compilation environment targeting arm-linux, linking libbcheck 0.11.0 fails after cmake .. && cmake --build . --target install:
Linking C executable check_check
../src/libcheck.a(check_run.c.o): In function `set_fork_info':
/tmp/check-0.11.0/src/check_run.c:569: undefined reference to `WIFSIGNALED'
/tmp/check-0.11.0/src/check_run.c:570: undefined reference to `WIFEXITED'
/tmp/check-0.11.0/src/check_run.c:571: undefined reference to `WEXITSTATUS'
/tmp/check-0.11.0/src/check_run.c:572: undefined reference to `WTERMSIG'
../src/libcheck.a(check_run.c.o): In function `waserror':
/tmp/check-0.11.0/src/check_run.c:714: undefined reference to `WIFSIGNALED'
/tmp/check-0.11.0/src/check_run.c:715: undefined reference to `WIFEXITED'
/tmp/check-0.11.0/src/check_run.c:716: undefined reference to `WEXITSTATUS'
/tmp/check-0.11.0/src/check_run.c:717: undefined reference to `WTERMSIG'
Adding #include <sys/wait.h> to src/check_run.c fixes the problem.
The text was updated successfully, but these errors were encountered:
Do you know if cross compiling with the configure script is successful? The CMake support was initially added to support non-Unix platforms (e.g. Windows), and is not as mature for *unix or cross compiling.
I see that there is a check in configure.ac for the sys/wait.h header, which then controls an optional include in libcompat.h that is included in check_run.c. There is no such check in the CMake scripts, which was likely overlooked as Windows does not support fork() so that code is never compiled.
If using the configure script is sufficient, then perhaps go with that. If not, and you are up for adding the necessary support to the CMake scripts, I'll gladly accept your fixes. (:
In a cross compilation environment targeting arm-linux, linking libbcheck 0.11.0 fails after
cmake .. && cmake --build . --target install
:Adding
#include <sys/wait.h>
tosrc/check_run.c
fixes the problem.The text was updated successfully, but these errors were encountered: