|
Bugzilla – Bug 620 |
SPIM_Registration fails to compile |
Last modified: 2013-06-11 11:10:23 CDT |
| ⚠ |
NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug. The Fiji project now uses GitHub Issues for issue tracking. Please file all new issues there. |
|
|
|
||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
Just pulled Fiji and called mvn which stops with: [INFO] ------------------------------------------------------------------------ [INFO] Building plugins/SPIM_Registration.jar [INFO] task-segment: [install] [INFO] ------------------------------------------------------------------------ [INFO] [buildnumber:create {execution: default}] [INFO] [imagej:set-rootdir {execution: set-rootdir}] [debug] execute contextualize [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 2 resources [INFO] [compiler:compile {execution: default-compile}] [INFO] Compiling 24 source files to /home/saalfeld/workspace/fiji-clean/src-plugins/SPIM_Registration/target/classes [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /home/saalfeld/workspace/fiji-clean/src-plugins/SPIM_Registration/src/main/java/mpicbg/spim/registration/bead/BeadRegistration.java:[192,73] invalid inferred types for S; inferred type does not conform to declared bound(s) inferred: mpicbg.spim.registration.bead.BeadIdentification bound(s): mpicbg.spim.registration.detection.DetectionIdentification<mpicbg.spim.registration.bead.BeadIdentification,T> [ERROR] /home/saalfeld/workspace/fiji-clean/src-plugins/SPIM_Registration/src/main/java/mpicbg/spim/registration/bead/BeadRegistration.java:[361,73] invalid inferred types for S; inferred type does not conform to declared bound(s) inferred: mpicbg.spim.registration.bead.BeadIdentification bound(s): mpicbg.spim.registration.detection.DetectionIdentification<mpicbg.spim.registration.bead.BeadIdentification,T> [ERROR] /home/saalfeld/workspace/fiji-clean/src-plugins/SPIM_Registration/src/main/java/mpicbg/spim/registration/detection/DetectionRegistration.java:[35,56] invalid inferred types for S; inferred type does not conform to declared bound(s) inferred: S bound(s): mpicbg.spim.registration.detection.DetectionIdentification<S,T> [ERROR] /home/saalfeld/workspace/fiji-clean/src-plugins/SPIM_Registration/src/main/java/mpicbg/spim/registration/detection/DetectionRegistration.java:[174,22] invalid inferred types for S; inferred type does not conform to declared bound(s) inferred: S bound(s): mpicbg.spim.registration.detection.DetectionIdentification<S,T> [ERROR] /home/saalfeld/workspace/fiji-clean/src-plugins/SPIM_Registration/src/main/java/mpicbg/spim/registration/detection/DetectionRegistration.java:[192,35] invalid inferred types for S; inferred type does not conform to declared bound(s) inferred: S bound(s): mpicbg.spim.registration.detection.DetectionIdentification<S,T> [INFO] 5 errors [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Compilation failure /home/saalfeld/workspace/fiji-clean/src-plugins/SPIM_Registration/src/main/java/mpicbg/spim/registration/bead/BeadRegistration.java:[192,73] invalid inferred types for S; inferred type does not conform to declared bound(s) inferred: mpicbg.spim.registration.bead.BeadIdentification bound(s): mpicbg.spim.registration.detection.DetectionIdentification<mpicbg.spim.registration.bead.BeadIdentification,T> /home/saalfeld/workspace/fiji-clean/src-plugins/SPIM_Registration/src/main/java/mpicbg/spim/registration/bead/BeadRegistration.java:[361,73] invalid inferred types for S; inferred type does not conform to declared bound(s) inferred: mpicbg.spim.registration.bead.BeadIdentification bound(s): mpicbg.spim.registration.detection.DetectionIdentification<mpicbg.spim.registration.bead.BeadIdentification,T> /home/saalfeld/workspace/fiji-clean/src-plugins/SPIM_Registration/src/main/java/mpicbg/spim/registration/detection/DetectionRegistration.java:[35,56] invalid inferred types for S; inferred type does not conform to declared bound(s) inferred: S bound(s): mpicbg.spim.registration.detection.DetectionIdentification<S,T> /home/saalfeld/workspace/fiji-clean/src-plugins/SPIM_Registration/src/main/java/mpicbg/spim/registration/detection/DetectionRegistration.java:[174,22] invalid inferred types for S; inferred type does not conform to declared bound(s) inferred: S bound(s): mpicbg.spim.registration.detection.DetectionIdentification<S,T> /home/saalfeld/workspace/fiji-clean/src-plugins/SPIM_Registration/src/main/java/mpicbg/spim/registration/detection/DetectionRegistration.java:[192,35] invalid inferred types for S; inferred type does not conform to declared bound(s) inferred: S bound(s): mpicbg.spim.registration.detection.DetectionIdentification<S,T> [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 50 seconds [INFO] Finished at: Tue Jun 11 11:30:17 CEST 2013 [INFO] Final Memory: 126M/765M [INFO] ------------------------------------------------------------------------ then tried with Build.sh which stops with Compiling 155 files in /home/saalfeld/workspace/fiji-clean/src-plugins/SPIM_Registration error: Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Error reading configuration file Exception in thread "main" imagej.build.minimaven.JavaCompiler$CompileError: Compile error: 1 at imagej.build.minimaven.JavaCompiler.call(JavaCompiler.java:83) at imagej.build.minimaven.MavenProject.build(MavenProject.java:444) at imagej.build.minimaven.MavenProject.build(MavenProject.java:375) at imagej.build.minimaven.MavenProject.build(MavenProject.java:398) at imagej.build.minimaven.MavenProject.buildAndInstall(MavenProject.java:332) at imagej.build.minimaven.MavenProject.buildAndInstall(MavenProject.java:327) at imagej.build.minimaven.MavenProject.buildAndInstall(MavenProject.java:327) at imagej.build.minimaven.MavenProject.buildAndInstall(MavenProject.java:289) at imagej.build.MiniMaven.main(MiniMaven.java:138) % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 395 100 395 0 0 1452 0 --:--:-- --:--:-- --:--:-- 2841 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 357 100 357 0 0 1317 0 --:--:-- --:--:-- --:--:-- 2586 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 16801 100 16801 0 0 41915 0 --:--:-- --:--:-- --:--:-- 62690 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 34881 100 34881 0 0 65708 0 --:--:-- --:--:-- --:--:-- 88083 This is my Java: java -version java version "1.6.0_27" OpenJDK Runtime Environment (IcedTea6 1.12.5) (6b27-1.12.5-0ubuntu0.12.04.1) OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode) Thanks in advance for any assistance.> OpenJDK Runtime Environment (IcedTea6 1.12.5) (6b27-1.12.5-0ubuntu0.12.04.1) Try Oracle JDK.In response to Steffi's bug about Jama, the problem is that it is stored in the "thirdparty" repository rather than the "releases" one. I am adding that to the Fiji POM now; will comment again when it is working. In response to Stephan's bug, I too am able to build on Ubuntu 12.04 with OpenJDK 7: $ java -version java version "1.7.0_21" OpenJDK Runtime Environment (IcedTea 2.3.9) (7u21-2.3.9-0ubuntu0.12.04.1) OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode) I will test with OpenJDK 6 too, in a bit.I tested with OpenJDK 6 (same version as Stephan) and get the same build errors. Unfortunately, the following changes are not enough to fix everything: --snip-- diff --git a/src-plugins/SPIM_Registration/src/main/java/mpicbg/spim/registration/detection/DetectionRegistration.java b/src-plugins/SPIM_Registration/src/main/java/mpicbg/spim/registration/detection/DetectionRegistration.java index f099816..c355b5b 100644 --- a/src-plugins/SPIM_Registration/src/main/java/mpicbg/spim/registration/detection/DetectionRegistration.java +++ b/src-plugins/SPIM_Registration/src/main/java/mpicbg/spim/registration/detection/DetectionRegistration.java @@ -32,7 +32,8 @@ { final T detectionA = correspondences.get( i ).getPoint1(); final T detectionB = correspondences.get( i ).getPoint2(); - final ArrayList<Integer> inconsistent = getOccurences( detectionA, detectionB, correspondences ); + // NB: pass <S, T> to avoid bug in OpenJDK 6 "1.6.0_27" (IcedTea6 1.12.5) + final ArrayList<Integer> inconsistent = DetectionRegistration.<S, T>getOccurences( detectionA, detectionB, correspondences ); if ( inconsistent.size() > 0 ) for ( int index : inconsistent ) @@ -171,7 +172,8 @@ final ArrayList<PointMatchGeneric<T>> inlierList, final Model<?> model ) { - return computeRANSAC( correspondenceCandidates, inlierList, model, 10, 0.1f, 3, 10000 ); + // NB: pass <S, T> to avoid bug in OpenJDK 6 "1.6.0_27" (IcedTea6 1.12.5) + return DetectionRegistration.<S, T>computeRANSAC( correspondenceCandidates, inlierList, model, 10, 0.1f, 3, 10000 ); } public static <S extends DetectionIdentification<S,T>, T extends DetectionView<S,T> > String computeRANSAC( @@ -189,7 +191,8 @@ /* * First remove the inconsistent correspondences */ - removeInconsistentCorrespondences( correspondenceCandidates ); + // NB: pass <S, T> to avoid bug in OpenJDK 6 "1.6.0_27" (IcedTea6 1.12.5) + DetectionRegistration.<S, T>removeInconsistentCorrespondences( correspondenceCandidates ); // if there are not enough correspondences for the used model if ( numCorrespondences < minNumCorrespondences ) --snap-- I think that the bug is relating to the specific combination of S and T here, such that any usage of those methods causes problems. Given that it is fixed in OpenJDK 7, it is not worth working around, IMO.Closing this ticket as "WONTFIX" since we didn't resolve the OpenJDK6 build failures. Regarding the Jama issue: I was wrong about the thirdparty repository not being available from the Fiji POM. (Of course it is, since it inherits that reference from the parent.) Rather, the issue was a version mismatch for the jep dependency of Image_Expression_Parser. I pushed a fix to fiji master. If you pull and rebuild, the problem should be gone. If you want to be completely tidy, you can clean out the invalid jama reference: rm -rf ~/.m2/repository/jama/Jama All of Fiji now builds on my Ubuntu Linux 12.04 64-bit system with OpenJDK7, though you need to crank up the available RAM to do it all in one shot: export MAVEN_OPTS="-Xmx1536m -XX:MaxPermSize=256m" Otherwise the build fails halfway through with OutOfMemoryError. You can still resume with "mvn" again though. Lastly, I had one test failure in TrackMate_. You can skip the tests using: mvn -DskipTests