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

bindings/java: Link Linux libraries against glibc 2.17 #158

Merged
merged 1 commit into from
Feb 23, 2024

Conversation

unexge
Copy link
Contributor

@unexge unexge commented Feb 23, 2024

Since we're using a recent version of Ubuntu to build our libraries on Linux, they get linked against modern version of glibc.
This is however causes problems on hosts with old glibc (I'm looking at you Amazon Linux 😄).

Luckily, we can use Zig and especially cargo-zigbuild to build our Linux libraries against old glibc.

Before this PR:

$ objdump -T x86_64-unknown-linux-gnu/libregorus_java.so | grep GLIBC | sed 's/.*GLIBC_\([.0-9]*\).*/\1/g' | sort -Vu
2.2.5
2.3
2.3.2
2.3.4
2.14
2.17
2.18
2.25
2.28
2.29
2.33
2.34

After this PR:

$ objdump -T x86_64-unknown-linux-gnu/libregorus_java.so | grep GLIBC | sed 's/.*GLIBC_\([.0-9]*\).*/\1/g' | sort -Vu
2.2.5
2.3
2.3.4
2.14
2.17

@anakrish
Copy link
Collaborator

Thanks for identifying and fixing this @unexge.

Would it be possible for you to share where/how you are using the Java binding. That will help us in making a case for publishing the bindings officially via the Microsoft pipelines.

@anakrish anakrish merged commit a8c0588 into microsoft:main Feb 23, 2024
4 checks passed
@unexge
Copy link
Contributor Author

unexge commented Feb 24, 2024

Hey @anakrish, I work on a security org at Amazon. We're using OPA/Rego to evaluate some security policies. Most of our services are currently in Java and have a pure Java Rego interpreter. We're looking for more performant alternatives. I made a PoC using Regorus with Java bindings internally and the performance was really promising, looking for the next steps now.

@unexge unexge deleted the java-link-to-older-glibc branch February 24, 2024 10:56
@anakrish
Copy link
Collaborator

@unexge, Thanks for sharing your use case. It is a great data point for getting the bindings officially published.

Great to hear of your success with Regorus. I feel we can make it more performant. We've been mainly focused on compliance and understanding the nuances of Rego language so far.

@anakrish anakrish mentioned this pull request Mar 1, 2024
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

Successfully merging this pull request may close these issues.

None yet

2 participants