[WARN ][o.e.b.Natives ] JNA not found. native methods will be disabled. [WARN ][o.e.b.Natives ] cannot check if running as root because JNA is not available [o.e.b.Natives ] cannot register console handler because JNA is not available [ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [] fatal error in thread [main], exiting java.lang.NoClassDefFoundError: com/sun/jna/win32/StdCallLibrary$StdCallCallback # ls -l /usr/local/lib/elasticsearch/lib lrwxr-xr-x 1 root wheel 62 Feb 27 14:55 jna.jar -> ../../../../../../../../../../local/share/java/classes/jna.jar The symbolic link path is wrong.
It was right, but the file wasn't there because it was accidentally set as a BUILD_DEPENDS instead of RUN_DEPENDS. This has been fixed in the next PORTREVISION bump.
no, the link is wrong nonetheless.
(In reply to Lorenz Pressler from comment #2) The link is not wrong. It is a relative symlink which is what the portmgr team now prefers which is why it looks strange. Here's output from a production server: $ pkg info | grep elas elasticsearch5-5.6.8_2 Full-text search engine for Java $ ls -la jna.jar lrwxr-xr-x 1 root wheel 72 Feb 26 23:23 jna.jar -> ../../../../../../../../../../../../usr/local/share/java/classes/jna.jar $ file jna.jar jna.jar: symbolic link to ../../../../../../../../../../../../usr/local/share/java/classes/jna.jar $ file $ md5 jna.jar MD5 (jna.jar) = 5736a11b203679cda4b3cb5237a82b70 $ md5 ../../../../../../../../../../../../usr/local/share/java/classes/jna.jar MD5 (../../../../../../../../../../../../usr/local/share/java/classes/jna.jar) = 5736a11b203679cda4b3cb5237a82b70 $
I do not care about compatible symlink. It does not work because "/usr" is missing in my environment. # ls -l /usr/local/lib/elasticsearch/lib lrwxr-xr-x 1 root wheel 62 Feb 27 14:55 jna.jar -> ../../../../../../../../../../local/share/java/classes/jna.jar
(In reply to Yoshito Uchiyama from comment #4) Do you mean you don't have /usr in your filesystem at all? Is this a specialized FreeBSD install?
No, my FreeBSD is not a special install. % ls -l /usr/local/share/java/classes -rw-r--r-- 1 root wheel 1439719 Feb 27 15:09 jna.jar % ls -l /usr/local/lib/elasticsearch/lib lrwxr-xr-x 1 root wheel 62 Feb 27 14:55 jna.jar -> ../../../../../../../../../../local/share/java/classes/jna.jar ^ '/usr' is missing This symbolic link is broken.
Thank you for 5.6.8_3. However, the link is unchanged and it is broken. % ls -l /usr/local/lib/elasticsearch/lib lrwxr-xr-x 1 root wheel 62 Mar 2 11:07 jna.jar -> ../../../../../../../../../../local/share/java/classes/jna.jar
Makefile ${INSTALL} -lrs ${JAVASHAREDIR}/classes/jna.jar ${STAGEDIR}${PREFIX}/lib/elasticsearch/lib/jna.jar This line is being done as below. install -lrs /usr/local/share/java/classes/jna.jar /usr/ports/textproc/elasticsearch5/work/stage/usr/local/lib/elasticsearch/lib/jna.jar % ls -l /usr/ports/textproc/elasticsearch5/work/stage/usr/local/lib/elasticsearch/lib total 0 lrwxr-xr-x 1 root wheel 62 Mar 2 14:28 jna.jar -> ../../../../../../../../../../local/share/java/classes/jna.jar At this point this is the correct symbolic link. However, if this link is simply copied to /usr/local/lib/elasticsearch/lib, it becomes a broken symbolic link.
A commit references this bug: Author: feld Date: Fri Mar 2 13:06:24 UTC 2018 New revision: 463392 URL: https://svnweb.freebsd.org/changeset/ports/463392 Log: textproc/elasticsearch{5,6}: Fix symlink Relative symlinks should only be used when both files are in the STAGEDIR. In this situation poudriere was producing usable packages because of the unique location of WRKSRC (/wrksrc/...) which caused the relative symlink to be deep enough "../../../../../" to hit the root of the filesystem and then point to the location of the file. However, users who were building the port directory with "make" or "portmaster" were getting symlinks that did not point to the right location. PR: 226234 226265 222261 Changes: head/textproc/elasticsearch5/Makefile head/textproc/elasticsearch6/Makefile