Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Oct 2011 23:14:57 +0100
From:      "Ronald Klop" <ronald-freebsd8@klop.yi.org>
To:        freebsd-java@freebsd.org
Subject:   Re: Java on ARM processor?
Message-ID:  <op.v38le7wk8527sy@212-182-167-131.ip.telfort.nl>
In-Reply-To: <20111026041559.GA38377@misty.eyesbeyond.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 26 Oct 2011 06:15:59 +0200, Greg Lewis <glewis@eyesbeyond.com> =20
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 =20
>> 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 =20
>> 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 =
=20
>> 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=3D/usr/local/openjdk6.
>
> See this email for details:
>
> http://docs.freebsd.org/cgi/getmsg.cgi?fetch=3D89377+0+archive/2008/fre=
ebsd-java/20080203.freebsd-java
>
> It will need to be updated somewhat for openjdk7.  I likely have an =20
> 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 =20
boot-java scripts. And /data/openjdk7 is my NFS exported dir.
If I build with this:
export JAVA_BOOTHOST=3D192.168.1.33
export JAVA_BOOTDIR=3D/usr/local/openjdk6
export ALT_BOOTDIR=3D/data/boot-java

export ANT_HOME=3D/data/openjdk7/apache-ant-1.8.2
export ALT_FREETYPE_HEADERS_PATH=3D/usr/local/include
export ALT_FREETYPE_LIB_PATH=3D/usr/local/lib
export ALT_CUPS_HEADERS_PATH=3D/usr/local/include
export NO_DOCS=3Dtrue
export ZERO_BUILD=3Dtrue
export BUILD_CORBA=3Dfalse
export BUILD_JAXP=3Dfalse
export BUILD_JAXWS=3Dfalse

gmake

It enters building the hotspot for zero, but then gives me the task to go=
 =20
back to my C courses. :-)

########################################################################
########################################################################
##### Entering hotspot for target(s) all_productzero               #####
########################################################################

cd  ./hotspot/make && \
     gmake JDK_TOPDIR=3D/data/openjdk7/bsd-port/jdk =20
JDK_MAKE_SHARED_DIR=3D/data/openjdk7/bsd-port/jdk/make/common/shared =20
EXTERNALSANITYCONTROL=3Dtrue SOURCE_LANGUAGE_VERSION=3D7 =20
TARGET_CLASS_VERSION=3D7 MILESTONE=3Dinternal BUILD_NUMBER=3Db00 =20
JDK_BUILD_NUMBER=3Db00 FULL_VERSION=3D1.7.0-internal-root_2011_10_31_22_5=
7-b00 =20
PREVIOUS_JDK_VERSION=3D1.6.0 JDK_VERSION=3D1.7.0 JDK_MKTG_VERSION=3D7 =20
JDK_MAJOR_VERSION=3D1 JDK_MINOR_VERSION=3D7 JDK_MICRO_VERSION=3D0 =20
PREVIOUS_MAJOR_VERSION=3D1 PREVIOUS_MINOR_VERSION=3D6 PREVIOUS_MICRO_VERS=
ION=3D0 =20
ARCH_DATA_MODEL=3D64 COOKED_BUILD_NUMBER=3D0 =20
ANT_HOME=3D"/data/openjdk7/apache-ant-1.8.2" =20
ALT_OUTPUTDIR=3D/data/openjdk7/bsd-port/build/bsd-arm/hotspot/outputdir =20
ALT_EXPORT_PATH=3D/data/openjdk7/bsd-port/build/bsd-arm/hotspot/import =20
ALT_SLASH_JAVA=3D/NOT-SET ALT_BOOTDIR=3D/data/boot-java =20
ALT_LANGTOOLS_DIST=3D/data/openjdk7/bsd-port/build/bsd-arm/langtools/dist=
 =20
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=3Dproductzero generic_buildzero =20
ALT_OUTPUTDIR=3D/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=3D1 JAVA_HOME=3D/data/boot-java =20
OUTPUTDIR=3D/data/openjdk7/bsd-port/build/bsd-arm/hotspot/outputdir =20
GAMMADIR=3D/data/openjdk7/bsd-port/hotspot MAKE_VERBOSE=3Dy =20
HOTSPOT_RELEASE_VERSION=3D21.0-b17 =20
JRE_RELEASE_VERSION=3D1.7.0-internal-root_2011_10_31_22_57-b00 =20
HOTSPOT_BUILD_VERSION=3D productzero
gmake[4]: Entering directory =20
`/data/openjdk7/bsd-port/build/bsd-arm/hotspot/outputdir'
cd bsd__zero/product && gmake -w " LP64=3D1 "
gmake[5]: Entering directory =20
`/data/openjdk7/bsd-port/build/bsd-arm/hotspot/outputdir/bsd__zero/produc=
t'
gmake[6]: Entering directory =20
`/data/openjdk7/bsd-port/build/bsd-arm/hotspot/outputdir/bsd__zero/produc=
t'
gmake[6]: Nothing to be done for `all'.
gmake[6]: Leaving directory =20
`/data/openjdk7/bsd-port/build/bsd-arm/hotspot/outputdir/bsd__zero/produc=
t'
gmake[6]: Entering directory =20
`/data/openjdk7/bsd-port/build/bsd-arm/hotspot/outputdir/bsd__zero/produc=
t'
if [ -d /data/openjdk7/bsd-port/hotspot/agent -a "zero" !=3D "ia64" \
              -a "zero" !=3D "arm" \
              -a "zero" !=3D "ppc" \
              -a "zero" !=3D "zero" ] ; then \
    gmake -f sa.make =20
