unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#29705: Java packages need to retain references
@ 2017-12-13 22:28 Ricardo Wurmus
  2017-12-14  7:07 ` Gábor Boskovits
  0 siblings, 1 reply; 8+ messages in thread
From: Ricardo Wurmus @ 2017-12-13 22:28 UTC (permalink / raw)
  To: 29705

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#29700: Java packages need to retain references
@ 2017-12-13 22:48 Ricardo Wurmus
  2017-12-14 22:59 ` Ricardo Wurmus
  2017-12-15 14:55 ` Ludovic Courtès
  0 siblings, 2 replies; 8+ messages in thread
From: Ricardo Wurmus @ 2017-12-13 22:48 UTC (permalink / raw)
  To: 29700

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.  Looks like we can do this
in the strip-jar-timestamps phase where we use “zip” to repack the jar.
Adding “-0” to the arguments should be enough to make this work.

I’ll send a patch soon.

--
Ricardo

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#29705: Java packages need to retain references
  2017-12-13 22:28 bug#29705: Java packages need to retain references Ricardo Wurmus
@ 2017-12-14  7:07 ` Gábor Boskovits
  2017-12-14 22:22   ` bug#29700: " Ricardo Wurmus
  0 siblings, 1 reply; 8+ messages in thread
From: Gábor Boskovits @ 2017-12-14  7:07 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: 29705

[-- Attachment #1: Type: text/plain, Size: 1093 bytes --]

Would it be enough if we added the uncompressed manifest?
Is there any drawback to that?


2017-12-13 23:28 GMT+01:00 Ricardo Wurmus <rekado@fhain.coderdojo.berlin>:

> 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/nrx5nmwynmsl7aqxdpgwpsm8ff9b0h
> 4d-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
>
>
>
>
>

[-- Attachment #2: Type: text/html, Size: 1573 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#29700: Java packages need to retain references
  2017-12-14  7:07 ` Gábor Boskovits
@ 2017-12-14 22:22   ` Ricardo Wurmus
  0 siblings, 0 replies; 8+ messages in thread
From: Ricardo Wurmus @ 2017-12-14 22:22 UTC (permalink / raw)
  To: Gábor Boskovits; +Cc: 29700


Gábor Boskovits <boskovits@gmail.com> writes:

> Would it be enough if we added the uncompressed manifest?
> Is there any drawback to that?

I will test that.  I’m not sure if the manifest is really sufficient.

--
Ricardo

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#29700: Java packages need to retain references
  2017-12-13 22:48 Ricardo Wurmus
@ 2017-12-14 22:59 ` Ricardo Wurmus
  2017-12-15  6:44   ` Gábor Boskovits
  2017-12-15 14:55 ` Ludovic Courtès
  1 sibling, 1 reply; 8+ messages in thread
From: Ricardo Wurmus @ 2017-12-14 22:59 UTC (permalink / raw)
  To: Gábor Boskovits; +Cc: 29700-done

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#29700: Java packages need to retain references
  2017-12-14 22:59 ` Ricardo Wurmus
@ 2017-12-15  6:44   ` Gábor Boskovits
  2017-12-15  7:49     ` Ricardo Wurmus
  0 siblings, 1 reply; 8+ messages in thread
From: Gábor Boskovits @ 2017-12-15  6:44 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: 29700-done

[-- Attachment #1: Type: text/plain, Size: 1649 bytes --]

Do we know the impact of disabling compression?
I don't think it is really a big problem.
You are right with this, I'm still a bit stuck in another mindset, where we
usually know, that we have only one version of a package...
If we later decide that compression is desired we can still go with a text
file with references.
Anyway, do you think that extending the reference scanner would be a good
idea?


2017-12-14 23:59 GMT+01:00 Ricardo Wurmus <rekado@elephly.net>:

> 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
>
>
>

[-- Attachment #2: Type: text/html, Size: 2223 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#29700: Java packages need to retain references
  2017-12-15  6:44   ` Gábor Boskovits
@ 2017-12-15  7:49     ` Ricardo Wurmus
  0 siblings, 0 replies; 8+ messages in thread
From: Ricardo Wurmus @ 2017-12-15  7:49 UTC (permalink / raw)
  To: Gábor Boskovits; +Cc: 29700-done


Hi Gábor,

> If we later decide that compression is desired we can still go with a text
> file with references.

This wouldn’t always be feasible, because it would require *manual*
reference tracking.  The packager would need to know what references
need to be retained and then ensure that they are part of that text
file.

> Anyway, do you think that extending the reference scanner would be a good
> idea?

We had the same problem with gzipped R files and zipped Python things.
For the R files a more advanced reference scanner would not work,
because the files just include a gzipped section; it’s not the whole
file that’s simply gzipped.  Detecting sections is too hard.

But for Python and Jars it might just be enough.

[PS: please don’t top-post.]

--
Ricardo

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#29700: Java packages need to retain references
  2017-12-13 22:48 Ricardo Wurmus
  2017-12-14 22:59 ` Ricardo Wurmus
@ 2017-12-15 14:55 ` Ludovic Courtès
  1 sibling, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2017-12-15 14:55 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: 29700

Ricardo Wurmus <rekado@elephly.net> skribis:

> 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.

Disabling compression was the right choice because that also allows
grafts to work correctly.

Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-12-15 14:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-13 22:28 bug#29705: Java packages need to retain references Ricardo Wurmus
2017-12-14  7:07 ` Gábor Boskovits
2017-12-14 22:22   ` bug#29700: " Ricardo Wurmus
  -- strict thread matches above, loose matches on Subject: below --
2017-12-13 22:48 Ricardo Wurmus
2017-12-14 22:59 ` Ricardo Wurmus
2017-12-15  6:44   ` Gábor Boskovits
2017-12-15  7:49     ` Ricardo Wurmus
2017-12-15 14:55 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).