OpenJDK cross compilation: failed unable to make target - java

I need to cross-compile this fork of openJDK https://gitlab.com/gosjava/11/openjdk/-/tree/master/ on host system Kali Linux 2021.3 for target "aarch64-linux-gnu"
As described here https://gitlab.com/gosjava/11/openjdk/-/blob/master/doc/building.md#cross-compiling-the-easy-way-with-openjdk-devkits
And it fails with error:
┌──(katya㉿kali)-[~/work/prostor/openjdk]
└─$ cd make/devkit
┌──(katya㉿kali)-[~/…/prostor/openjdk/make/devkit]
└─$ make TARGETS="aarch64-linux-gnu"
Building on platform unknown-linux-gnu
host_platforms unknown-linux-gnu
target_platforms aarch64-linux-gnu
find: ‘/home/katya/work/prostor/openjdk/build/devkit/result/unknown-linux-gnu-to-aarch64-linux-gnu’: No such file or directory
Building compilers for unknown-linux-gnu
Targets: aarch64-linux-gnu
for p in aarch64-linux-gnu; do \
make -f Tools.gmk download-rpms HOST=unknown-linux-gnu BUILD=unknown-linux-gnu RESULT=/home/katya/work/prostor/openjdk/build/devkit/result OUTPUT_ROOT=/home/katya/work/prostor/openjdk/build/devkit \
TARGET=$p PREFIX=/home/katya/work/prostor/openjdk/build/devkit/result/unknown-linux-gnu-to-$p && \
make -f Tools.gmk all HOST=unknown-linux-gnu BUILD=unknown-linux-gnu RESULT=/home/katya/work/prostor/openjdk/build/devkit/result OUTPUT_ROOT=/home/katya/work/prostor/openjdk/build/devkit \
TARGET=$p PREFIX=/home/katya/work/prostor/openjdk/build/devkit/result/unknown-linux-gnu-to-$p && \
make -f Tools.gmk ccache HOST=unknown-linux-gnu BUILD=unknown-linux-gnu RESULT=/home/katya/work/prostor/openjdk/build/devkit/result OUTPUT_ROOT=/home/katya/work/prostor/openjdk/build/devkit \
TARGET=unknown-linux-gnu PREFIX=/home/katya/work/prostor/openjdk/build/devkit/result/unknown-linux-gnu-to-$p BUILDDIR=/home/katya/work/prostor/openjdk/build/devkit/unknown-linux-gnu/$p || exit 1 ; \
done
make[1]: Entering directory '/home/katya/work/prostor/openjdk/make/devkit'
TARGET=aarch64-linux-gnu
HOST=unknown-linux-gnu
BUILD=unknown-linux-gnu
ARCH=aarch64
Tools.gmk:75: *** Unknown base OS . Stop.
make[1]: Leaving directory '/home/katya/work/prostor/openjdk/make/devkit'
make: *** [Makefile:90: unknown-linux-gnu] Error 1
Why? The command make TARGETS="aarch64-linux-gnu" BASE_OS=OLE6 also fails
Tools.gmk:75: *** Unknown base OS OLE6. Stop.
make[1]: Leaving directory '/home/katya/work/prostor/openjdk/make/devkit'
make: *** [Makefile:90: unknown-linux-gnu] Error 1
What is wrong? I follow documentation, but ...

Related

Error building openJDK 11 with devkit: Unknown base OS Fedora

