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

Problems with included native library on FreeBSD, potentially others #604

Open
borjam opened this issue Oct 9, 2024 · 0 comments
Open

Comments

@borjam
Copy link

borjam commented Oct 9, 2024

I have stumbled upon a problem when using a snappy-java library bundled with a software package.

In my case my operating system is FreeBSD 14.1. The bundled native library seems to be much older, trying to link to the non existant libstdc++.so.6.

I have noticed that as a default snappy-java determines which native library it will need (in this case, FreeBSD) and unpacks it from the .jar file to a temporary directory. I have just started the program and the file name is:

/tmp/snappy-1.1.10-3a114908-1cf9-4b6e-a1b2-620bc8b26ea9-libsnappyjava.so

As I am using FreeBSD I have compiled snappy-java from ports myself (trivial task) and it installs two libraries:

snappyjava-1.1.10.5:
	/usr/local/lib/libsnappyjava.so. (the locally compiled native library)
	/usr/local/share/java/classes/snappy-java.jar

So, I think it would be ideal to:

  1. Check whether there is a native library installed. If present, link to it.
  2. If there is no native library, then use the bundled one as a last resort measure.

What do you think?

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

1 participant