Hi Folks,<br><br>I am trying to build 32-bit openjdk7 from source under
control/make, but I seem to have endless troubles picking up the right
ARCH option. The source code is from the b23 snapshot.<br><br>I started with <br><br><span style="color: rgb(51, 51, 255);">
make ARCH_DATA_MODEL=32 ALT_BOOTDIR=/usr/lib/jvm/java-6-sun ANT_HOME=<my_ant_path> FINDBUGS_HOME=<my_findbugs_path></span><br><br>It quickly failed with the following error:<br><br>[<span style="color: rgb(255, 0, 0);">
gcc command neglected]</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">...</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">-ljvm -L/usr/lib/jvm/java-6-sun/jre/lib/amd64 -ljava -L/usr/lib/jvm/java-6-sun/jre/lib/amd64/server -ljvm -lc
</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">/usr/bin/ld: cannot find -ljvm</span><br><br>because
there is no amd64 under /usr/lib/jvm/java-6-sun/jre/lib but only i386,
and without specifying ARCH the makefile relies on "uname -m" to guess
the ARCH, and it chooses amd64 when seeing x86_64.
<br><br>So I tried to add <span style="color: rgb(51, 102, 255);">ARCH=i386</span> in the command line. The build goes past the previous stage, but sees a different in building corba/make/javax/xa:<br><br><span style="color: rgb(255, 0, 0);">
/bin/sh: line 5: Check_ALT_JDK_IMPORT_PATH/bin/javac: No such file or directory</span><br><br>This
problem is slightly off topic, as it seems to require adding
ALT_JDK_IMPORT_PATH to the command-line even my intention is to do a
complete build. Although I still don't know why it is necessary, adding
<span style="color: rgb(51, 102, 255);">ALT_JDK_IMPORT_PATH=$ALT_BOOTDIR</span> gets me past corba, but the builds stalls at hotspot:<br><br><br><span style="color: rgb(255, 0, 0);">make[6]: *** No rule to make target `openjdk/v1_7/hotspot/src/cpu/i386/vm/x86_32.ad', needed by `../generated/adfiles/linux_x86_32.ad'. Stop.
</span><br><br>Apparenly hotspot doesn't like ARCH=i386 but prefers
ARCH=x86, and I found a place to hack in hotspot/build/linux/Makefile,
where I override ARCH=$(SRCARCH) in the following context:<br><br><span style="color: rgb(51, 102, 255);">
$(TARGETS_C2): $(SUBDIRS_C2)</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);"> cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS) ARCH=$(SRCARCH)</span><br style="color: rgb(255, 0, 0);">
<br>Then, the next error shows up in exporting jvmti.html, where I need to add the following rule in hotspot/build/linux/makefiles<div id="1fqh" class="ArwC7c ckChnd">/defs.make if I define ARCH as i386:<br><br><span style="color: rgb(51, 102, 255);">
ifeq ($(ARCH), i386)
</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);"> ARCH_DATA_MODEL = 32</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);"> PLATFORM = linux-i586
</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);"> VM_PLATFORM = linux_i486</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);"> HS_ARCH = x86
</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);">endif</span><br style="color: rgb(51, 51, 255);"><br style="color: rgb(51, 51, 255);">There is a similar patch for i586 so I suspect people tried to build hotspot with ARCH=i686 and ran into similar errors.
<br><br>Well, this is not the end of errors, as the next one shows up
in jdk/make/java/jli, where it fails to locate ergo_i386.c because only
the following two variants are available:<br><br>jdk/src/solaris/bin/ergo_i586.c
<br>jdk/src/solaris/bin/ergo_sparc.c<br><br>In summary, my questions can be condensed into two:<br><br>1)
Is control/make the right place to build everything from source. If so,
why is ALT_JDK_IMPORT_PATH needed in the make command line?
<br>2) What is the ARCH value applicable to all modules if the goal is to build 32-bit package on x86_64 platform?<br><br>Thanks,<br>-Ben<br></div>