I need to build the following openJDK
git clone --depth 1 --branch jdk-11+28 https://github.com/openjdk/jdk.git
For that I run:
cd make/devkit
make TARGETS="aarch64-linux-gnu" BASE_OS=Fedora BASE_OS_VERSION=21 &>build.log
And got following error
Building on platform x86_64-unknown-linux-gnu
host_platforms x86_64-unknown-linux-gnu
target_platforms x86_64-unknown-linux-gnu
find: ‘/media/katya/e947f05e-bd8f-4647-bbdd-0df608faa788/openjdk11/jdk/build/devkit/result/x86_64-unknown-linux-gnu’: No such file or directory
Building compilers for x86_64-unknown-linux-gnu
Targets: x86_64-unknown-linux-gnu
for p in x86_64-unknown-linux-gnu ; do \
make -f Tools.gmk download-rpms HOST=x86_64-unknown-linux-gnu BUILD=x86_64-unknown-linux-gnu RESULT=/media/katya/e947f05e-bd8f-4647-bbdd-0df608faa788/openjdk11/jdk/build/devkit/result PREFIX=/media/katya/e947f05e-bd8f-4647-bbdd-0df608faa788/openjdk11/jdk/build/devkit/result/x86_64-unknown-linux-gnu OUTPUT_ROOT=/media/katya/e947f05e-bd8f-4647-bbdd-0df608faa788/openjdk11/jdk/build/devkit TARGET=$p && \
make -f Tools.gmk all HOST=x86_64-unknown-linux-gnu BUILD=x86_64-unknown-linux-gnu RESULT=/media/katya/e947f05e-bd8f-4647-bbdd-0df608faa788/openjdk11/jdk/build/devkit/result PREFIX=/media/katya/e947f05e-bd8f-4647-bbdd-0df608faa788/openjdk11/jdk/build/devkit/result/x86_64-unknown-linux-gnu OUTPUT_ROOT=/media/katya/e947f05e-bd8f-4647-bbdd-0df608faa788/openjdk11/jdk/build/devkit \
TARGET=$p || exit 1 ; \
done
make[1]: Entering directory '/media/katya/e947f05e-bd8f-4647-bbdd-0df608faa788/openjdk11/jdk/make/devkit'
TARGET=x86_64-unknown-linux-gnu
HOST=x86_64-unknown-linux-gnu
BUILD=x86_64-unknown-linux-gnu
ARCH=x86_64
Tools.gmk:66: *** Unknown base OS Fedora. Stop.
make[1]: Leaving directory '/media/katya/e947f05e-bd8f-4647-bbdd-0df608faa788/openjdk11/jdk/make/devkit'
Makefile:86: recipe for target 'x86_64-unknown-linux-gnu' failed
make: *** [x86_64-unknown-linux-gnu] Error 1
Host OS is Ubuntu 16.04.7 LTS (Xenial Xerus). Please tell me what am I doing wrong?
Where can I submit a bug report about openjdk11, or discuss this issue?

CrossCompile jrxtx with yocto

I'm trying to crosscompile jrxtx library (https://github.com/openmuc/jrxtx) using a yocto toolchain but it fails.
first
source /opt/poky/environment-setup-cortexa8t2hf-vfp-neon-poky-linux-gnueabi
then
cd /home/peppe/projects/rxtx/jrxtx/native && ./BUILD.sh
I had to hand modify config.status to remove some errors on mv and rm, nevertheless i get
/bin/bash /home/peppe/projects/rxtx/jrxtx/native/libtool --mode=link arm-poky-linux-gnueabi-gcc -march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 --sysroot=/opt/poky/sysroots/cortexa8t2hf-vfp-neon-poky-linux-gnueabi -O2 -pipe -g -feliminate-unused-debug-types -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -lpthread -release 2.2pre1 -o librxtxSerial.la -rpath /usr/lib/jvm/java-11-openjdk-amd64/jre/lib/amd64 /home/peppe/projects/rxtx/jrxtx/native/x86_64-unknown-linux-gnu/SerialImp.lo; \
fi; \
)
/bin/bash: line 2: cd: x86_64-unknown-linux-gnu: No such file or directory
/bin/bash: /home/peppe/projects/rxtx/jrxtx/native/libtool: No such file or directory
/bin/bash: /home/peppe/projects/rxtx/jrxtx/native/libtool: No such file or directory
/bin/bash: /home/peppe/projects/rxtx/jrxtx/native/libtool: No such file or directory
make: *** [Makefile:756: x86_64-unknown-linux-gnu/librxtxSerial.la] Error 127
Even it it seems to launch the correct compiler arm-poky-linux-gnueabi-gcc it tries to cd into x86_64-unknown-linux-gnu and obviously things gets mad...

rJava: non-zero exit status

