Java packages can use mpi.jar provided by openmpi. However, Gentoo's ebuild does not provide the file. I believe it should respect USE=java as well and do: configure --enable-mpi-java --with-jdk-bindir=/blah/jdk1.6.0_31/bin --with-jdk-headers=/blah/software/jdk1.6.0_31/include This will be needed for sci-biology/BBmap (will appear in sci overlay). So far I get with: [ebuild U ] sys-cluster/openmpi-1.8.4-r3::science [1.8.3::science] USE="cxx fortran romio threads -cma -cuda -heterogeneous -ipv6 -mpi-threads -numa% -vt" ABI_X86="(64%*) -32% (-x32)" OPENMPI_FABRICS="-knem -ofed -open-mx -psm" OPENMPI_OFED_FEATURES="-connectx-xrc -control-hdr-padding -dynamic-sl -failover -rdmacm -udcm" OPENMPI_RM="-pbs -slurm" 0 KiB .... /mnt/1TB/var/tmp/portage/sys-cluster/openmpi-1.8.4-r3/work/openmpi-1.8.4/configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --libdir=/usr/lib64 --sysconfdir=/etc/openmpi --enable-pretty-print-stacktrace --enable-orterun-prefix-by-default --with-hwloc=/usr --with-libltdl=external --enable-mpi-fortran=all --enable-contrib-no-build=vt --enable-mpi-cxx --without-cma --without-cuda --enable-io-romio --disable-heterogeneous --disable-ipv6 --without-verbs --without-knem --without-mx --without-psm --disable-openib-control-hdr-padding --disable-openib-connectx-xrc --disable-openib-rdmacm --disable-openib-udcm --disable-openib-dynamic-sl --disable-btl-openib-failover --without-tm --without-slurm ... *** Java compiler checking OSX locations... not found checking Linux locations... found (/etc/java-config-2/current-system-vm/include) checking --with-jdk-bindir value... sanity check ok (/usr/bin) checking --with-jdk-headers value... sanity check ok (/etc/java-config-2/current-system-vm/include) checking for javac... /etc/java-config-2/current-system-vm/bin/javac checking for javah... /usr/bin/javah checking for jar... /usr/bin/jar checking jni.h usability... yes checking jni.h presence... yes checking for jni.h... yes checking Java support available... yes *** Java MPI bindings checking if want Java bindings... no
Maybe someone from the Java team can look into this (I'm part of the herd). @Chewi: care to help?
Created attachment 408086 [details, diff] openmpi-1.8.7-r1.ebuild.diff @Chewi: could you please review this ebuild? You might pick up on the hack that is JAVA_PKG_WANT_{SOURCE,TARGET}. The OpenMPI Java bindings need to be compiled with Java 8 (I get an "Incorrect bytecode version found" error with 6 and 7). Only problem is that virtual/{jre,jdk}-1.8 aren't keyworded for ppc+ppc64. I could drop these two platforms and stick in the right virtuals. Or workaround the issue with JAVA_PKG_WANT variables as I did. Anyway, let me know.
(In reply to Patrice Clement from comment #2) > @Chewi: could you please review this ebuild? You might pick up on the hack > that is JAVA_PKG_WANT_{SOURCE,TARGET}. The OpenMPI Java bindings need to be > compiled with Java 8 (I get an "Incorrect bytecode version found" error with > 6 and 7). Only problem is that virtual/{jre,jdk}-1.8 aren't keyworded for > ppc+ppc64. I could drop these two platforms and stick in the right virtuals. > Or workaround the issue with JAVA_PKG_WANT variables as I did. Anyway, let > me know. That isn't a hack, it's just a big breakage. It doesn't require Java 8 to be installed but then calls javac -source 1.8 -target 1.8 anyway. How is that not going to break on any platform? Your only option is to drop the keywords. However, I don't think you understand what this error means. It means that the package is either using its own -source and -target flags that don't match (R)DEPEND or the flags aren't being passed at all. I'll investigate to find out which and whether Java 8 really is required.
Fixed by overriding the configure check for javac to ensure it honours the -source and -target flags.