TALP-UPC / FreeLing

FreeLing project source code
Other
252 stars 96 forks source link

link errors at runtime (Java API) for release 4.2 artifacts and src #121

Closed daniel-sudz closed 2 years ago

daniel-sudz commented 2 years ago

I'm trying to run the java API on amazon linux 2 by compiling from source. I am able to compile and run the CLI scripts such as analyze without a problem. However when running the provided Sample.java I get thrown a link error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: 'void edu.upc.Jfreeling.JfreelingJNI.Util_initLocale(java.lang.String)'
    at edu.upc.Jfreeling.JfreelingJNI.Util_initLocale(Native Method)
    at edu.upc.Jfreeling.Util.initLocale(Util.java:39)
    at Sample.main(Sample.java:41)

it is unusual as it seems like the core build is fine (since analyze works). The loading of libJfreeling.so also passes (just in case I also set LD_LIBRARY_PATH as per the documentation to no effect).

So far I've tested: 4.2 release and master with the same results. I am not sure if this is a regression in the Java API or some edge case environment issue. I going to try some older versions to confirm.

daniel-sudz commented 2 years ago

Same issue testing release artifact https://github.com/TALP-UPC/FreeLing/releases/download/4.2/freeling-4.2-bionic-amd64.deb on ubuntu-18.

can provide repro-script if it would be helpful for docker.

daniel-sudz commented 2 years ago

edit: I think this is a user error with how I was compiling the java code. I will close today if I resolve it