pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

help with running a Java program on NetBSD



Hi!

I'd like to run https://technology.a-sit.at/pdf-over-2/ on
 NetBSD-current/amd64.

Older versions of the Linux binary were built using java8 and I used
oracle-jre8 to run them, this worked. The latest version is built
using Java 17, so I tried using openjdk17, but that doesn't work:

ERROR | main @ at.asit.pdfover.gui.Main | Unhandled error
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
        no swt-gtk-4950r5 in java.library.path: /usr/java/packages/lib/amd64:/usr/pkg/lib/jni:/usr/pkg/lib:/lib:/usr/lib
        no swt-gtk in java.library.path: /usr/java/packages/lib/amd64:/usr/pkg/lib/jni:/usr/pkg/lib:/lib:/usr/lib
        no swt in java.library.path: /usr/java/packages/lib/amd64:/usr/pkg/lib/jni:/usr/pkg/lib:/lib:/usr/lib
        /home/wiz/.swt/lib/NetBSD/x86_64/libswt-gtk-4950r5.so: /home/wiz/.swt/lib/NetBSD/x86_64/libswt-gtk-4950r5.so: Shared object "libc.so.6" not found
        Can't load library: /home/wiz/.swt/lib/NetBSD/x86_64/libswt-gtk.so
        Can't load library: /home/wiz/.swt/lib/NetBSD/x86_64/libswt.so
        /home/wiz/.swt/lib/NetBSD/x86_64/libswt-gtk-4950r5.so: /home/wiz/.swt/lib/NetBSD/x86_64/libswt-gtk-4950r5.so: Shared object "libc.so.6" not found

        at org.eclipse.swt.internal.Library.loadLibrary(Library.java:348)
        at org.eclipse.swt.internal.Library.loadLibrary(Library.java:257)
        at org.eclipse.swt.internal.C.<clinit>(C.java:19)
        at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:209)
        at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:155)
        at org.eclipse.swt.widgets.Display.<clinit>(Display.java:167)
        at at.asit.pdfover.commons.Constants.<clinit>(Constants.java:62)
        at at.asit.pdfover.gui.Main.main(Main.java:49)

NetBSD's libc is at major version 12, not 6.
There's an /emul/linux//lib64/libc.so.6

The contents of .swt/lib/NetBSD/x86_64:

-rwxr-xr-x  1 wiz  users  602544 Sep 13 21:33 libswt-gtk-4950r5.so
-rwxr-xr-x  1 wiz  users  544864 Feb  3  2021 libswt-gtk-4928r15.so
-rwxr-xr-x  1 wiz  users  544928 May 17  2020 libswt-gtk-4880.so

.swt/lib/NetBSD/x86_64/libswt-gtk-4880.so:    ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=34d3416d79e52336ddc0ecd633a88f0dbb603ee7, stripped
.swt/lib/NetBSD/x86_64/libswt-gtk-4928r15.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=1f4a8beb5b154b383f7c14597c0b6180a8c55e84, stripped
.swt/lib/NetBSD/x86_64/libswt-gtk-4950r5.so:  ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=ecdfcb4ac349203e02f26fc00eb6470ee3b4fa8a, stripped

wiz@yt:~> ldd .swt/lib/NetBSD/x86_64/*
.swt/lib/NetBSD/x86_64/libswt-gtk-4880.so:
        -lc.6 => not found
.swt/lib/NetBSD/x86_64/libswt-gtk-4928r15.so:
        -lc.6 => not found
.swt/lib/NetBSD/x86_64/libswt-gtk-4950r5.so:
        -lc.6 => not found

So perhaps those are Linux binaries?

The source code for the program seems to be available:

https://git.egiz.gv.at/pdf-over/

but I have no experience building Java programs, and my naive tries
didn't get it to build.

Can someone please help in getting this running on NetBSD?

Thanks,
 Thomas


Home | Main Index | Thread Index | Old Index