/data/openjdk7/bsd-port/build/bsd-arm/hotspot/outputdir/bsd__zero/product=
/../generated/sa-jdi.jar; =20
\
fi
gmake[6]: Leaving directory =20
`/data/openjdk7/bsd-port/build/bsd-arm/hotspot/outputdir/bsd__zero/produc=
t'
gmake[6]: Entering directory =20
`/data/openjdk7/bsd-port/build/bsd-arm/hotspot/outputdir/bsd__zero/produc=
t'
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 =20
-DZERO_LIBARCH=3D\"\" -DPRODUCT -I. =20
-I/data/openjdk7/bsd-port/hotspot/src/share/vm/prims =20
-I/data/openjdk7/bsd-port/hotspot/src/share/vm =20
-I/data/openjdk7/bsd-port/hotspot/src/cpu/zero/vm =20
-I/data/openjdk7/bsd-port/hotspot/src/os_cpu/bsd_zero/vm =20
-I/data/openjdk7/bsd-port/hotspot/src/os/bsd/vm =20
-I/data/openjdk7/bsd-port/hotspot/src/os/posix/vm -I../generated =20
-DHOTSPOT_RELEASE_VERSION=3D"\"21.0-b17\"" =20
-DHOTSPOT_BUILD_TARGET=3D"\"product\"" -DHOTSPOT_BUILD_USER=3D"\"root\"" =
=20
-DHOTSPOT_LIB_ARCH=3D\"\" =20
-DJRE_RELEASE_VERSION=3D"\"1.7.0-internal-root_2011_10_31_22_31-b00\"" =20
-DHOTSPOT_VM_DISTRO=3D"\"OpenJDK\"" -DTARGET_OS_FAMILY_bsd =20
-DTARGET_ARCH_zero -DTARGET_ARCH_MODEL_zero -DTARGET_OS_ARCH_bsd_zero =20
-DTARGET_OS_ARCH_MODEL_bsd_zero -DTARGET_COMPILER_gcc  -fPIC -fno-rtti =20
-fno-exceptions -pthread -fcheck-new  -pipe -O3 -fno-strict-aliasing =20
-D_LP64=3D1 -I/usr/local/include -Werror -Wpointer-arith -Wconversion =20
-Wsign-compare    -c -MMD -MP -MF =20
../generated/dependencies/precompiled.hpp.gch.d -x c++-header =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/precompiled.hpp -o =20
precompiled.hpp.gch
<command-line>: error: macro names must be identifiers
cc1plus: warnings being treated as errors
In file included from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions.=
hpp:33,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/debug.hpp:29,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/runtime/globals.hpp:28,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/memory/allocation.hpp:28,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/memory/iterator.hpp:28,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/memory/genOopClosures.hpp:28=
,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/oops/klass.hpp:28,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/runtime/handles.hpp:28,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/code/oopRecorder.hpp:28,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/asm/assembler.hpp:28,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/precompiled.hpp:29:
/data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions_=
gcc.hpp:195: =20
warning: overflow in implicit constant conversion
/data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions_=
gcc.hpp:196: =20
warning: overflow in implicit constant conversion
In file included from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/debug.hpp:29,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/runtime/globals.hpp:28,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/memory/allocation.hpp:28,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/memory/iterator.hpp:28,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/memory/genOopClosures.hpp:28=
,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/oops/klass.hpp:28,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/runtime/handles.hpp:28,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/code/oopRecorder.hpp:28,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/asm/assembler.hpp:28,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/precompiled.hpp:29:
/data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions.=
hpp: =20
In function 'jint high(jlong)':
/data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions.=
hpp:433: =20
warning: right shift count >=3D width of type
/data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions.=
hpp: =20
In function 'void set_low(jlong*, jint)':
/data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions.=
hpp:437: =20
warning: left shift count >=3D width of type
/data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions.=
hpp: =20
In function 'void set_high(jlong*, jint)':
/data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions.=
hpp:441: =20
warning: left shift count >=3D width of type
/data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions.=
hpp: =20
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: =20
warning: left shift count >=3D width of type
/data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions.=
hpp:1122: =20
warning: left shift count >=3D width of type
/data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions.=
hpp:1123: =20
warning: left shift count >=3D width of type
/data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions.=
hpp:1123: =20
warning: left shift count >=3D width of type
/data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions.=
hpp:1124: =20
warning: left shift count >=3D width of type
/data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions.=
hpp:1124: =20
warning: left shift count >=3D width of type
/data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions.=
hpp:1125: =20
warning: left shift count >=3D width of type
/data/openjdk7/bsd-port/hotspot/src/share/vm/utilities/globalDefinitions.=
hpp:1125: =20
warning: left shift count >=3D width of type
In file included from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/runtime/basicLock.hpp:28,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/runtime/frame.hpp:30,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/prims/jvmtiExport.hpp:33,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/runtime/thread.hpp:32,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/os/bsd/vm/thread_bsd.inline.hpp:30,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/memory/resourceArea.hpp:39,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/classfile/classFileParser.hp=
p:29,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/classfile/classLoader.hpp:28=
,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/classfile/systemDictionary.h=
pp:29,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/ci/ciEnv.hpp:30,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/ci/ciUtilities.hpp:28,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/ci/ciNullObject.hpp:30,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/ci/ciConstant.hpp:29,
                  from =20
