I am trying to cross-compile openjdk 11u to aarch64. I am using following command:
bash configure --openjdk-target=aarch64-linux-gnu --disable-warnings-as-errors
next I use make command to compile openjdk, but iam getting output errors below:
ERROR: Build failed for target 'default (exploded-image)' in
configuration 'linux-aarch64-normal-server-release' (exit code 2)
=== Output from failing command(s) repeated here ===
* For target hotspot_variant-server_libjvm_gtest_objs_BUILD_GTEST_LIBJVM_link:
/usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld:
/mnt/c/Users/ACER/downloads/jdk11-source/build/linux-aarch64-normal-server-release/hotspot/variant-server/libjvm/objs/macroAssembler_aarch64.o:
in function `RegSet::operator-(RegSet) const':
/mnt/c/Users/ACER/downloads/jdk11-source/src/hotspot/cpu/aarch64/register_aarch64.hpp:239:
undefined reference to `JavaThread::aarch64_get_thread_helper()'
/usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld:
/mnt/c/Users/ACER/downloads/jdk11-source/build/linux-aarch64-normal-server-release/hotspot/variant-server/libjvm/objs/macroAssembler_aarch64.o:
in function `MacroAssembler::push(RegSet, RegisterImpl*)':
/mnt/c/Users/ACER/downloads/jdk11-source/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp:518:
undefined reference to `JavaThread::aarch64_get_thread_helper()'
collect2: error: ld returned 1 exit status
* For target hotspot_variant-server_libjvm_objs_BUILD_LIBJVM_link: /usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld:
/mnt/c/Users/ACER/downloads/jdk11-source/build/linux-aarch64-normal-server-release/hotspot/variant-server/libjvm/objs/macroAssembler_aarch64.o:
in function `RegSet::operator-(RegSet) const':
/mnt/c/Users/ACER/downloads/jdk11-source/src/hotspot/cpu/aarch64/register_aarch64.hpp:239:
undefined reference to `JavaThread::aarch64_get_thread_helper()'
/usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld:
/mnt/c/Users/ACER/downloads/jdk11-source/build/linux-aarch64-normal-server-release/hotspot/variant-server/libjvm/objs/macroAssembler_aarch64.o:
in function `MacroAssembler::push(RegSet, RegisterImpl*)':
/mnt/c/Users/ACER/downloads/jdk11-source/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp:518:
undefined reference to `JavaThread::aarch64_get_thread_helper()'
collect2: error: ld returned 1 exit status
* All command lines available in /mnt/c/Users/ACER/downloads/jdk11-source/build/linux-aarch64-normal-server-release/make-support/failure-logs.
=== End of repeated output ===
No indication of failed target found. Hint: Try searching the build
log for '] Error'. Hint: See doc/building.html#troubleshooting for
assistance.
make[1]: ***
[/mnt/c/Users/ACER/downloads/jdk11-source/make/Init.gmk:305: main]
Error 2 make: ***
[/mnt/c/Users/ACER/downloads/jdk11-source/make/Init.gmk:186: default]
Error 2
I don't know how to fix this errors.
Related
I need to build following openJDK
git clone --depth 1 --branch jdk-11+28 https://github.com/openjdk/jdk.git
on aarm64 NAME="Simply Linux", VERSION="9.1 (Destiny)"
For that I run:
bash ./configure
make images > make.log
And it fails with following error (make.log)
Building target 'images' in configuration 'linux-aarch64-normal-server-release'
Warning: No mercurial configuration present and no .src-rev
Compiling 117 files for BUILD_java.compiler.interim
Compiling 394 files for BUILD_jdk.compiler.interim
Compiling 299 files for BUILD_jdk.javadoc.interim
ERROR: Build failed for target 'images' in configuration 'linux-aarch64-normal-server-release' (exit code 2)
=== Output from failing command(s) repeated here ===
* For target hotspot_variant-server_tools_adlc_objs_dfa.o:
/home/user/jdk/src/hotspot/share/adlc/dfa.cpp: In member function ‘const char* Expr::compute_external(const Expr*, const Expr*)’:
/home/user/jdk/src/hotspot/share/adlc/dfa.cpp:724:14: error: ‘char* strncat(char*, const char*, size_t)’ specified bound 2048 equals destination size [-Werror=stringop-overflow=]
strncat(string_buffer, "+", STRING_BUFFER_LENGTH);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/jdk/src/hotspot/share/adlc/dfa.cpp:732:14: error: ‘char* strncat(char*, const char*, size_t)’ specified bound 2048 equals destination size [-Werror=stringop-overflow=]
strncat(string_buffer, " + ", STRING_BUFFER_LENGTH);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/jdk/src/hotspot/share/adlc/dfa.cpp: In member function ‘const char* Expr::compute_expr(const Expr*, const Expr*)’:
/home/user/jdk/src/hotspot/share/adlc/dfa.cpp:746:14: error: ‘char* strncat(char*, const char*, size_t)’ specified bound 2048 equals destination size [-Werror=stringop-overflow=]
strncat(string_buffer, "+", STRING_BUFFER_LENGTH);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
* All command lines available in /home/user/jdk/build/linux-aarch64-normal-server-release/make-support/failure-logs.
=== End of repeated output ===
No indication of failed target found.
Hint: Try searching the build log for '] Error'.
Hint: See doc/building.html#troubleshooting for assistance.
What am I doing wrong?
Where can I submit a bug report about openjdk11, or discuss this issue?
There is a procedure with Java BeanShell technology that does the following:
**<#
String res="<?=p_valuexx?>";
#>**
Procedure returns lots of variables p_xxx (and one above including).
The next step in ODI does the variable assignment:
**<#=res#>**
this fails with the following error message:
oracle.odi.runtime.agent.exception.ExecutionEngineException: com.sunopsis.tools.core.exception.SnpsSimpleMessageException:
ODI-17517: Error during task interpretation.
Task: 5
com.sunopsis.tools.core.exception.SnpsSimpleNLSMessageException: ODI-17810: Error during BeanShell evaluation: BeanShell script
error: Sourced file: inline evaluation of: out.print(res) ; ;'' :
Undefined argument: res : at Line: 1 : in file: inline evaluation
of:out.print(res) ; ;'' : ( res )
BSF info: null at line: 0 column: columnNo, Pre-execution code:
The same code is working just fine in 12.2.1.3
[ 91%] Generate files for Java bindings
Traceback (most recent call last):
File "/home/fcemtopall/Masaüstü/opencv-3.4.1/modules/java/generator/../generator/gen_java.py", line 1093, in
copy_java_files(java_files_dir, target_path)
File "/home/fcemtopall/Masaüstü/opencv-3.4.1/modules/java/generator/../generator/gen_java.py", line 1032, in copy_java_files
src = checkFileRemap(java_file)
File "/home/fcemtopall/Masaüstü/opencv-3.4.1/modules/java/generator/../generator/gen_java.py", line 25, in checkFileRemap
assert path[-3:] != '.in', path
AssertionError: /home/fcemtopall/Masaüstü/opencv-3.4.1/modules/java/generator/src/java/org/opencv/osgi/OpenCVNativeLoader.java.in
modules/java_bindings_generator/CMakeFiles/gen_opencv_java_source.dir/build.make:315: recipe for target 'CMakeFiles/dephelper/gen_opencv_java_source' failed
make[2]: * [CMakeFiles/dephelper/gen_opencv_java_source] Error 1
CMakeFiles/Makefile2:2686: recipe for target 'modules/java_bindings_generator/CMakeFiles/gen_opencv_java_source.dir/all' failed
make[1]: * [modules/java_bindings_generator/CMakeFiles/gen_opencv_java_source.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
It is a bug with OpenCV, so the solution is in two ways:
Open modules/java/generator/gen_java.py file and edit the line 1029 from
re_package = re.compile(r'^package +(.+);$')
to
re_package = re.compile(r'^package +(.+);')
Or just redownload the source and it is OK.
I suspect the issue is with your path.
/home/fcemtopall/Masaüstü/opencv-3.4.1/modules/java/generator/src/java/org/opencv/osgi/OpenCVNativeLoader.java.in
Masaüstü
See this two U letters which are from another language. This might interpret a compilation issue when trying to generate JNI.
Try creating another directory under home such as /home/abc and compile from there.
I downloaded core.odex and framework.odex from my Samsung Galaxy Player, in order to make some changes for the hidden apis, following this webpage: https://devmaze.wordpress.com/2011/01/18/using-com-android-internal-part-2-hacking-around/
Also, I got baksmali and smali from here: http://forum.xda-developers.com/showthread.php?t=1650243
Now, when I run the command: java -jar baksmali-1.3.3.jar -c :core.odex -x framework.odex, the following error appears:
UNEXPECTED TOP-LEVEL EXCEPTION:
org.jf.dexlib.Util.ExceptionWithContext: regCount does not match the number of arguments of the method
at org.jf.dexlib.Util.ExceptionWithContext.withContext(ExceptionWithContext.java:54)
at org.jf.dexlib.Code.InstructionIterator.IterateInstructions(InstructionIterator.java:92)
at org.jf.dexlib.CodeItem.readItem(CodeItem.java:154)
at org.jf.dexlib.Item.readFrom(Item.java:76)
at org.jf.dexlib.OffsettedSection.readItems(OffsettedSection.java:48)
at org.jf.dexlib.Section.readFrom(Section.java:143)
at org.jf.dexlib.DexFile.<init>(DexFile.java:431)
at org.jf.baksmali.main.main(main.java:265)
Caused by: java.lang.RuntimeException: regCount does not match the number of arguments of the method
at org.jf.dexlib.Code.Format.Instruction3rc.checkItem(Instruction3rc.java:129)
at org.jf.dexlib.Code.Format.Instruction3rc.<init>(Instruction3rc.java:79)
at org.jf.dexlib.Code.Format.Instruction3rc.<init>(Instruction3rc.java:44)
at org.jf.dexlib.Code.Format.Instruction3rc$Factory.makeInstruction(Instruction3rc.java:145)
at org.jf.dexlib.Code.InstructionIterator.IterateInstructions(InstructionIterator.java:84)
... 6 more
Error occured at code address 0
code_item #0x159a90
What am I missing or doing wrong?
Appreciate in advance any help you can provide.
I'm trying to install WWW::HTMLUnit on Windows 7. There're step that I run through:
Install Inline::Java 0.53
Install WWW::HTMLUnit 0.15
At step 2, after nmake, I type nmake test to test module but it failed. Here's output:
C:\nmake test
Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.
C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
t/00_basic...........
t/00_basic...........NOK 1/1# Failed test 'use WWW::HtmlUnit;'
# at t/00_basic.t line 9.
# Tried to use 'WWW::HtmlUnit'.
# Error: Class com.gargoylesoftware.htmlunit.WebClient not found at C:/Perl/site/lib/Inline/Java.pm line 619
# BEGIN failed--compilation aborted at (eval 4) line 2, <GEN7> line 4.
# Looks like you failed 1 test of 1.
t/00_basic...........dubious
Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 1
Failed 1/1 tests, 0.00% okay
t/01_hello...........Class com.gargoylesoftware.htmlunit.WebClient not found at C:/Perl/site/lib/Inline/Java.pm line 619
BEGIN failed--compilation aborted at t/01_hello.t line 4, <GEN7> line 4.
t/01_hello...........dubious
Test returned status 26 (wstat 6656, 0x1a00)
t/02_hello_sweet.....dubious
Test returned status 19 (wstat 4864, 0x1300)
t/03_clickhandler....Class com.gargoylesoftware.htmlunit.WebClient not found at C:/Perl/site/lib/Inline/Java.pm line 619
BEGIN failed--compilation aborted at t/03_clickhandler.t line 6, <GEN7> line 4.
t/03_clickhandler....dubious
Test returned status 29 (wstat 7424, 0x1d00)
DIED. FAILED tests 1-8
Failed 8/8 tests, 0.00% okay
Failed Test Stat Wstat Total Fail List of Failed
-------------------------------------------------------------------------------
t/00_basic.t 1 256 1 1 1
t/01_hello.t 26 6656 ?? ?? ??
t/02_hello_sweet.t 19 4864 ?? ?? ??
t/03_clickhandler.t 29 7424 8 16 1-8
Failed 4/4 test scripts. 9/9 subtests failed.
Files=4, Tests=9, 3 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU)
Failed 4/4 test programs. 9/9 subtests failed.
NMAKE : fatal error U1077: 'C:\Perl\bin\perl.exe' : return code '0x1d'
Stop.
From above log, I could see that:
class Error: com.gargoylesoftware.htmlunit.WebClient could not be found.
I have no idea that I missed anything.
Any help would be appreciated.
Thanks.
Minh.
I found it.
There's different between path in Unix and Windows system. Unix uses ':' for a delimiter but Windows uses ';'. So what I've done is that open HTMLUnit.pm and change all of ':' to ';'.
With HTMLUnit version 0.15 I made changes at these lines below:
Line 78:
return join ';', map { "$jar_path/$_" } qw( # return join ':', map { "$jar_path/$_" } qw(
Line 127:
$custom_jars = join(';', #{$parameters{'jars'}}); # $custom_jars = join(':', #{$parameters{'jars'}});
Line 148:
CLASSPATH => collect_default_jars() . ";" . $custom_jars, # CLASSPATH => collect_default_jars() . ":" . $custom_jars,
And it works like a magic.
(it wouldn't let me comment on an existing answer)
I see your answer about ':' vs ';'. I'll try to include a fix in the next WWW::HtmlUnit release (I am the author of the perl bindings).