Date: Wed, 2 Nov 2011 20:39:10 -0700 From: Greg Lewis <glewis@eyesbeyond.com> To: Ronald Klop <ronald-freebsd8@klop.yi.org> Cc: freebsd-java@freebsd.org Subject: Re: Java on ARM processor? Message-ID: <20111103033910.GA96008@misty.eyesbeyond.com> In-Reply-To: <op.v38le7wk8527sy@212-182-167-131.ip.telfort.nl> References: <op.v3vl2vpn8527sy@212-182-167-131.ip.telfort.nl> <20111025145744.GA31136@misty.eyesbeyond.com> <op.v3xd21au8527sy@212-182-167-131.ip.telfort.nl> <20111026041559.GA38377@misty.eyesbeyond.com> <op.v38le7wk8527sy@212-182-167-131.ip.telfort.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Oct 31, 2011 at 11:14:57PM +0100, Ronald Klop wrote: > On Wed, 26 Oct 2011 06:15:59 +0200, Greg Lewis <glewis@eyesbeyond.com> > wrote: > > > On Tue, Oct 25, 2011 at 11:02:51PM +0200, Ronald Klop wrote: > >> On Tue, 25 Oct 2011 16:57:44 +0200, Greg Lewis <glewis@eyesbeyond.com> > >> wrote: > >> > >> > On Tue, Oct 25, 2011 at 12:00:21AM +0200, Ronald Klop wrote: > >> >> Hi, > >> >> > >> >> My Sheevaplug is now running FreeBSD 9.0-RC1. > >> >> # uname -a > >> >> FreeBSD sheeva1.klop.ws 9.0-RC1 FreeBSD 9.0-RC1 #7: Tue Oct 18 > >> 00:57:30 > >> >> CEST 2011 > >> >> root@sjakie.klop.ws:/usr/obj/arm.arm/usr/src/sys/SHEEVAPLUG > >> >> arm > >> >> > >> >> Is there any chance of running Java on this machine? The openjdk6 > >> and 7 > >> >> ports say they are only for i386/amd64. > >> >> Does freebsd have a Zero/Shark port of the hotspot? > >> > > >> > It does, but it is likely in need of a little love as I don't think > >> > anyone > >> > has tried it out for a while. I'd suggest pulling directly from the > >> > bsd-port repo for OpenJDK7 and trying that. > >> > > >> > As always, the biggest problem is going to be bootstrapping. Since > >> there > >> > isn't an existing FreeBSD/arm binary of openjdk7 you'll need to work > >> > around > >> > that. There are a variety of ways you could tackle that. The most > >> > common > >> > is to set up an NFS mount with an i386 or amd64 machine and remotely > >> > execute > >> > all of the java bootstrap steps while the C/C++ compilation occurs > >> > locally. > >> > I can provide further information if you're interested. > >> > > >> > >> Yes, please. > >> I currently have: > >> - a mercurial checkout of bsd-port in /data/openjdk7/bsd-port > >> - cups-client from ports in /usr/local > >> - freetype2 from ports in /usr/local > >> - manually extracted apache-ant in /data/openjdk7/apache-ant-1.8.2 > >> > >> I have the same on amd64 as on arm. On amd64 I can build with > >> ALT_BOOTDIR=/usr/local/openjdk6. > > > > See this email for details: > > > > http://docs.freebsd.org/cgi/getmsg.cgi?fetch=89377+0+archive/2008/freebsd-java/20080203.freebsd-java > > > > It will need to be updated somewhat for openjdk7. I likely have an > > update > > on my sparc64 machine, but it's currently down :(. > > > > Note that you'll also need libffi from ports for Zero. > > > > Another option is cross-compiling on an x86, but I've never tried that. > > There are indications in the source that there is some support for this > > (look at CROSS_COMPILE_ARCH IIRC). > > > > Well. I have the NFS/SSH stuff sort of running now. I had to tune the > boot-java scripts. And /data/openjdk7 is my NFS exported dir. > If I build with this: > export JAVA_BOOTHOST=192.168.1.33 > export JAVA_BOOTDIR=/usr/local/openjdk6 > export ALT_BOOTDIR=/data/boot-java > > export ANT_HOME=/data/openjdk7/apache-ant-1.8.2 > export ALT_FREETYPE_HEADERS_PATH=/usr/local/include > export ALT_FREETYPE_LIB_PATH=/usr/local/lib > export ALT_CUPS_HEADERS_PATH=/usr/local/include > export NO_DOCS=true > export ZERO_BUILD=true > export BUILD_CORBA=false > export BUILD_JAXP=false > export BUILD_JAXWS=false > > gmake > > It enters building the hotspot for zero, but then gives me the task to go > back to my C courses. :-) > > ######################################################################## > ######################################################################## > ##### Entering hotspot for target(s) all_productzero ##### > ######################################################################## > > cd ./hotspot/make && \ > gmake JDK_TOPDIR=/data/openjdk7/bsd-port/jdk > JDK_MAKE_SHARED_DIR=/data/openjdk7/bsd-port/jdk/make/common/shared > EXTERNALSANITYCONTROL=true SOURCE_LANGUAGE_VERSION=7 > TARGET_CLASS_VERSION=7 MILESTONE=internal BUILD_NUMBER=b00 > JDK_BUILD_NUMBER=b00 FULL_VERSION=1.7.0-internal-root_2011_10_31_22_57-b00 > PREVIOUS_JDK_VERSION=1.6.0 JDK_VERSION=1.7.0 JDK_MKTG_VERSION=7 > JDK_MAJOR_VERSION=1 JDK_MINOR_VERSION=7 JDK_MICRO_VERSION=0 > PREVIOUS_MAJOR_VERSION=1 PREVIOUS_MINOR_VERSION=6 PREVIOUS_MICRO_VERSION=0 > ARCH_DATA_MODEL=64 COOKED_BUILD_NUMBER=0 > ANT_HOME="/data/openjdk7/apache-ant-1.8.2" > ALT_OUTPUTDIR=/data/openjdk7/bsd-port/build/bsd-arm/hotspot/outputdir > ALT_EXPORT_PATH=/data/openjdk7/bsd-port/build/bsd-arm/hotspot/import > ALT_SLASH_JAVA=/NOT-SET ALT_BOOTDIR=/data/boot-java > ALT_LANGTOOLS_DIST=/data/openjdk7/bsd-port/build/bsd-arm/langtools/dist > all_productzero > gmake[2]: Entering directory `/data/openjdk7/bsd-port/hotspot/make' > Makefile:378: target `/Xusage.txt' given more than once in the same rule. > cd /data/openjdk7/bsd-port/hotspot/make; \ > gmake VM_TARGET=productzero generic_buildzero > ALT_OUTPUTDIR=/data/openjdk7/bsd-port/build/bsd-arm/hotspot/outputdir > gmake[3]: Entering directory `/data/openjdk7/bsd-port/hotspot/make' > Makefile:378: target `/Xusage.txt' given more than once in the same rule. > mkdir -p /data/openjdk7/bsd-port/build/bsd-arm/hotspot/outputdir > cd /data/openjdk7/bsd-port/build/bsd-arm/hotspot/outputdir; \ > gmake -f /data/openjdk7/bsd-port/hotspot/make/bsd/Makefile \ > LP64=1 JAVA_HOME=/data/boot-java > OUTPUTDIR=/data/openjdk7/bsd-port/build/bsd-arm/hotspot/outputdir > GAMMADIR=/data/openjdk7/bsd-port/hotspot MAKE_VERBOSE=y > HOTSPOT_RELEASE_VERSION=21.0-b17 > JRE_RELEASE_VERSION=1.7.0-internal-root_2011_10_31_22_57-b00 > HOTSPOT_BUILD_VERSION= productzero > gmake[4]: Entering directory > `/data/openjdk7/bsd-port/build/bsd-arm/hotspot/outputdir' > cd bsd__zero/product && gmake -w " LP64=1 " > gmake[5]: Entering directory > `/data/openjdk7/bsd-port/build/bsd-arm/hotspot/outputdir/bsd__zero/product' > gmake[6]: Entering directory > `/data/openjdk7/bsd-port/build/bsd-arm/hotspot/outputdir/bsd__zero/product' > gmake[6]: Nothing to be done for `all'. > gmake[6]: Leaving directory > `/data/openjdk7/bsd-port/build/bsd-arm/hotspot/outputdir/bsd__zero/product' > gmake[6]: Entering directory > `/data/openjdk7/bsd-port/build/bsd-arm/hotspot/outputdir/bsd__zero/product' > if [ -d /data/openjdk7/bsd-port/hotspot/agent -a "zero" != "ia64" \ > -a "zero" != "arm" \ > -a "zero" != "ppc" \ > -a "zero" != "zero" ] ; then \ > gmake -f sa.make > /data/openjdk7/bsd-port/build/bsd-arm/hotspot/outputdir/bsd__zero/product/../generated/sa-jdi.jar; > \ > fi > gmake[6]: Leaving directory > `/data/openjdk7/bsd-port/build/bsd-arm/hotspot/outputdir/bsd__zero/product' > gmake[6]: Entering directory > `/data/openjdk7/bsd-port/build/bsd-arm/hotspot/outputdir/bsd__zero/product' > echo Generating precompiled header precompiled.hpp.gch > Generating precompiled header precompiled.hpp.gch > mkdir -p . > g++ -D_ALLBSD_SOURCE -D_GNU_SOURCE -DCC_INTERP -DZERO -D > -DZERO_LIBARCH=\"\" -DPRODUCT -I. > -I/data/openjdk7/bsd-port/hotspot/src/share/vm/prims > -I/data/openjdk7/bsd-port/hotspot/src/share/vm > -I/data/openjdk7/bsd-port/hotspot/src/cpu/zero/vm > -I/data/openjdk7/bsd-port/hotspot/src/os_cpu/bsd_zero/vm > -I/data/openjdk7/bsd-port/hotspot/src/os/bsd/vm > -I/data/openjdk7/bsd-port/hotspot/src/os/posix/vm -I../generated > -DHOTSPOT_RELEASE_VERSION="\"21.0-b17\"" > -DHOTSPOT_BUILD_TARGET="\"product\"" -DHOTSPOT_BUILD_USER="\"root\"" > -DHOTSPOT_LIB_ARCH=\"\" > -DJRE_RELEASE_VERSION="\"1.7.0-internal-root_2011_10_31_22_31-b00\"" > -DHOTSPOT_VM_DISTRO="\"OpenJDK\"" -DTARGET_OS_FAMILY_bsd > -DTARGET_ARCH_zero -DTARGET_ARCH_MODEL_zero -DTARGET_OS_ARCH_bsd_zero > -DTARGET_OS_ARCH_MODEL_bsd_zero -DTARGET_COMPILER_gcc -fPIC -fno-rtti > -fno-exceptions -pthread -fcheck-new -pipe -O3 -fno-strict-aliasing > -D_LP64=1 -I/usr/local/include -Werror -Wpointer-arith -Wconversion > -Wsign-compare -c -MMD -MP -MF > ../generated/dependencies/precompiled.hpp.gch.d -x c++-header > /data/openjdk7/bsd-port/hotspot/src/share/vm/precompiled.hpp -o > precompiled.hpp.gch > <command-line>: error: macro names must be identifiers > cc1plus: warnings being treated as errors > In file included from > /data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions.hpp:33, > from > /data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/debug.hpp:29, > from > /data/openjdk7/bsd-port/hotspot/src/share/vm/runtime/globals.hpp:28, > from > /data/openjdk7/bsd-port/hotspot/src/share/vm/memory/allocation.hpp:28, > from > /data/openjdk7/bsd-port/hotspot/src/share/vm/memory/iterator.hpp:28, > from > /data/openjdk7/bsd-port/hotspot/src/share/vm/memory/genOopClosures.hpp:28, > from > /data/openjdk7/bsd-port/hotspot/src/share/vm/oops/klass.hpp:28, > from > /data/openjdk7/bsd-port/hotspot/src/share/vm/runtime/handles.hpp:28, > from > /data/openjdk7/bsd-port/hotspot/src/share/vm/code/oopRecorder.hpp:28, > from > /data/openjdk7/bsd-port/hotspot/src/share/vm/asm/assembler.hpp:28, > from > /data/openjdk7/bsd-port/hotspot/src/share/vm/precompiled.hpp:29: > /data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp:195: > warning: overflow in implicit constant conversion > /data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp:196: > warning: overflow in implicit constant conversion > In file included from > /data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/debug.hpp:29, > from > /data/openjdk7/bsd-port/hotspot/src/share/vm/runtime/globals.hpp:28, > from > /data/openjdk7/bsd-port/hotspot/src/share/vm/memory/allocation.hpp:28, > from > /data/openjdk7/bsd-port/hotspot/src/share/vm/memory/iterator.hpp:28, > from > /data/openjdk7/bsd-port/hotspot/src/share/vm/memory/genOopClosures.hpp:28, > from > /data/openjdk7/bsd-port/hotspot/src/share/vm/oops/klass.hpp:28, > from > /data/openjdk7/bsd-port/hotspot/src/share/vm/runtime/handles.hpp:28, > from > /data/openjdk7/bsd-port/hotspot/src/share/vm/code/oopRecorder.hpp:28, > from > /data/openjdk7/bsd-port/hotspot/src/share/vm/asm/assembler.hpp:28, > from > /data/openjdk7/bsd-port/hotspot/src/share/vm/precompiled.hpp:29: > /data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions.hpp: > In function 'jint high(jlong)': > /data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions.hpp:433: > warning: right shift count >= width of type > /data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions.hpp: > In function 'void set_low(jlong*, jint)': > /data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions.hpp:437: > warning: left shift count >= width of type > /data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions.hpp: > In function 'void set_high(jlong*, jint)': > /data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions.hpp:441: > warning: left shift count >= width of type > /data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions.hpp: > In function 'jlong build_long_from(u1, u1, u1, u1, u1, u1, u1, u1)': > /data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions.hpp:1122: > warning: left shift count >= width of type > /data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions.hpp:1122: > warning: left shift count >= width of type > /data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions.hpp:1123: > warning: left shift count >= width of type > /data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions.hpp:1123: > warning: left shift count >= width of type > /data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions.hpp:1124: > warning: left shift count >= width of type > /data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions.hpp:1124: > warning: left shift count >= width of type > /data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions.hpp:1125: > warning: left shift count >= width of type > /data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions.hpp:1125: > warning: left shift count >= width of type > In file included from > /data/openjdk7/bsd-port/hotspot/src/share/vm/runtime/basicLock.hpp:28, > from > /data/openjdk7/bsd-port/hotspot/src/share/vm/runtime/frame.hpp:30, > from > /data/openjdk7/bsd-port/hotspot/src/share/vm/prims/jvmtiExport.hpp:33, > from > /data/openjdk7/bsd-port/hotspot/src/share/vm/runtime/thread.hpp:32, > from > /data/openjdk7/bsd-port/hotspot/src/os/bsd/vm/thread_bsd.inline.hpp:30, > from > /data/openjdk7/bsd-port/hotspot/src/share/vm/memory/resourceArea.hpp:39, > from > /data/openjdk7/bsd-port/hotspot/src/share/vm/classfile/classFileParser.hpp:29, > from > /data/openjdk7/bsd-port/hotspot/src/share/vm/classfile/classLoader.hpp:28, > from > /data/openjdk7/bsd-port/hotspot/src/share/vm/classfile/systemDictionary.hpp:29, > from > /data/openjdk7/bsd-port/hotspot/src/share/vm/ci/ciEnv.hpp:30, > from > /data/openjdk7/bsd-port/hotspot/src/share/vm/ci/ciUtilities.hpp:28, > from > /data/openjdk7/bsd-port/hotspot/src/share/vm/ci/ciNullObject.hpp:30, > from > /data/openjdk7/bsd-port/hotspot/src/share/vm/ci/ciConstant.hpp:29, > from > /data/openjdk7/bsd-port/hotspot/src/share/vm/precompiled.hpp:36: > /data/openjdk7/bsd-port/hotspot/src/share/vm/oops/markOop.hpp: At global > scope: > /data/openjdk7/bsd-port/hotspot/src/share/vm/oops/markOop.hpp:142: > warning: overflow in implicit constant conversion > /data/openjdk7/bsd-port/hotspot/src/share/vm/oops/markOop.hpp:381: > warning: left shift count >= width of type > /data/openjdk7/bsd-port/hotspot/src/share/vm/oops/markOop.hpp:381: > warning: negative integer implicitly converted to unsigned type > /data/openjdk7/bsd-port/hotspot/src/share/vm/oops/markOop.hpp: In member > function 'markOopDesc* markOopDesc::copy_set_hash(intptr_t) const': > /data/openjdk7/bsd-port/hotspot/src/share/vm/oops/markOop.hpp:303: > warning: overflow in implicit constant conversion > gmake[6]: *** [precompiled.hpp.gch] Error 1 > gmake[6]: Leaving directory > `/data/openjdk7/bsd-port/build/bsd-arm/hotspot/outputdir/bsd__zero/product' > gmake[5]: *** [the_vm] Error 2 > gmake[5]: Leaving directory > `/data/openjdk7/bsd-port/build/bsd-arm/hotspot/outputdir/bsd__zero/product' > gmake[4]: *** [productzero] Error 2 > gmake[4]: Leaving directory > `/data/openjdk7/bsd-port/build/bsd-arm/hotspot/outputdir' > gmake[3]: *** [generic_buildzero] Error 2 > gmake[3]: Leaving directory `/data/openjdk7/bsd-port/hotspot/make' > gmake[2]: *** [productzero] Error 2 > gmake[2]: Leaving directory `/data/openjdk7/bsd-port/hotspot/make' > gmake[1]: *** [hotspot-build] Error 2 > gmake[1]: Leaving directory `/data/openjdk7/bsd-port' > gmake: *** [build_product_image] Error 2 > [root@sheeva1 /data/openjdk7/bsd-port]# > > There is this error about the command-line. It is about the empty -D > option, but I don't know where is comes from. And is it ok to ignore the > warning? Of should they always be seen as errors while compiling java. I > don't know how strict the java project is about this. > > Any thoughts or helpful hints? Look at hotspot/make/bsd/platform_zero.in. You've got an empty -D because @ZERO_ARCHDEF@ isn't being set up correctly. You'll see there is a substitution done in hotspot/make/bsd/Makefile that expands this into whatever ZERO_ARCHDEF is set to. The only place that it looks like getting set is in jdk/make/jdk_generic_profile.sh. I see ZERO_LIBARCH is set there for arm. It would seem to never set ZERO_ARCHDEF with the current logic though. Try setting ZERO_ENDIANNESS and ZERO_ARCHDEF in the environment and see how you go. I would guess the correct settings are "little"(?) and "ARM". The other errors _may_ be because the arch wasn't understood so the typedef for jlong, etc. isn't being set up right. You might have to dig deeper on that one. -- Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis@FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111103033910.GA96008>