-----Original Message-----
From: Doug Simon [mailto:doug.si...@oracle.com]
Sent: Thursday, May 22, 2014 5:40 PM
To: Caspole, Eric
Cc: Deneau, Tom; Bernhard Urban
Subject: Re: HSAIL unit tests fail when Okra library fails to load
On May 22, 2014, at 11:19 PM, Eric Caspole <eric.casp...@amd.com
<mailto:eric.casp...@amd.com>> wrote:
Hi Doug,
Do you think it is worth it to build the built in Okra simulator
with
an older glibc to help avoid this problem? What is the oldest
distro you
intend to support with Graal?
In theory we should support whatever HotSpot does although in
practice
we only need it to work on OSes for which we build distributions.
However, I think it's fine (for now at least) if we just cleanly
ignore/short-circuit the HSAIL unit tests in question on platforms
with
an older glibc.
-Doug
On 05/22/2014 07:33 AM, Doug Simon wrote:
Hi Tom, Eric,
We're in the process of making GraalVM binary builds that work on
Oracle Linux 6.5 which has an old version of glibc (GLIBC 2.12).
While
testing this build, the HSAIL tests that use the Okra library fail
because libokra_x86_64.so is built against a version of GLIBC
later than
2.12. However, the failure message is very confusing. For example:
$ mx --vm server unittest Vec3ObjStreamClassCastTest
GraalJUnitCore
JUnit version 4.11
.E
Time: 0.77
There was 1 failure:
1)
test(com.oracle.graal.compiler.hsail.test.Vec3ObjStreamClassCastTest)
java.lang.NoClassDefFoundError: Could not initialize class
com.amd.okra.OkraContext
at
com.oracle.graal.compiler.hsail.test.infra.KernelTester.<init>(KernelTes
ter.java:129)
at
com.oracle.graal.compiler.hsail.test.infra.GraalKernelTester.<init>(Graa
lKernelTester.java:63)
at
com.oracle.graal.compiler.hsail.test.SingleExceptionTestBase.<init>(Sing
leExceptionTestBase.java:32)
at
com.oracle.graal.compiler.hsail.test.Vec3ObjStreamClassCastTest.<init>(V
ec3ObjStreamClassCastTest.java:31)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA
ccessorImpl.java:62)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
tructorAccessorImpl.java:45)
at
java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at
org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunn
er.java:195)
at
org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4
ClassRunner.java:244)
Can you please make sure the HSAIL test harness recognizes a
failure
to load the Okra library (preferably issuing a message if it's for
any
other reason than the library not being available). One way to
trigger
this is to fake a bad library:
$ mkdir -p resources/okra/Linux
$ echo "bad" >resources/okra/Linux/libokra_x86_64.so
$ jar uvf lib/okra-1.9-with-sim.jar
resources/okra/Linux/libokra_x86_64.so
$ mx --vm server unittest Vec3ObjStreamClassCastTest
-Doug