Skip to content

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

@borjam

Description

@borjam

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions