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

Native test cases do not build on Alpine linux #416

Closed
lumpfish opened this issue Mar 11, 2021 · 3 comments
Closed

Native test cases do not build on Alpine linux #416

lumpfish opened this issue Mar 11, 2021 · 3 comments
Labels
Milestone

Comments

@lumpfish
Copy link
Contributor

lumpfish commented Mar 11, 2021

The systemtest build fails on Alpine Linux with

00:42:17  build-natives-unix:
00:42:17       [exec] make[2]: Entering directory '/home/jenkins/workspace/Test_openjdk16_hs_sanity.system_x86-64_alpine-linux/openjdk-tests/system/openjdk-systemtest/openjdk.test.modularity/src/tests/com.test.jlink/native'
00:42:17       [exec] mkdir -p /home/jenkins/workspace/Test_openjdk16_hs_sanity.system_x86-64_alpine-linux/openjdk-tests/system/openjdk-systemtest/openjdk.test.modularity/bin/tests/com.test.jlink/native/bin/linux_x86-64
00:42:17       [exec] chmod 755 /home/jenkins/workspace/Test_openjdk16_hs_sanity.system_x86-64_alpine-linux/openjdk-tests/system/openjdk-systemtest/openjdk.test.modularity/bin/tests/com.test.jlink/native/bin/linux_x86-64
00:42:17       [exec] mkdir -p /home/jenkins/workspace/Test_openjdk16_hs_sanity.system_x86-64_alpine-linux/openjdk-tests/system/openjdk-systemtest/openjdk.test.modularity/bin/tests/com.test.jlink/native/lib/linux_x86-64
00:42:17       [exec] chmod 755 /home/jenkins/workspace/Test_openjdk16_hs_sanity.system_x86-64_alpine-linux/openjdk-tests/system/openjdk-systemtest/openjdk.test.modularity/bin/tests/com.test.jlink/native/lib/linux_x86-64
00:42:17       [exec] gcc -D_JNI_IMPLEMENTATION_ -D_TRIVIAL_AGENT -O0 -g3 -pedantic -c -Wall -std=c99 -fPIC -fno-omit-frame-pointer -static-libgcc -m64 -o /home/jenkins/workspace/Test_openjdk16_hs_sanity.system_x86-64_alpine-linux/openjdk-tests/system/openjdk-systemtest/openjdk.test.modularity/bin/tests/com.test.jlink/native/lib/linux_x86-64/JniTest.o -I. -I/home/jenkins/workspace/Test_openjdk16_hs_sanity.system_x86-64_alpine-linux/openjdk-tests/system/openjdk-systemtest/openjdk.test.modularity/bin/tests/com.test.jlink/native/lib -I/home/jenkins/workspace/Test_openjdk16_hs_sanity.system_x86-64_alpine-linux/openjdkbinary/j2sdk-image/include/linux -I/home/jenkins/workspace/Test_openjdk16_hs_sanity.system_x86-64_alpine-linux/openjdkbinary/j2sdk-image/include -I/usr/include JniTest.c
00:42:17       [exec] make[2]: Leaving directory '/home/jenkins/workspace/Test_openjdk16_hs_sanity.system_x86-64_alpine-linux/openjdk-tests/system/openjdk-systemtest/openjdk.test.modularity/src/tests/com.test.jlink/native'
00:42:17       [exec] makefile:252: JAVA_EXECUTABLE set to /home/jenkins/workspace/Test_openjdk16_hs_sanity.system_x86-64_alpine-linux/openjdkbinary/j2sdk-image/bin/java/
00:42:17       [exec] In file included from /home/jenkins/workspace/Test_openjdk16_hs_sanity.system_x86-64_alpine-linux/openjdk-tests/system/openjdk-systemtest/openjdk.test.modularity/bin/tests/com.test.jlink/native/lib/adoptopenjdk_test_modularity_jlink_JniTest.h:2,
00:42:17       [exec]                  from JniTest.c:17:
00:42:17       [exec] /home/jenkins/workspace/Test_openjdk16_hs_sanity.system_x86-64_alpine-linux/openjdkbinary/j2sdk-image/include/jni.h:39:10: fatal error: stdio.h: No such file or directory
00:42:17       [exec]    39 | #include <stdio.h>
00:42:17       [exec]       |          ^~~~~~~~~
00:42:17       [exec] compilation terminated.
00:42:17       [exec] make[2]: *** [makefile:283: /home/jenkins/workspace/Test_openjdk16_hs_sanity.system_x86-64_alpine-linux/openjdk-tests/system/openjdk-systemtest/openjdk.test.modularity/bin/tests/com.test.jlink/native/lib/linux_x86-64/JniTest.o] Error 1
00:42:17  

Sample job link: https://ci.adoptopenjdk.net/job/Test_openjdk16_hs_sanity.system_x86-64_alpine-linux/4/

@lumpfish lumpfish changed the title Native test cases do not build on Apline linux Native test cases do not build on Alpine linux Mar 11, 2021
@smlambert
Copy link
Contributor

smlambert commented Mar 12, 2021

This is now resolved with the updates to docker images for the 2 test machines (by running apk add musl-dev to ensure presence of stdio.h, see adoptium/infrastructure#2026).

We now can compile system test material and get to the stage of running tests, which fail with another missing piece related to machine setup, see https://ci.adoptopenjdk.net/view/Test_system/job/Test_openjdk16_hs_extended.system_x86-64_alpine-linux/7/tapResults/ to find that there is a diagnostics package required.

/local-test/git/openjdk-systemtest/openjdk.build # perl -e 'use diagnostics;'
couldn't find diagnostic data in /usr/share/perl5/core_perl/pods/perldiag.pod /usr/local/lib/perl5/site_perl /usr/local/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl -e at /usr/share/perl5/core_perl/diagnostics.pm line 259, <POD_DIAG> line 711.
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
/local-test/git/openjdk-systemtest/openjdk.build

@Mesbah-Alam has referenced this link in the Slack thread on the topic.

@karianna
Copy link
Contributor

@lumpfish Safe ot close this?

@Mesbah-Alam
Copy link
Contributor

This issue can be closed. Further issues on getting system tests to run on Alpine Linux is being tracker here.

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

No branches or pull requests

4 participants