/data/openjdk7/bsd-port/hotspot/src/share/vm/precompiled.hpp:36:
/data/openjdk7/bsd-port/hotspot/src/share/vm/oops/markOop.hpp: At global =
=20
scope:
/data/openjdk7/bsd-port/hotspot/src/share/vm/oops/markOop.hpp:142: =20
warning: overflow in implicit constant conversion
/data/openjdk7/bsd-port/hotspot/src/share/vm/oops/markOop.hpp:381: =20
warning: left shift count >=3D width of type
/data/openjdk7/bsd-port/hotspot/src/share/vm/oops/markOop.hpp:381: =20
warning: negative integer implicitly converted to unsigned type
/data/openjdk7/bsd-port/hotspot/src/share/vm/oops/markOop.hpp: In member =
=20
function 'markOopDesc* markOopDesc::copy_set_hash(intptr_t) const':
/data/openjdk7/bsd-port/hotspot/src/share/vm/oops/markOop.hpp:303: =20
warning: overflow in implicit constant conversion
gmake[6]: *** [precompiled.hpp.gch] Error 1
gmake[6]: Leaving directory =20
`/data/openjdk7/bsd-port/build/bsd-arm/hotspot/outputdir/bsd__zero/produc=
t'
gmake[5]: *** [the_vm] Error 2
gmake[5]: Leaving directory =20
`/data/openjdk7/bsd-port/build/bsd-arm/hotspot/outputdir/bsd__zero/produc=
t'
gmake[4]: *** [productzero] Error 2
gmake[4]: Leaving directory =20
`/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 =20
option, but I don't know where is comes from. And is it ok to ignore the =
=20
warning? Of should they always be seen as errors while compiling java. I =
=20
don't know how strict the java project is about this.

Any thoughts or helpful hints?

Ronald.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?op.v38le7wk8527sy>