Source: biojava4-live
Version: 4.2.12+dfsg-7
Severity: serious
Tags: ftbfs patch
Dear Maintainer,
biojava4-live currently fails to build with the following error message:
compile:
[mkdir] Created dir:
/build/1st/biojava4-live-4.2.12+dfsg/build/biojava4-structure/classes
[javac]
/build/1st/biojava4-live-4.2.12+dfsg/biojava-structure/build.xml:86:
warning: 'includeantruntime' was not set, defaulting to
build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 483 source files to
/build/1st/biojava4-live-4.2.12+dfsg/build/biojava4-structure/classes
[javac]
/build/1st/biojava4-live-4.2.12+dfsg/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmcif/ZipChemCompProvider.java:239:
error: reference to newFileSystem is ambiguous
[javac] try (FileSystem fs =
FileSystems.newFileSystem(m_zipFile, null)) {
[javac] ^
[javac] both method newFileSystem(Path,ClassLoader) in FileSystems
and method newFileSystem(Path,Map<String,?>) in FileSystems match
[javac]
/build/1st/biojava4-live-4.2.12+dfsg/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmcif/ZipChemCompProvider.java:296:
error: reference to newFileSystem is ambiguous
[javac] try (FileSystem zipfs =
FileSystems.newFileSystem(zipFile, null)) {
[javac] ^
[javac] both method newFileSystem(Path,ClassLoader) in FileSystems
and method newFileSystem(Path,Map<String,?>) in FileSystems match
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use or override a deprecated API that
is marked for removal.
[javac] Note: Recompile with -Xlint:removal for details.
[javac] Note:
/build/1st/biojava4-live-4.2.12+dfsg/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmcif/MetalBondConsumer.java
uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 2 errors
(see
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/biojava4-live.html
for details)
When casting the null value to match one of the signatures this resolves
the build error. See the attached patch. I wasn't able to find the exact
upstream commit to reference since the file has been moved around, but
the patch is based on latest upstream and how they have chosen to
resolve the issue.
-- System Information:
Debian Release: bookworm/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 6.0.0-5-amd64 (SMP w/3 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
--
mvh / best regards
Hans Joachim Desserud
http://desserud.org
Description: Add explicit cast to fix ambiguos method call error
Taken from upstream to match expected method call
https://github.com/biojava/biojava/blob/master/biojava-structure/src/main/java/org/biojava/nbio/structure/chem/ZipChemCompProvider.java
---
Origin: upstream
Forwarded: not-needed
Last-Update: 2022-12-11
--- biojava4-live-4.2.12+dfsg.orig/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmcif/ZipChemCompProvider.java
+++ biojava4-live-4.2.12+dfsg/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmcif/ZipChemCompProvider.java
@@ -236,7 +236,7 @@ public class ZipChemCompProvider impleme
final String filename = "chemcomp/" + recordName+".cif.gz";
// try with resources block to read from the filesystem.
- try (FileSystem fs = FileSystems.newFileSystem(m_zipFile, null)) {
+ try (FileSystem fs = FileSystems.newFileSystem(m_zipFile, (ClassLoader)null)) {
Path cif = fs.getPath(filename);
if (Files.exists(cif)) {
@@ -293,7 +293,7 @@ public class ZipChemCompProvider impleme
*/
// Copy in each file.
- try (FileSystem zipfs = FileSystems.newFileSystem(zipFile, null)) {
+ try (FileSystem zipfs = FileSystems.newFileSystem(zipFile, (ClassLoader)null)) {
Files.createDirectories(pathWithinArchive);
for (File f : files) {
if (!f.isDirectory() && f.exists()) {