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

Jar loading should also consider 32 and 64bit libraries (non-universal ones) for OSX #216

Closed
zsawyer opened this issue Apr 10, 2013 · 5 comments

Comments

@zsawyer
Copy link

zsawyer commented Apr 10, 2013

In my project I ship my libraries for various platforms, so I also compile for OSX. I do that for 32 and 64 bit. (https://github.com/zsawyer/mumble-LinkAPI/blob/master/ide/scripts/make_osx.sh)

I did not compile a fat/universal library.

The problem is that when loading the libs from a jar I can only create a "darwin/libLibrary.dylib". I would be missing the os.arch variants

  • "darwin-x86/libLibrary.dylib"
  • "darwin-x86-64/libLibrary.dylib"

Will there be support for non-universal dylibs for the jar-loading?

@twall
Copy link
Contributor

twall commented Apr 10, 2013

you'll be able to specify an absolute path, I suppose, but why not just make a universal binary?

it's not like it's hard.

On Apr 9, 2013, at 8:17 PM, zsawyer wrote:

In my project I ship my libraries for various platforms, so I also compile for OSX. I do that for 32 and 64 bit. (https://github.com/zsawyer/mumble-LinkAPI/blob/master/ide/scripts/make_osx.sh)

I did not compile a fat/universal library.

The problem is that when loading the libs from a jar I can only create a "darwin/libLibrary.dylib". I would be missing the os.arch variants

• "darwin-x86/libLibrary.dylib"
• "darwin-x86-64/libLibrary.dylib"
Will there be support for non-universal dylibs for the jar-loading?


Reply to this email directly or view it on GitHub.

@zsawyer
Copy link
Author

zsawyer commented Apr 10, 2013

you'll be able to specify an absolute path, I suppose

So I have JNA take away the hassle of unpacking libraries and finding the right one myself - in this regard your suggestions sounds like a step back to me.

it's not like it's hard.

That is purely subjective ;). I don't have a mac so getting on one to recompile it is very troublesome aside from the problem of having no knowledge about universal libraries or osx.

Looking at the code to me it would be easier to not do an exception for darwin and support both build variants.
I mean the fat one could be copied to the right locations.
Or even better give general support for future universal libraries on other OSes as well?

Thanks for considering.

@twall
Copy link
Contributor

twall commented Apr 10, 2013

On Apr 9, 2013, at 10:30 PM, zsawyer wrote:

you'll be able to specify an absolute path, I suppose
So I have JNA take away the hassle of unpacking libraries and finding the right one myself - in this regard your suggestions sounds like a step back to me.

it's not like it's hard.
That is purely subjective ;). I don't have a mac so getting on one to recompile it is very troublesome aside from the problem of having no knowledge about universal libraries or osx.

I'm just saying that if you have the capability of compiling the mac code in the first place, you have the capability of combining the two binaries into a single one. JNA builds for three darwin architectures and bundles them.

lipo -create -outfile {dst} {x86} {x86_64} [{ppc}]

Looking at the code to me it would be easier to not do an exception for darwin and support both build variants.
I mean the fat one could be copied to the right locations.
Or even better give general support for future universal libraries on other OSes as well?

Thanks for considering.


Reply to this email directly or view it on GitHub.

@zsawyer
Copy link
Author

zsawyer commented Apr 10, 2013

That is a perfectly valid point and thank you for the hint with lipo. I'll definitely have a look at making a universal build nonetheless.

However I was also thinking about situations where one would depend on 3rd party libraries and does not get - for what ever reason - a universal library.

@twall
Copy link
Contributor

twall commented Apr 18, 2013

Addressed with 9740335.

@twall twall closed this as completed Apr 18, 2013
mstyura pushed a commit to mstyura/jna that referenced this issue Sep 9, 2024
Motivation:

At the moment we use http to download rpms, let's switch to https whenever possible

Modifications:

Use https for rpms

Result:

Hopefully more stable docker image builds
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

2 participants