Problems with included native library on FreeBSD, potentially others

Aberta
#604 1 comentário 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
45/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Pouca atividade
Stack de tecnologia
java
Domínio
backend

Direção de pesquisa

Start by locating the code that selects and extracts the platform-specific native library from the JAR; the issue does not name a file or test. Check how native libraries installed outside the JAR could be discovered and loaded on FreeBSD, while preserving the bundled library as a fallback. Done means an installed native library is used when available and the bundled one remains the fallback; add tests for both paths.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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?

Linguagem predominante
Java
Estrelas
1.1k
Forks
261
Merge médio
2min
PRs com merge (30d)
2

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de xerial/snappy-java

Todas as issues de xerial/snappy-java

Issues semelhantes

Mais issues de Java

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.