-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
LastErrorException broken on AIX #237
Comments
Cause: On AIX, errno is not thread safe unless _THREAD_SAFE_ERRNO is defined. (Read /usr/include/errno.h for details) Solution: Add the line "#define _THREAD_SAFE_ERRNO" before every occurrence of "#include <errno.h>". For perfect correctness, might be necessary to do so in the other places where errno.h is included: Another option would be to change the build scripts to add -D_THREAD_SAFE_ERRNO when calling the C compiler on AIX. (I believe that defining this on all platforms, not just AIX, should be harmless.) |
It's probably best to add it to CDEFINES in the Makfile AIX section, e.g.
which will ensure it's defined everywhere. Thanks for checking; contribution of the AIX natives would be welcome when you're done. |
Motivation: The third-party repos did turn out to be quite unstable. Modifications: - Just use vault.centos.org - Use devtoolset-7 Result: Hopefully more stable builds
The following test program works fine on, e.g. Linux, but fails on AIX. LastErrorException is not thrown even though call sets errno.
Using GIT master JNA, commit: 2b8773a
oslevel: 7.1.0.0
java version "1.6.0"
Java(TM) SE Runtime Environment (build pap6460sr9fp2-20110627_03(SR9 FP2))
IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 AIX ppc64-64 jvmap6460sr9-20110624_85526 (JIT enabled, AOT enabled)
J9VM - 20110624_085526
JIT - r9_20101028_17488ifx17
GC - 20101027_AA)
JCL - 20110530_01
The text was updated successfully, but these errors were encountered: