Hi,

While building OpenJDK8 on SmartOS (a fork of Sun Solaris), we came across
a number of anomalies and would like your help and support.

Here is the info from configure so you know a little bit more about the
platform we are talking about:

Running ./configure with  --with-boot-jdk=/opt/local/java/openjdk7
--enable-ccache --with-jvm-variants=server
--with-cacerts-file=/home/jenkins/workspace/openjdk_build_x86-64_smartOS/cacerts_area/security/cacerts
--with-alsa=/home/jenkins/workspace/openjdk_build_x86-64_smartOS/alsa-lib-1.0.27.2
--with-freetype=/home/jenkins/workspace/openjdk_build_x86-64_smartOS/openjdk/installedfreetype
--with-x=/usr/include/X11 --with-debug-level=release
--x-includes=/opt/local/include --x-libraries=/opt/local/lib
--with-cups=/opt/local/ --with-cups-include=/opt/local/include
Running generated-configure.sh
configure: Configuration created at Sat May 27 23:30:44 UTC 2017.
configure: configure script generated at timestamp 1468207795.
checking for basename... /opt/local/bin//basename
checking for bash... /usr/bin/bash
checking for cat... /opt/local/bin//cat
checking for chmod... /opt/local/bin//chmod
checking for cmp... /opt/local/bin//cmp
checking for comm... /opt/local/bin//comm
checking for cp... /opt/local/bin//cp
checking for cpio... /usr/bin/cpio
checking for cut... /opt/local/bin//cut
checking for date... /opt/local/bin//date
checking for gdiff... /opt/local/bin//gdiff
checking for dirname... /opt/local/bin//dirname
checking for echo... /opt/local/bin//echo
checking for expr... /opt/local/bin//expr
checking for file... /usr/bin/file
checking for find... /opt/local/bin//find
checking for head... /opt/local/bin//head
checking for ln... /opt/local/bin//ln
checking for ls... /opt/local/bin//ls
checking for mkdir... /opt/local/bin//mkdir
checking for mktemp... /opt/local/bin//mktemp
checking for mv... /opt/local/bin//mv
checking for printf... /opt/local/bin//printf
checking for rm... /opt/local/bin//rm
checking for sh... /usr/bin/sh
checking for sort... /opt/local/bin//sort
checking for tail... /opt/local/bin//tail
checking for tar... /opt/local/bin//tar
checking for tee... /opt/local/bin//tee
checking for touch... /opt/local/bin//touch
checking for tr... /opt/local/bin//tr
checking for uname... /opt/local/bin//uname
checking for uniq... /opt/local/bin//uniq
checking for wc... /opt/local/bin//wc
checking for which... /usr/bin/which
checking for xargs... /opt/local/bin//xargs
checking for gawk... gawk
checking for grep that handles long lines and -e... /opt/local/bin//grep
checking for egrep... /opt/local/bin//grep -E
checking for fgrep... /opt/local/bin//grep -F
checking for a sed that does not truncate output... /opt/local/bin//sed
checking for nawk... /opt/local/bin//nawk
checking for cygpath... no
checking for readlink... /opt/local/bin//readlink
checking for df... /opt/local/bin//df
checking for SetFile... no
checking build system type... x86_64-pc-solaris2.11
checking host system type... x86_64-pc-solaris2.11
checking target system type... x86_64-pc-solaris2.11
checking openjdk-build os-cpu... solaris-x86_64
checking openjdk-target os-cpu... solaris-x86_64
checking compilation type... native
checking for presence of closed sources... no
checking if closed source is suppressed (openjdk-only)... no
checking which variant of the JDK to build... normal
checking which interpreter of the JVM to build... template
checking which variants of the JVM to build... server
checking which debug level to use... release
checking what configuration name to use... solaris-x86_64-normal-server-release
checking for apt-get... no
checking for yum... no
checking for port... no
checking for pkgutil... no
checking for pkgadd... no
checking for gmake... /opt/local/bin//gmake
configure: Testing potential make at /opt/local/bin//gmake, found
using gmake in PATH
configure: Resolving FOUND_MAKE (as /opt/local/bin//gmake) failed,
using /opt/local/bin//gmake directly.
configure: Using GNU make 3.81 (or later) at /opt/local/bin//gmake
(version: GNU Make 4.1)
checking if find supports -delete... yes
checking for unzip... /opt/local/bin//unzip
checking for zip... /opt/local/bin//zip
checking for ldd... /usr/bin/ldd
checking for readelf... /opt/local/bin//readelf
checking for hg... /opt/local/bin//hg
checking for stat... /opt/local/bin//stat
checking for time... /usr/bin/time
checking for pkg-config... /opt/local/bin//pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for 7z... no
checking for unzip... unzip
checking for wget... wget
checking headful support... include support for both headful and headless
configure: Found potential Boot JDK using configure arguments
checking for Boot JDK... /opt/local/java/openjdk7
checking Boot JDK version... openjdk version "1.7.0-internal" OpenJDK
Runtime Environment (build 1.7.0-internal-pkgsrc_2015_02_22_06_07-b00)
OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode)
checking for java in Boot JDK... ok
checking for javac in Boot JDK... ok
checking for javah in Boot JDK... ok
checking for javap in Boot JDK... ok
checking for jar in Boot JDK... ok
checking for rmic in Boot JDK... ok
checking for native2ascii in Boot JDK... ok
checking if Boot JDK is 32 or 64 bits... 64
checking flags for boot jdk java command ...
checking flags for boot jdk java command for big workloads...  -Xms64M
-Xmx1600M -XX:ThreadStackSize=1536 -XX:PermSize=32m
-XX:MaxPermSize=160m
checking flags for boot jdk java command for small workloads...
-XX:+UseSerialGC -Xms32M -Xmx512M
checking for jtreg... no
checking for cc...
/root/SolarisStudio12.3-solaris-x86-bin/solarisstudio12.3/bin/cc
configure: Resolving CC (as
/root/SolarisStudio12.3-solaris-x86-bin/solarisstudio12.3/bin/cc)
failed, using /root/SolarisStudio12.3-solaris-x86-bin/solarisstudio12.3/bin/cc
directly.
checking resolved symbolic links for CC...
/root/SolarisStudio12.3-solaris-x86-bin/solarisstudio12.3/prod/bin/cc
checking if CC is disguised ccache... no, keeping CC
configure: Using Sun Studio C compiler version 5.12 (located at
/root/SolarisStudio12.3-solaris-x86-bin/solarisstudio12.3/prod/bin/cc)
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... no
checking whether
/root/SolarisStudio12.3-solaris-x86-bin/solarisstudio12.3/prod/bin/cc
accepts -g... yes
checking for 
/root/SolarisStudio12.3-solaris-x86-bin/solarisstudio12.3/prod/bin/cc
option to accept ISO C89... none needed
checking for CC...
/root/SolarisStudio12.3-solaris-x86-bin/solarisstudio12.3/bin/CC
configure: Resolving CXX (as
/root/SolarisStudio12.3-solaris-x86-bin/solarisstudio12.3/bin/CC)
failed, using /root/SolarisStudio12.3-solaris-x86-bin/solarisstudio12.3/bin/CC
directly.
checking resolved symbolic links for CXX...
/root/SolarisStudio12.3-solaris-x86-bin/solarisstudio12.3/prod/bin/CC
checking if CXX is disguised ccache... no, keeping CXX
configure: Using Sun Studio C++ compiler version 5.12 (located at
/root/SolarisStudio12.3-solaris-x86-bin/solarisstudio12.3/prod/bin/CC)
checking whether we are using the GNU C++ compiler... no
checking whether
/root/SolarisStudio12.3-solaris-x86-bin/solarisstudio12.3/prod/bin/CC
accepts -g... yes
checking for ar... ar
configure: Rewriting AR to "/opt/local/bin//ar"
checking how to run the C preprocessor...
/root/SolarisStudio12.3-solaris-x86-bin/solarisstudio12.3/prod/bin/cc
-E
configure: Resolving CPP (as
/root/SolarisStudio12.3-solaris-x86-bin/solarisstudio12.3/prod/bin/cc)
failed, using 
/root/SolarisStudio12.3-solaris-x86-bin/solarisstudio12.3/prod/bin/cc
directly.
checking how to run the C++ preprocessor...
/root/SolarisStudio12.3-solaris-x86-bin/solarisstudio12.3/prod/bin/CC
-E
configure: Resolving CXXCPP (as
/root/SolarisStudio12.3-solaris-x86-bin/solarisstudio12.3/prod/bin/CC)
failed, using 
/root/SolarisStudio12.3-solaris-x86-bin/solarisstudio12.3/prod/bin/CC
directly.
checking for as... /opt/local/bin//as
configure: Resolving AS (as /opt/local/bin//as) failed, using
/opt/local/bin//as directly.
checking for nm... /opt/local/bin//nm
configure: Resolving NM (as /opt/local/bin//nm) failed, using
/opt/local/bin//nm directly.
checking for gnm... /opt/local/bin//gnm
configure: Resolving GNM (as /opt/local/bin//gnm) failed, using
/opt/local/bin//gnm directly.
checking for strip... /opt/local/bin//strip
configure: Resolving STRIP (as /opt/local/bin//strip) failed, using
/opt/local/bin//strip directly.
checking for mcs... /usr/bin/mcs
configure: Resolving MCS (as /usr/bin/mcs) failed, using /usr/bin/mcs directly.
checking for gobjcopy... gobjcopy
configure: Rewriting OBJCOPY to "/opt/local/bin//gobjcopy"
checking for gobjdump... gobjdump
configure: Rewriting OBJDUMP to "/opt/local/bin//gobjdump"
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking size of int *... 8
checking for target address size... 64 bits
checking whether byte ordering is bigendian... no
checking if the C compiler supports "-m64"... yes
checking if the C++ compiler supports "-m64"... yes
checking if both compilers support "-m64"... yes
checking if the C compiler supports "-m64"... yes
checking if the C++ compiler supports "-m64"... yes
checking if both compilers support "-m64"... yes
checking if we should generate debug symbols... true
checking if we should zip debug-info files... yes
checking what is not needed on Solaris?... alsa pulse
checking for X... libraries /opt/local/lib, headers /opt/local/include
checking whether -R must be followed by a space... no
checking for gethostbyname... no
checking for gethostbyname in -lnsl... yes
checking for connect... no
checking for connect in -lsocket... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for X11/extensions/shape.h... yes
checking for X11/extensions/Xrender.h... yes
checking for X11/extensions/XTest.h... yes
checking for X11/Intrinsic.h... yes
configure: Found freetype include files at
/home/jenkins/workspace/openjdk_build_x86-64_smartOS/openjdk/installedfreetype/include
using --with-freetype
checking for freetype includes...
/home/jenkins/workspace/openjdk_build_x86-64_smartOS/openjdk/installedfreetype/include
checking for freetype libraries...
/home/jenkins/workspace/openjdk_build_x86-64_smartOS/openjdk/installedfreetype/lib
checking if we can compile and link with freetype... yes
checking if we should bundle freetype... yes
configure: WARNING: alsa not used, so --with-alsa is ignored
checking for main in -ljpeg... no
configure: Will use jpeg decoder bundled with the OpenJDK source
checking for which giflib to use... bundled
checking for compress in -lz... no
checking for which zlib to use... bundled
checking for cos in -lm... yes
checking for dlopen in -ldl... yes
checking if elliptic curve crypto implementation is present... yes
checking for number of cores... 32
checking for memory size... prtconf: devinfo facility not available
8192 MB
checking for appropriate number of jobs to run in parallel... 7
checking whether to use sjavac... no
checking for ccache... no
checking if build directory is on local disk... yes
configure: creating
/home/jenkins/workspace/openjdk_build_x86-64_smartOS/openjdk/build/solaris-x86_64-normal-server-release/config.status
config.status: creating
/home/jenkins/workspace/openjdk_build_x86-64_smartOS/openjdk/build/solaris-x86_64-normal-server-release/spec.gmk
config.status: creating
/home/jenkins/workspace/openjdk_build_x86-64_smartOS/openjdk/build/solaris-x86_64-normal-server-release/hotspot-spec.gmk
config.status: creating
/home/jenkins/workspace/openjdk_build_x86-64_smartOS/openjdk/build/solaris-x86_64-normal-server-release/bootcycle-spec.gmk
config.status: creating
/home/jenkins/workspace/openjdk_build_x86-64_smartOS/openjdk/build/solaris-x86_64-normal-server-release/compare.sh
config.status: creating
/home/jenkins/workspace/openjdk_build_x86-64_smartOS/openjdk/build/solaris-x86_64-normal-server-release/spec.sh
config.status: creating
/home/jenkins/workspace/openjdk_build_x86-64_smartOS/openjdk/build/solaris-x86_64-normal-server-release/Makefile
config.status: creating
/home/jenkins/workspace/openjdk_build_x86-64_smartOS/openjdk/build/solaris-x86_64-normal-server-release/config.h

====================================================
A new configuration has been successfully created in
/home/jenkins/workspace/openjdk_build_x86-64_smartOS/openjdk/build/solaris-x86_64-normal-server-release
using configure arguments '--with-boot-jdk=/opt/local/java/openjdk7
--enable-ccache --with-jvm-variants=server
--with-cacerts-file=/home/jenkins/workspace/openjdk_build_x86-64_smartOS/cacerts_area/security/cacerts
--with-alsa=/home/jenkins/workspace/openjdk_build_x86-64_smartOS/alsa-lib-1.0.27.2
--with-freetype=/home/jenkins/workspace/openjdk_build_x86-64_smartOS/openjdk/installedfreetype
--with-x=/usr/include/X11 --with-debug-level=release
--x-includes=/opt/local/include --x-libraries=/opt/local/lib
--with-cups=/opt/local/ --with-cups-include=/opt/local/include'.

Configuration summary:
* Debug level:    release
* JDK variant:    normal
* JVM variants:   server
* OpenJDK target: OS: solaris, CPU architecture: x86, address length: 64

Tools summary:
* Boot JDK:       openjdk version "1.7.0-internal" OpenJDK Runtime
Environment (build 1.7.0-internal-pkgsrc_2015_02_22_06_07-b00) OpenJDK
64-Bit Server VM (build 24.71-b01, mixed mode)  (at
/opt/local/java/openjdk7)
* C Compiler:     Sun Studio version 5.12 (at
/root/SolarisStudio12.3-solaris-x86-bin/solarisstudio12.3/prod/bin/cc)
* C++ Compiler:   Sun Studio version 5.12 (at
/root/SolarisStudio12.3-solaris-x86-bin/solarisstudio12.3/prod/bin/CC)

Build performance summary:
* Cores to use:   7
* Memory limit:   8192 MB
* ccache status:  not available for your system


Firstly we had to apply the below patch in order to overcome couple of
initial issues:

--- a/hotspot/make/solaris/makefiles/build_vm_def.sh
+++ b/hotspot/make/solaris/makefiles/build_vm_def.sh
@@ -1,6 +1,6 @@
 #!/bin/sh

-/usr/ccs/bin/nm -p $* \
+/opt/local/bin/nm -p $* \
     | awk '{
           if ($2 == "U") next
           if ($3 ~ /^__1c.*__vtbl_$/ || $3 ~ /^gHotSpotVM/) print "\t" $3 ";"
diff --git a/hotspot/make/solaris/makefiles/sparcWorks.make
b/hotspot/make/solaris/makefiles/sparcWorks.make
index cff57a2..a58428b 100644
--- a/hotspot/make/solaris/makefiles/sparcWorks.make
+++ b/hotspot/make/solaris/makefiles/sparcWorks.make
@@ -112,7 +112,7 @@ ARCHFLAG_OLD/sparcv9 = -xarch=v9
 ARCHFLAG_NEW/sparcv9 = -m64 -xarch=sparc
 ARCHFLAG_OLD/i486    =
 ARCHFLAG_NEW/i486    = -m32
-ARCHFLAG_OLD/amd64   = -xarch=amd64
+ARCHFLAG_OLD/amd64   = -march=amdfam10
 ARCHFLAG_NEW/amd64   = -m64

 # Select the ARCHFLAGs and other SS12 (5.9) options


We think that these values are hard-coded and there is no way (or at least
we couldn't find one) to pass the custom values via a configure
command-line option or environment variable.

And then finally after patching it manually, we landed with this issue:

Compiling 
/home/jenkins/workspace/openjdk_build_x86-64_smartOS/openjdk/hotspot/src/share/vm/runtime/vm_version.cpp
Linking vm...
ld: warning: symbol '__JvmOffsets' has differing types:
        (file JvmOffsets.o type=OBJT; file dtrace.o type=FUNC);
ld: warning: symbol 'CodeCache::_heap' has differing types:
        (file codeCache.o type=OBJT; file dtrace.o type=FUNC);
ld: warning: symbol 'BufferBlob::__vtbl' has differing types:
        (file codeBlob.o type=OBJT; file dtrace.o type=FUNC);
ld: warning: symbol 'Method::__vtbl' has differing types:
        (file dtrace.o type=FUNC; file method.o type=OBJT);
ld: warning: symbol 'nmethod::__vtbl' has differing types:
        (file dtrace.o type=FUNC; file nmethod.o type=OBJT);
ld: warning: symbol 'Universe::_collectedHeap' has differing types:
        (file dtrace.o type=FUNC; file universe.o type=OBJT);
BFD: libjvm.debuginfo: Not enough room for program headers, try linking with -N
/opt/local/bin//gobjcopy:libjvm.debuginfo[.note]: Bad value
BFD: libjvm.debuginfo: Not enough room for program headers, try linking with -N
/opt/local/bin//gobjcopy:libjvm.debuginfo: Bad value
/home/jenkins/workspace/openjdk_build_x86-64_smartOS/openjdk/hotspot/make/solaris/makefiles/vm.make:296:
recipe for target 'libjvm.so' failed
gmake[6]: *** [libjvm.so] Error 1
/home/jenkins/workspace/openjdk_build_x86-64_smartOS/openjdk/hotspot/make/solaris/makefiles/top.make:112:
recipe for target 'the_vm' failed
gmake[5]: *** [the_vm] Error 2
/home/jenkins/workspace/openjdk_build_x86-64_smartOS/openjdk/hotspot/make/solaris/Makefile:226:
recipe for target 'product' failed
gmake[4]: *** [product] Error 2
Makefile:230: recipe for target 'generic_build2' failed
gmake[3]: *** [generic_build2] Error 2
Makefile:177: recipe for target 'product' failed
gmake[2]: *** [product] Error 2
HotspotWrapper.gmk:44: recipe for target
'/home/jenkins/workspace/openjdk_build_x86-64_smartOS/openjdk/build/solaris-x86_64-normal-server-release/hotspot/_hotspot.timestamp'
failed
gmake[1]: *** 
[/home/jenkins/workspace/openjdk_build_x86-64_smartOS/openjdk/build/solaris-x86_64-normal-server-release/hotspot/_hotspot.timestamp]
Error 2
/home/jenkins/workspace/openjdk_build_x86-64_smartOS/openjdk//make/Main.gmk:108:
recipe for target 'hotspot-only' failed
make: *** [hotspot-only] Error 2


I see this has already been reported and resolved via
https://bugs.openjdk.java.net/browse/JDK-8033602, so how come we still get
this issue.

Any ideas or thoughts about the above?

Thanks.

Cheers,
Mani
-- 
@theNeomatrix369 <http://twitter.com/theNeomatrix369>*  |  **Blog
<http://neomatrix369.wordpress.com/>**  |  *LJC Associate & LJC Advocate
(@adoptopenjdk & @adoptajsr programs)
*Meet-a-Project - *MutabilityDetector
<https://github.com/MutabilityDetector>*  |  **Bitbucket
<https://bitbucket.org/neomatrix369>* * |  **Github
<https://github.com/neomatrix369>* * |  **LinkedIn
<http://uk.linkedin.com/pub/mani-sarkar/71/a77/39b>*
*Come to Devoxx UK 2017:* http://www.devoxx.co.uk/

*Don't chase success, rather aim for "Excellence", and success will come
chasing after you!*

Reply via email to