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

Loading 32bit library when 64bit one is available #20

Closed
chrisseaton opened this issue Sep 22, 2015 · 7 comments
Closed

Loading 32bit library when 64bit one is available #20

chrisseaton opened this issue Sep 22, 2015 · 7 comments

Comments

@chrisseaton
Copy link

A colleague of mine has two versions of libcrypt.so.1 on Kubuntu 15.04.

/lib/i386-linux-gnu/libcrypt.so.1
/lib/x86_64-linux-gnu/libcrypt.so.1

JFFI, on behalf of jnr-posix, is loading the 32bit one when it should load the 64bit one. What is the mechanism, either in the OS or JFFI or wherever, that should ensure the correct one is loaded, and what could be going wrong here?

The 32bit library is needed by Skype for Linux, so it is not an obscure package.

@nirvdrum
Copy link
Contributor

I'm pretty sure the problem is in jnr-ffi and has already been fixed by jnr/jnr-ffi@b9fccdd

In the meanwhile, I think your colleague can get things working by changing a system property before JNR loads. The list searched is here:

https://github.com/jnr/jnr-ffi/blob/2.0.3/src/main/java/jnr/ffi/LibraryLoader.java#L338-L342

@jtulach
Copy link

jtulach commented Sep 23, 2015

I can confirm that running my Ruby program with as
$ ./bin/jruby -J-Djna.library.path=/lib/x86_64-linux-gnu/ -X+T ~/sieve.rb
workarounds the library resolution problem.

@chrisseaton
Copy link
Author

Great - I'll close as the fix should also be coming soon.

@jtulach
Copy link

jtulach commented Sep 23, 2015

OK. In addition to the above, here a way to successfully execute maven build on such dual bit system:
jruby-truffle-head/truffle$ mvn test -DargLine=-Djna.library.path=/lib/x86_64-linux-gnu/

@chrisseaton chrisseaton reopened this Sep 24, 2015
@chrisseaton
Copy link
Author

Reopened as this doesn't seem to be fixed yet.

@mkristian
Copy link
Contributor

this should be solved with jnr/jnr-ffi#52

at least it sounds all very familiar to my problem on ubuntu which is solved with the above PR

@headius
Copy link
Member

headius commented Oct 23, 2015

We'll call this fixed with jnr/jnr-ffi#52 until someone says otherwise.

@headius headius closed this as completed Oct 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants