Comments (22)
I'm realizing that you and @kevinconaway are reporting two different issues here.
I believe its the same issue. The issue originally presented itself to us with the exact same stack trace that Jake posted. Its just that LibGmp
or perhaps NativeLibrary
swallows the original linker error. I pulled out the shared library file and tried to load it directly on my target system and thats where the error I posted came from.
from jna-gmp.
@dragonsinth It wasn't me. Was someone else. I just moved the report here.
from jna-gmp.
I did just update the CHANGELOG.md so it should be fairly ready to go.
from jna-gmp.
from jna-gmp.
from jna-gmp.
@JakeWharton we're seeing this as well after upgrading to 2.0.0 It looks like the shared library thats being distributed requires GLIBC 2.14 but our system has 2.12:
Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/jna--1159748624/jna6403537542271234011.tmp: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /tmp/jna--1159748624/jna6403537542271234011.tmp)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1929)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1814)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1083)
at Test.main(Test.java:10)
Dependencies for the 2.0.0 library:
ldd -r -v /tmp/jna--1159748624/jna6403537542271234011.tmp
ldd: warning: you do not have execution permission for `/tmp/jna--1159748624/jna6403537542271234011.tmp'
/tmp/jna--1159748624/jna6403537542271234011.tmp: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /tmp/jna--1159748624/jna6403537542271234011.tmp)
linux-vdso.so.1 => (0x00007fffdece7000)
libc.so.6 => /lib64/libc.so.6 (0x00007ffac21ec000)
/lib64/ld-linux-x86-64.so.2 (0x0000003b93800000)
symbol memcpy, version GLIBC_2.14 not defined in file libc.so.6 with link time reference (/tmp/jna--1159748624/jna6403537542271234011.tmp)
Version information:
/tmp/jna--1159748624/jna6403537542271234011.tmp:
libc.so.6 (GLIBC_2.3) => /lib64/libc.so.6
libc.so.6 (GLIBC_2.14) => not found
libc.so.6 (GLIBC_2.7) => /lib64/libc.so.6
libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6
/lib64/libc.so.6:
ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
Looking at the 1.x version:
ldd -r -v libgmp.so
ldd: warning: you do not have execution permission for `./libgmp.so'
linux-vdso.so.1 => (0x00007ffcc07dc000)
libc.so.6 => /lib64/libc.so.6 (0x00007f0994678000)
/lib64/ld-linux-x86-64.so.2 (0x000000383e800000)
Version information:
./libgmp.so:
libc.so.6 (GLIBC_2.3) => /lib64/libc.so.6
libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6
/lib64/libc.so.6:
ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
@dragonsinth Is this just a matter of recompiling libgmp on a machine that doesn't have glibc 2.14?
from jna-gmp.
I'm definitely at the limits of my knowledge when it comes to effectively building linux binaries. :( Especially all the nuances about building against particular library versions.
Googling "how do i create an lsb compatible binary gcc" turns up stuff that's like 7 years old and contains broken links. :/
I'd definitely welcome any expertise on this.
from jna-gmp.
@kevinconaway I would definitely suggest tho, if you recompile libgmp on the system you're trying to run on, it should work.
from jna-gmp.
BTW @JakeWharton I assume you got past the original issue reported? I'm realizing that you and @kevinconaway are reporting two different issues here.
from jna-gmp.
I would definitely suggest tho, if you recompile libgmp on the system you're trying to run on, it should work.
I did do that and it did work but, much like you, I'm not really knowledgeable beyond the standard ./configure && make
incantation. We run on a number of different platforms so ideally I'd like to build a version that targets the lowest common denominator but I'm not sure of the best way to do that.
from jna-gmp.
I'm interested in the outcome but I can't really spend the time to research the best way to build compatible binaries (past the half hour I already spend). But if someone can come up with a reasonable plan (like, use this docker image that contains an older distro) I'm happy to help execute and submit a new prebuilt binary.
from jna-gmp.
Sure. I'll spend some time and come up with a recommendation.
Thanks for your help so far
from jna-gmp.
JNA had this issue as well java-native-access/jna#853
from jna-gmp.
Looks like they solved it with "The native libraries were rebuild in a debian squeeze chroot, which
results in support for GLIBC version down to 2.7.". I'm not entirely sure what that means or how to set that up.
from jna-gmp.
$ ldd -r -v libgmp.so
linux-vdso.so.1 (0x00007ffebd945000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fdc93e01000)
/lib64/ld-linux-x86-64.so.2 (0x00007fdc9443b000)
Version information:
./libgmp.so:
libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.7) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
/lib/x86_64-linux-gnu/libc.so.6:
ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
Merged! Thanks so much for making this happen!
from jna-gmp.
Thanks so much for your prompt help on this @dragonsinth.
Will you be able to create a new release with this change?
from jna-gmp.
@JakeWharton usually does releases, I don't think I have access to publish artifacts anyway.
from jna-gmp.
from jna-gmp.
Thank you!
from jna-gmp.
Hi @JakeWharton, will you have time to create a release this week?
Thanks.
from jna-gmp.
@JakeWharton Will you have time to create a release with this issue?
If its OK with you, I'll continue to write one comment a week a la Andy Dufresne. We'd like to use some of the enhancements in 2.x but we can't without this patch.
Thanks!
from jna-gmp.
Got it, thank you!
from jna-gmp.
Related Issues (11)
- Should GmpInteger be relaxed to allow negative numbers? HOT 1
- Break apart GmpTest
- Consider having GmpInteger override certain BigInteger methods HOT 3
- Gmp.modPowInsecure() should support negative exponent. HOT 1
- Update README.md contributors to reflect recent contributions.
- Update readme to reflect new features.
- Add "java" to project description HOT 1
- java.lang.NoClassDefFoundError exception HOT 5
- How to run on Windows?
- plz help me
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jna-gmp.