From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?G=C3=A1bor?= Boskovits Subject: bug#31721: =?UTF-8?Q?=E2=80=9Cgenerate-jar-indices=E2=80=9D?= phase fails on many packages Date: Thu, 7 Jun 2018 10:46:41 +0200 Message-ID: References: <8736y11o2q.fsf@mdc-berlin.de> <20180607010620.31fbf16c@scratchpost.org> <877enbyse2.fsf@elephly.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000085e845056e09527d" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48918) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fQqZV-0006o4-Vx for bug-guix@gnu.org; Thu, 07 Jun 2018 04:47:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fQqZS-0001Kw-Pw for bug-guix@gnu.org; Thu, 07 Jun 2018 04:47:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:57749) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fQqZS-0001Kh-Jo for bug-guix@gnu.org; Thu, 07 Jun 2018 04:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fQqZS-0004xA-95 for bug-guix@gnu.org; Thu, 07 Jun 2018 04:47:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ricardo Wurmus Cc: 31721@debbugs.gnu.org --00000000000085e845056e09527d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 2018-06-07 10:27 GMT+02:00 G=C3=A1bor Boskovits : > 2018-06-07 9:20 GMT+02:00 Ricardo Wurmus : > >> >> Danny Milosavljevic writes: >> >> >> The errors are either about duplicates as in java-picard-2.10.3: >> >> >> >> duplicate entry: htsjdk/samtools/AbstractBAMFileIndex$1.class >> > >> > That's... bad. What if those files differed? Which one would be used >> at >> > runtime? >> >> I wonder where they come from. Is this from a dependency or are there >> actually two such classes? >> >> > Is it possible that these come from a package, where a renamed dependency > is > used in the original build system, thus avoiding the name duplication? I > will have a > look at this package source... Will report back if I can confirm this > assumption. > > This is what is in build.gradle: dependencies { compile('com.intel.gkl:gkl:0.8.5') { exclude module: 'htsjdk' } So we should exclude htsjdk module from gkl when building java-picard. Do we have a method to do that easily? > >> >> or about missing files as in dropseq-tools: >> >> >> >> java.io.FileNotFoundException: /gnu/store/q76y0ximcziplgfpbn2 >> 6kbw4h3s14f33-dropseq-tools-1.13/share/java/lib/biojava-alignment.jar >> > >> > That's also bad. How does it run at all if its dependencies are >> missing? >> >> To satisfy the dropseq-tools build system the dependencies a symlinked >> to the build directory. I suspect that the error is something to do >> with that. >> >> > The only thing I can think of that would improve things long term: >> > >> > The phase can add relative paths to all the dependencies to >> META-INF/MANIFEST.MF >> > before invoking "jar -i". >> > Then "jar -i" will index those - and all java packages can use regular >> inputs >> > instead of propagated inputs. I've tested that locally already - and = it >> > works fine. >> >> Is it correct that this would ensure that in case of duplicate class >> names this would pick the class from the current package? >> >> -- >> Ricardo >> >> >> >> > --00000000000085e845056e09527d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
2018= -06-07 10:27 GMT+02:00 G=C3=A1bor Boskovits <boskovits@gmail.com&g= t;:
2018-06-07 9:20 G= MT+02:00 Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>:

Danny Milosavljevic <dannym@scratchpost.org> writes:

>> The errors are either about duplicates as in java-picard-2.10.3: >>
>>=C2=A0 =C2=A0 =C2=A0duplicate entry: htsjdk/samtools/AbstractBAMFil= eIndex$1.class
>
> That's... bad.=C2=A0 What if those files differed?=C2=A0 Wh= ich one would be used at
> runtime?

I wonder where they come from.=C2=A0 Is this from a dependency or are there=
actually two such classes?


Is it possible tha= t these come from a package, where a renamed dependency is
used i= n the original build system, thus avoiding the name duplication? I will hav= e a
look at this package source... Will report back if I can conf= irm this assumption.

This is what is in build.gradle:
dependencies { compile(= 9;com.intel.gkl:gkl:0.8.5') { exclude modul= e: 'htsjdk' }
=C2=A0So we should exclude htsjdk = module from gkl when building java-picard.
Do we have a method to= do that easily?

=C2=A0
>> or about missing files as in dropseq-tools:
>>
>>=C2=A0 =C2=A0 =C2=A0java.io.Fil= eNotFoundException: /gnu/store/q76y0ximcziplgfpbn26kbw4h3s14f33-dropse= q-tools-1.13/share/java/lib/biojava-alignment.jar
>
> That's also bad.=C2=A0 How does it run at all if its depend= encies are missing?

To satisfy the dropseq-tools build system the dependencies a symlinked
to the build directory.=C2=A0 I suspect that the error is something to do with that.

> The only thing I can think of that would improve things long term:
>
> The phase can add relative paths to all the dependencies to META-INF/M= ANIFEST.MF
> before invoking "jar -i".
> Then "jar -i" will index those - and all java packages can u= se regular inputs
> instead of propagated inputs.=C2=A0 I've tested that locally alrea= dy - and it
> works fine.

Is it correct that this would ensure that in case of duplicate class
names this would pick the class from the current package?

--
Ricardo





--00000000000085e845056e09527d--