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

Native jar artifact does not include OpenBSD build #38

Closed
cprice404 opened this issue Oct 31, 2016 · 4 comments
Closed

Native jar artifact does not include OpenBSD build #38

cprice404 opened this issue Oct 31, 2016 · 4 comments
Milestone

Comments

@cprice404
Copy link
Contributor

The native jar artifacts for this project (e.g. http://repo1.maven.org/maven2/com/github/jnr/jffi/1.2.13/jffi-1.2.13-native.jar ) include .so files for most platforms, but not for OpenBSD.

OpenBSD is mentioned in the source code in several places, and if I install JRuby on OpenBSD, I can see this file:

/usr/local/jruby/lib/jni/x86_64-OpenBSD/libjffi-1.2.so

So I'm hoping maybe this is just a minor packaging oversight?

@headius
Copy link
Member

headius commented Nov 8, 2016

@cprice404 I think we just need someone to build the so and contribute it in a PR!

@buzzdeee
Copy link
Contributor

buzzdeee commented Nov 8, 2016

hi @headius,
I was providing access to one of my OpenBSD boxes for @cprice404, where he actually figured what the problem is. After he figured what the problem is, and following his suggestions, I did
as described here:
https://tickets.puppetlabs.com/browse/SERVER-14?focusedCommentId=365569&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-365569

On OpenBSD, there currently is jruby 9.1.5.0 installed/available, providing a
/usr/local/jruby/lib/jni/x86_64-OpenBSD/libjffi-1.2.so

I basically copied that file into the puppetserver jar, and things started to work.

If you are fine with me, taking that .so from that jruby version, I can create a PR against jffi.

There may or may not be a problem I see with that approach:

ldd /usr/local/jruby/lib/jni/x86_64-OpenBSD/libjffi-1.2.so
/usr/local/jruby/lib/jni/x86_64-OpenBSD/libjffi-1.2.so:
        Start            End              Type Open Ref GrpRef Name
        00000650c4844000 00000650c4a57000 dlib 2    0   0      /usr/local/jruby/lib/jni/x86_64-OpenBSD/libjffi-1.2.so
        000006500395b000 0000065003b6a000 rlib 0    1   0      /usr/lib/libpthread.so.23.0

with the next major or minor bump of libpthread, the once created .so might stop working.
OpenBSD doesn't have that concept of symlinking library versions with each other. so there is no such thing like a plain /usr/lib/libpthread.so or /usr/lib/libpthread.so.23.

There is only:
/usr/lib/libpthread.a /usr/lib/libpthread.so.23.0 /usr/lib/libpthread_p.a

not sure if I can kind of can link/create the libjffi-1.2.so file against the static libpthread.a.

Or do I see a problem where there is no problem?
If that might be a problem, hints on how to build the libjffi.so against the static libpthread.a are appreciated.

Other minor problem I want to point out, but for the time being neglectable: jruby port/packe is limited to AMD64 on OpenBSD, the comment says: "# Runtime failures on i386 in IO#pos and IO#rewind".
If there is a solution for libpthread, then I at least could build a libjffi.so for i386 as well, but it may or may not have runtime issues.

@buzzdeee
Copy link
Contributor

see PR #43

@headius
Copy link
Member

headius commented Jul 9, 2020

This was largely fixed by #43. Any additional issues should be filed separately.

@headius headius closed this as completed Jul 9, 2020
@headius headius added this to the 1.2.14 milestone Jul 9, 2020
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

3 participants