I have been trying to install rJava using the following commands:
install.packages('rJava',,'http://www.rforge.net/')
or
install.packages('rJava', type = 'source', INSTALL_opts='--merge-multiarch')
but each time I fail due to this error:
WARNING: JRI could NOT be built Set IGNORE=1 if you want to build
rJava anyway. ERROR: configuration failed for package 'rJava'. I have uninstalled and re-installed both version of java on my machine but still no help!
Does anyone has a solution ?
the full description is as below:
install for i386
installing source package 'rJava' ...
** package 'rJava' successfully unpacked and MD5 sums checked Generate Windows-specific files (src/jvm-w32) ... make: Entering directory
'/Users/ahkay/AppData/Local/Temp/RtmpKalUob/R.INSTALL192609e43b16/rJava/src/jvm-w32'
C:/Rtools/mingw_32/bin/dlltool --as C:/Rtools/mingw_32/bin/as
--input-def jvm.def --kill-at --dllname jvm.dll --output-lib libjvm.dll.a C:/Rtools/mingw_32/bin/gcc -O2 -c -o findjava.o
findjava.c C:/Rtools/mingw_32/bin/gcc -s -o findjava.exe findjava.o
make: Leaving directory
'/Users/ahkay/AppData/Local/Temp/RtmpKalUob/R.INSTALL192609e43b16/rJava/src/jvm-w32'
Find Java... ./configure.win: line 15: [: too many arguments
JAVA_HOME=C:/Program Files/Java/jre1.8.0_202
=== Building JRI === configure.win: line 21: [: too many arguments JAVA_HOME=C:/Program Files/Java/jre1.8.0_202
R_HOME=C:/PROGRA~1/R/R-35~1.2 Creating Makefiles ... Configuration
done. make -C src JRI.jar make[1]: Entering directory
'/Users/ahkay/AppData/Local/Temp/RtmpKalUob/R.INSTALL192609e43b16/rJava/jri/src'
C:/Program Files/Java/jre1.8.0_202/bin/javac -d . ../RList.java
../RBool.java ../RVector.java ../RMainLoopCallbacks.java
../RConsoleOutputStream.java ../Mutex.java ../Rengine.java
../REXP.java ../RFactor.java ../package-info.java make[1]: C:/Program:
Command not found make[1]: * [Makefile.all:41:
org/rosuda/JRI/Rengine.class] Error 127 make[1]: Leaving directory
'/Users/ahkay/AppData/Local/Temp/RtmpKalUob/R.INSTALL192609e43b16/rJava/jri/src'
make: * [Makefile.all:19: src/JRI.jar] Error 2
**** WARNING: JRI could NOT be built Set IGNORE=1 if you want to build rJava anyway. ERROR: configuration failed for package 'rJava'
removing 'C:/Users/ahkay/Documents/R/win-library/3.5/rJava' In R CMD INSTALL In R CMD INSTALL Warning in install.packages : installation
of package ‘rJava’ had non-zero exit status
I have experienced same issue and following approach worked for me in my Mac OS 10.13.6, you can apply minor OS related changes if using in other OS.
OS:
Installing rJava Manually
# curl -#ROL https://www.rforge.net/rJava/snapshot/rJava_0.9-8.tar.gz
# R CMD INSTALL rJava_0.9-8.tar.gz
# su -
Location you have installed R software, you might have different location.
# cd /Library/Frameworks/R.framework/Versions/3.5/Resources/lib
I found that different Java used by R, and forcing by softlink:
#ln -s /Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home/lib/server/libjvm.dylib libjvm.dylib
Remember, you need to put your JAVA_HOME in the following location in R Studio:
>Sys.setenv(JAVA_HOME = "/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home")
Verifying rJava working in R Studio:
>require(rJava)

Autoreconf failing when installing (py)COMPSs in a clusters

I tried to install pyCOMPSs (v1.4) on a Cluster system using the
installation script for Supercomputers.
The script terminates with the following error:
libtool: link: ranlib .libs/libcbindings.a
libtool: link: ( cd ".libs" && rm -f "libcbindings.la" && ln -s
"../libcbindings.la" "libcbindings.la" )
make[1]: Entering directory
`/home/xxx/repos/pycompss/COMPSs/Bindings/c/src/bindinglib'
/usr/bin/mkdir -p
'/home/cramonco/svn/compss/framework/trunk/builders/specs/deb/compss-c-binding/tmp/opt/COMPSs/Bindings/c/lib'
/usr/bin/mkdir: cannot create directory ‘/home/cramonco’: Permission denied
make[1]: *** [install-libLTLIBRARIES] Error 1
make[1]: Leaving directory
`/home/xxx/xxx/repos/pycompss/COMPSs/Bindings/c/src/bindinglib'
make: *** [install-am] Error 2
BindingLib Installation failed, please check errors above!
Seems the error is due to the package includes a previous configuration
and in your case the autoreconf is not overwritting the Makefile and
other files produced by autotools. try with
running
cd /home/xxx/repos/pycompss/COMPSs/Bindings/c/src/bindinglib
make maintainer-clean
After this run again the install command

Thrift install error

I get this error when i try to install thrift on Ubuntu 12.04.
I use ant 1.9.1 an install thrift 0.9.
when i try 'make' command i got this error.
Can anybody help me show this error. Thanks.
make all-recursive
make[1]: Entering directory /opt/thrift-0.9.0'
Making all in compiler/cpp
make[2]: Entering directory/opt/thrift-0.9.0/compiler/cpp'
make all-am
make[3]: Entering directory /opt/thrift-0.9.0/compiler/cpp'
make[3]: Nothing to be done forall-am'.
make[3]: Leaving directory /opt/thrift-0.9.0/compiler/cpp'
make[2]: Leaving directory/opt/thrift-0.9.0/compiler/cpp'
Making all in lib
make[2]: Entering directory /opt/thrift-0.9.0/lib'
Making all in cpp
make[3]: Entering directory/opt/thrift-0.9.0/lib/cpp'
Making all in .
make[4]: Entering directory /opt/thrift-0.9.0/lib/cpp'
make[4]: Nothing to be done forall-am'.
make[4]: Leaving directory /opt/thrift-0.9.0/lib/cpp'
Making all in test
make[4]: Entering directory/opt/thrift-0.9.0/lib/cpp/test'
make[4]: Nothing to be done for all'.
make[4]: Leaving directory/opt/thrift-0.9.0/lib/cpp/test'
make[3]: Leaving directory /opt/thrift-0.9.0/lib/cpp'
Making all in java
make[3]: Entering directory/opt/thrift-0.9.0/lib/java'
/opt/ant1.91/bin/ant
Buildfile: /opt/thrift-0.9.0/lib/java/build.xml
setup.init:
mvn.ant.tasks.check:
proxy:
mvn.ant.tasks.download:
[get] Getting: http://repo1.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar
[get] To: /opt/thrift-0.9.0/lib/java/build/tools/maven-ant-tasks-2.1.3.jar
[get] Not modified - so not downloaded
mvn.init:
BUILD FAILED
/opt/thrift-0.9.0/lib/java/build.xml:282: artifact:pom doesn't support the "groupId" attribute
Total time: 1 second
make[3]: * [all-local] Error 1
make[3]: Leaving directory /opt/thrift-0.9.0/lib/java'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory/opt/thrift-0.9.0/lib'
make[1]: [all-recursive] Error 1
make[1]: Leaving directory `/opt/thrift-0.9.0'
make: ** [all] Error 2
This error is caused by Apache Ant 1.9.x. Refer to [1] for more info.
Remove apache ant, and reinstall with version 1.8.x [2]
# sudo apt-get remove ant
# tar -jxvf http://archive.apache.org/dist/ant/source/apache-ant-1.8.4-src.tar.bz2
# cd apache-ant-1.8.4/
# sed -i 's;jars,test-jar;jars;' build.xml
# sudo mkdir /opt/ant-1.8.4
# sudo ./build.sh -Ddist.dir=/opt/ant-1.8.4 dist
# sudo ln -v -sfn ant-1.8.4 /opt/ant
Configure thrift [3]
# export PATH=$PATH:/opt/ant/bin
# export ANT_HOME=/opt/ant
# PYTHON=/usr/bin/python2 ./configure --prefix=/usr --without-ruby
# make
# sudo make install
I am using thrift 0.9.1 on Ubuntu 12.04 and I found the same problem occurred regardless of ant 1.8.4 or 1.9.4:
...artifact:pom doesn't support the "groupId" attribute
What really helped was this suggestion: http://wiki.apache.org/cassandra/RunningCassandraInEclipse#artifact:pom_error
You have to ensure the maven-ant-tasks-2.1.3.jar file is in the lib directory for the active version of ant you are using.

Categories

Resources