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?
Related
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.
[ 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'm having a lot of trouble installing Java on my Poky Linux system. I'm building my system using Yocto with the following configuration:
local.conf
MACHINE ??= "intel-corei7-64"
DISTRO ?= "poky"
PACKAGE_CLASSES ?= "package_rpm"
SDKMACHINE ?= "x86_64"
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS = "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
STOPTASKS,/tmp,100M,100K \
ABORT,${TMPDIR},100M,1K \
ABORT,${DL_DIR},100M,1K \
ABORT,${SSTATE_DIR},100M,1K \
ABORT,/tmp,10M,1K"
PACKAGECONFIG_append_pn-qemu-native = " sdl"
PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
CONF_VERSION = "1"
BB_NUMBER_THREADS = '12'
PARALLEL_MAKE = '-j 12'
# Java installation
CORE_IMAGE_EXTRA_INSTALL += "gtkperf libxslt"
IMAGE_INSTALL_append = " openjdk-7-jre "
LICENSE_FLAGS_WHITELIST += "oracle_java"
PREFERRED_PROVIDER_virtual/java-initial-native = "cacao-initial-native"
PREFERRED_PROVIDER_virtual/java-native = "jamvm-native"
PREFERRED_PROVIDER_virtual/javac-native = "ecj-bootstrap-native"
PREFERRED_VERSION_xserver-nodm-init = "1.0"
# OpenCV installation
CORE_IMAGE_EXTRA_INSTALL += "opencv opencv-samples libopencv-core-dev libopencv-highgui-dev libopencv-imgproc-dev libopencv-objdetect-dev libopencv-ml-dev"
bblayers.conf
# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
POKY_BBLAYERS_CONF_VERSION = "2"
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS ?= " \
$HOME/poky/meta \
$HOME/poky/meta-poky \
$HOME/poky/meta-yocto-bsp \
$HOME/poky/meta-intel \
$HOME/poky/meta-openembedded/meta-oe \
$HOME/poky/meta-intel-realsense \
$HOME/poky/meta-java \
$HOME/poky/meta-oracle-java \
"
I need to use morty branch since I'm using Intel Realsense layer which is only compatible with 4.8 kernel
Build Configuration:
BB_VERSION = "1.32.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "CentOSLinux-7.3.1611"
TARGET_SYS = "x86_64-poky-linux"
MACHINE = "intel-corei7-64"
DISTRO = "poky"
DISTRO_VERSION = "2.2.1"
TUNE_FEATURES = "m64 corei7"
TARGET_FPU = ""
meta
meta-poky
meta-yocto-bsp = "morty:924e576b8930fd2268d85f0b151e5f68a3c2afce"
meta-intel = "morty:6add41510412ca196efb3e4f949d403a8b6f35d7"
meta-oe = "morty:fe5c83312de11e80b85680ef237f8acb04b4b26e"
meta-intel-realsense = "morty:2c0dfe9690d2871214fba9c1c32980a5eb89a421"
meta-java = "master:67e48693501bddb80745b9735b7b3d4d28dce9a1"
meta-oracle-java = "morty:f44365f02b283c3fb362dc99e2e996d3f11e356e"
I get the following error:
ERROR: openjdk-7-jre-99b00-2.6.5-r6.1 do_compile: oe_runmake failed
ERROR: openjdk-7-jre-99b00-2.6.5-r6.1 do_compile: Function failed: do_compile (log file is located at /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/temp/log.do_compile.3780)
ERROR: Logfile of failure stored in: /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/temp/log.do_compile.3780
Log data follows:
and then several hundreds lines of error log.
Any help is appreciated.
EDIT: From the log.do_compile file
ERROR: oe_runmake failed
In file included from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/oops/constantPoolOop.hpp:29:0,
from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/oops/methodOop.hpp:33,
from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/runtime/frame.hpp:29,
from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/prims/jvmtiExport.hpp:33,
from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/runtime/thread.hpp:32,
from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/os/linux/vm/thread_linux.inline.hpp:30,
from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/memory/resourceArea.hpp:30,
from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/classfile/classFileParser.hpp:29,
from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/classfile/classLoader.hpp:28,
from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/classfile/systemDictionary.hpp:29,
from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/ci/ciEnv.hpp:30,
from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/ci/ciUtilities.hpp:28,
from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/ci/ciNullObject.hpp:30,
from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/ci/ciConstant.hpp:29,
from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/precompiled/precompiled.hpp:36:
/home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/oops/cpCacheOop.hpp: At global scope:
/home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/oops/cpCacheOop.hpp:189:42: error: left operand of shift expression '(-1 << 28)' is negative [-fpermissive]
option_bits_mask = ~(((-1) << tos_state_shift) | (field_index_mask | parameter_size_mask))
~~~~~~^~~~~~~~~~~~~~~~~~~
/home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/oops/cpCacheOop.hpp:189:104: error: enumerator value for 'option_bits_mask' is not an integer constant
option_bits_mask = ~(((-1) << tos_state_shift) | (field_index_mask | parameter_size_mask))
^
In file included from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/ci/ciEnv.hpp:32:0,
from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/ci/ciUtilities.hpp:28,
from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/ci/ciNullObject.hpp:30,
from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/ci/ciConstant.hpp:29,
from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/precompiled/precompiled.hpp:36:
/home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/code/dependencies.hpp:169:59: error: left operand of shift expression '(-1 << 1)' is negative [-fpermissive]
all_types = ((1 << TYPE_LIMIT) - 1) & ((-1) << FIRST_TYPE),
~~~~~~^~~~~~~~~~~~~~
/home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/code/dependencies.hpp:169:72: error: enumerator value for 'all_types' is not an integer constant
all_types = ((1 << TYPE_LIMIT) - 1) & ((-1) << FIRST_TYPE),
^
gmake[7]: *** [precompiled.hpp.gch] Error 1
gmake[7]: Leaving directory `/home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk.build/hotspot/outputdir/linux_amd64_zero/product'
gmake[6]: *** [the_vm] Error 2
gmake[6]: Leaving directory `/home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk.build/hotspot/outputdir/linux_amd64_zero/product'
gmake[5]: *** [productzero] Error 2
gmake[5]: Leaving directory `/home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk.build/hotspot/outputdir'
gmake[4]: *** [generic_buildzero] Error 2
gmake[4]: Leaving directory `/home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/make'
gmake[3]: *** [productzero] Error 2
gmake[3]: Leaving directory `/home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/make'
gmake[2]: *** [hotspot-build] Error 2
gmake[2]: Leaving directory `/home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk'
gmake[1]: *** [build_product_image] Error 2
gmake[1]: Leaving directory `/home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk'
make: *** [Makefile:2451: stamps/icedtea.stamp] Error 2
ERROR: Function failed: do_compile (log file is located at /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/temp/log.do_compile.3780)
I manually patched the files generating those error and builded the image. It gave a new error but successfully wrote the image. Java in installed:
root#intel-corei7-64:~# java -version
java version "1.7.0_99"
OpenJDK Runtime Environment (IcedTea 2.6.5) (99b00-2.6.5)
OpenJDK 64-Bit Zero VM (build 24.95-b01, interpreted mode)
The solution is either:
Manually patch openjdk following
this
Use a newer version of openjdk. This can be achived using a more
recent commit for the meta-java repository or setting a newer
preferred version in the local.conf.
EDIT: Added guide link.
Guide
Since I'm using this image in an OpenSource project I made a little guide on how to overcome the problems I had during the building process.
The guide can be found here.
UPDATE: I upgraded the JRE and JDK version. The new guide can be found here. For the bravest among you there's also an installer script.
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).
root#everton-laptop:/opt/tinyos-1.x/apps/Blink# make pc
compiling Blink to a pc binary
ncc -o build/pc/main.exe -g -O0 -board=micasb -pthread -target=pc -Wall -Wshadow -DDEF_TOS_AM_GROUP=0x7d -Wnesc-all -fnesc-nido-tosnodes=1000 -fnesc-cfile=build/pc/app.c Blink.nc -lm
In file included from /opt/tinyos-1.x/tos/platform/pc/packet_sim.h:55,
from /opt/tinyos-1.x/tos/platform/pc/nido.h:81,
from /opt/tinyos-1.x/tos/platform/pc/hardware.h:43,
from /opt/tinyos-1.x/tos/system/tos.h:144:
/opt/tinyos-1.x/tos/types/AM.h:155: parse error before `struct'
/opt/tinyos-1.x/tos/types/AM.h:156: parse error before `struct'
/opt/tinyos-1.x/tos/types/AM.h:158: parse error before `struct'
/opt/tinyos-1.x/tos/types/AM.h: In function `TOS_MsgLength':
/opt/tinyos-1.x/tos/types/AM.h:186: parse error before `TOS_Msg'
In file included from /opt/tinyos-1.x/tos/platform/pc/hardware.h:116,
from /opt/tinyos-1.x/tos/system/tos.h:144:
/opt/tinyos-1.x/tos/platform/pc/eeprom.c: At top level:
/opt/tinyos-1.x/tos/platform/pc/eeprom.c:115: warning: declaration of `length' shadows global declaration
/opt/tinyos-1.x/tos/types/AM.h:158: warning: location of shadowed declaration
/opt/tinyos-1.x/tos/platform/pc/eeprom.c:145: warning: declaration of `length' shadows global declaration
/opt/tinyos-1.x/tos/types/AM.h:158: warning: location of shadowed declaration
make: *** [build/pc/main.exe] Error 1
Tried compiling BLink and i keep getting the above error and not sure what to do next. any help would be nice .
Looking at the CVS repository for tos/types/AM.h, it looks like it's choking on the following code:
154: enum {
155: MSG_DATA_SIZE = offsetof(struct TOS_Msg, crc) + sizeof(uint16_t), // 36 by default
156: TINYSEC_MSG_DATA_SIZE = offsetof(struct TinySec_Msg, mac) + TINYSEC_MAC_LENGTH, // 41 by default
157: DATA_LENGTH = TOSH_DATA_LENGTH,
158: LENGTH_BYTE_NUMBER = offsetof(struct TOS_Msg, length) + 1,
159: TINYSEC_NODE_ID_SIZE = sizeof(uint16_t)
160: };
The common item from lines 155, 156, and 158 are the offsetof() macro, which should be defined in stddef.h and which looks like should have been brought in by the tos.h before it causes AM.h to be included, so offsetof() should already be defined.
You might want to verify whether or not the compiler you're using has offsetof() properly defined and/or why it's not available for use in AM.h. If necessary, you can probably define it yourself using a more or less usual implementation:
#define offsetof(st, m) ((size_t) ( (char *)&((st *)(0))->m - (char *)0 )) // stolen from Wikipedia