Subject: bug#29705: closed (Re: bug#29700: Java packages need to retain references)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 14 Dec 2017 23:47:03 +0000

Your bug report

#29700: Java packages need to retain references

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
29700: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=29700
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#29700: Java packages need to retain references
From: Ricardo Wurmus <[email-masked]>
To: Gábor Boskovits <[email-masked]>
Cc: [email-masked]
Date: Thu, 14 Dec 2017 23:59:22 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Gábor,

The manifest file would not be sufficient.  Take the example of
“java-usb4java”.  It provides a file “share/java/usb4java.jar”, which
contains this manifest:

--8<---------------cut here---------------start------------->8---
Manifest-Version: 1.0
Created-By: 1.7.0_161 (Oracle Corporation)

--8<---------------cut here---------------end--------------->8---

When you open the Loader.class file that is included in the archive you
will notice that it contains this string:

    /gnu/store/iwjqaqr98daqbgwswqi5fi4w891bqh7d-libusb4java-0-1.396d642a5/lib/libusb4java.so

This reference is currently dropped because it cannot be detected in a
compressed archive.  The reference is not contained in the manifest, and
at build time we could only guess which references should be added to
the manifest.

Unless we extend the reference scanner to deal with compressed files I
think that disabling compression in jars is the best approach.

I’ll push this to master.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

Subject: Java packages need to retain references
From: Ricardo Wurmus <[email-masked]>
To: [email-masked]
Date: Wed, 13 Dec 2017 23:28:00 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

I installed the “axoloti-patcher” package today after “guix gc” and
noticed that not all dependencies are available at runtime.  Upon
running the “Axoloti” command I got this error:

    Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: Can't load library: /gnu/store/nrx5nmwynmsl7aqxdpgwpsm8ff9b0h4d-libusb4java-0-1.396d642a5/lib/libusb4java.so

The store item does not exist.

The problem here is that jar archives are compressed and thus any
references they contain are thus hidden from the scanner.

I don’t know if it is feasible to disable compression for jar files, or
if we should install a “.guix-dependencies” file that contains plain
text references.

I’ll investigate disabling compression first.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net