<div>Your approach really helps. I turned on verbose mode and found that the build failed due to some warnings of "warning: deprecated conversion from string constant to 'char*'"and my gcc 4.2 treated these warnings as errors. I followed the solution in <a href="http://weblogs.java.net/blog/simonis/">http://weblogs.java.net/blog/simonis/</a>.</div>
<div> </div>
<div>Following is the solution of the post:</div>
<div> </div>
<div>"Internally, SUN apparently still uses gcc 3.2.2 to build the JDK and with gcc 3.2.2 there seem to be no warnings during the build so they decided to use the <span class="code">-Werror</span> option on Linux which instructs gcc to treat every compiler warning as error. If you however want to build with a gcc version higher than 3.2.2 (and you'll probably want to do this on a newer Linux distribution) you'll either have to use precompiled headers (<span class="code">USE_PRECOMPILED_HEADER=true</span>) or comment the line <span class="code">WARNINGS_ARE_ERRORS = -Werror</span> in the file <a class="jdkfile" href="http://hg.openjdk.java.net/jdk7/jdk7//hotspot/raw-file/jdk7-b24/build/linux/makefiles/gcc.make">hotspot/build/linux/makefiles/gcc.make</a> (see <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6469784">Bug 6469784</a>)."</div>
<div> </div>
<div> Now it seems that the problem was gone. Thanks!<br><br> </div>
<div><span class="gmail_quote">On 1/30/08, <b class="gmail_sendername">Keith McGuigan</b> <<a href="mailto:Keith.McGuigan@sun.com">Keith.McGuigan@sun.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>Feng-<br><br>As others have said, make sure you have the right sources. If this<br>happens again, though, you may have to do some debugging in the build.<br>
The referenced symbol ought to be defined in the verifier.o file.<br>Either it's not defined in there, or that file is not getting linked<br>into libjvm.so. Not sure exactly how to turn on verbose mode from the<br>command line, but in the Hotspot makefiles if VERBOSE=y is set, it will<br>
show the commands as they are executed. Use that and take a look at the<br>object files with 'nm' (maybe combined with c++filt) to try to track<br>down where exactly the problem is.<br><br>You'll probably want to do a clean build too, just to make sure it's not<br>
a problem with old or corrupted object files.<br><br>--<br>- Keith<br><br>Feng Xian wrote:<br>> Hi, I downloaded a most recent version of OpenJDK and tried to install<br>> it on a 32-bit Linux platform. But the build failed with an error of<br>
> "/home/dli/openjdk7/build/linux-i586/hotspot/outputdir/linux_i486_compiler2/product/libjvm.so:<br>> undefined reference to `Verifier::verify(instanceKlassHandle,<br>> Verifier::Mode, Thread*)".<br>><br>
> Any help will be appreciated. Details of error message and "make sanity"<br>> output are followed:<br>><br>> =================Screen snapshot =============================<br>> make[5]: Entering directory<br>
> `/home/dli/openjdk7/build/linux-i586/hotspot/outputdir/linux_i486_compiler2/product'<br>> { \<br>> echo Linking launcher...; \<br>> \<br>> gcc -m32 -march=i586 -Xlinker -O1 -m32 -march=i586 -export-dynamic<br>
> -L `pwd` -o gamma launcher.o -ljvm -lm -ldl -lpthread; \<br>> \<br>> }<br>> Linking launcher...<br>> /home/dli/openjdk7/build/linux-i586/hotspot/outputdir/linux_i486_compiler2/product/libjvm.so:<br>
> undefined reference to `Verifier::verify(instanceKlassHandle,<br>> Verifier::Mode, Thread*)'<br>> collect2: ld returned 1 exit status<br>> make[5]: *** [gamma] Error 1<br>> make[5]: Leaving directory<br>
> `/home/dli/openjdk7/build/linux-i586/hotspot/outputdir/linux_i486_compiler2/product'<br>> make[4]: *** [the_vm] Error 2<br>> make[4]: Leaving directory<br>> `/home/dli/openjdk7/build/linux-i586/hotspot/outputdir/linux_i486_compiler2/product'<br>
> make[3]: *** [product] Error 2<br>> make[3]: Leaving directory<br>> `/home/dli/openjdk7/build/linux-i586/hotspot/outputdir'<br>> make[2]: *** [generic_build2] Error 2<br>> make[2]: Leaving directory `/home/dli/openjdk7/hotspot/make'<br>
> make[1]: *** [product] Error 2<br>> make[1]: Leaving directory `/home/dli/openjdk7/hotspot/make'<br>> make: *** [hotspot-build] Error 2<br>> =============================================<br>><br>> Below is "make sanity" message.<br>
><br>> ===============Output of make sanity==============<br>> (cd ./deploy/make && \<br>> make sanity JDK_TOPDIR=/home/dli/openjdk7/jdk<br>> JDK_MAKE_SHARED_DIR=/home/dli/openjdk7/jdk/make/common/shared<br>
> EXTERNALSANITYCONTROL=true TARGET_CLASS_VERSION=5<br>> MILESTONE=Frame-Pointer BUILD_NUMBER=Dli JDK_BUILD_NUMBER=Dli<br>> FULL_VERSION=1.7.0-Frame-Pointer-Dli PREVIOUS_JDK_VERSION=1.6.0<br>> JDK_VERSION=1.7.0 JDK_MKTG_VERSION=7 JDK_MAJOR_VERSION=1<br>
> JDK_MINOR_VERSION=7 JDK_MICRO_VERSION=0 ARCH_DATA_MODEL=32<br>> COOKED_BUILD_NUMBER=Dli ANT_HOME="/home/dli/ant"<br>> FINDBUGS_HOME="/home/dli/findbugs-1.3.0"<br>> ALT_OUTPUTDIR=/home/dli/openjdk7/build/linux-i586 )<br>
> make[1]: Entering directory `/home/dli/openjdk7/deploy/make'<br>> make[1]: Leaving directory `/home/dli/openjdk7/deploy/make'<br>> make[1]: Entering directory `/home/dli/openjdk7/jdk/make'<br>> make[1]: Leaving directory `/home/dli/openjdk7/jdk/make'<br>
><br>> Build Machine Information:<br>> build machine = <a href="http://terryxian.unl.edu">terryxian.unl.edu</a> <<a href="http://terryxian.unl.edu">http://terryxian.unl.edu</a>><br>><br>> Build Directory Structure:<br>
> CWD = /home/dli/openjdk7<br>> TOPDIR = .<br>> CONTROL_TOPDIR = .<br>> LANGTOOLS_TOPDIR = ./langtools<br>> JAXP_TOPDIR = ./jaxp<br>> JAXWS_TOPDIR = ./jaxws<br>> CORBA_TOPDIR = ./corba<br>
> HOTSPOT_TOPDIR = ./hotspot<br>> JDK_TOPDIR = ./jdk<br>> DEPLOY_TOPDIR = ./deploy<br>> INSTALL_TOPDIR = ./install<br>><br>> Build Directives:<br>> BUILD_LANGTOOLS = false<br>> BUILD_JAXP = true<br>
> BUILD_JAXWS = true<br>> BUILD_CORBA = true<br>> BUILD_HOTSPOT = true<br>> BUILD_JDK = true<br>> BUILD_DEPLOY = true<br>> BUILD_INSTALL = false<br>><br>> Hotspot Settings:<br>
> HOTSPOT_BUILD_JOBS =<br>> HOTSPOT_OUTPUTDIR =<br>> /home/dli/openjdk7/build/linux-i586/hotspot/outputdir<br>> HOTSPOT_EXPORT_PATH =<br>> /home/dli/openjdk7/build/linux-i586/hotspot/import<br>
><br>> Bootstrap Settings:<br>> BOOTDIR = /home/dli/jdk1.6.0_03<br>> ALT_BOOTDIR = /home/dli/jdk1.6.0_03<br>> BOOT_VER = 1.6 [requires at least 1.5]<br>> OUTPUTDIR = /home/dli/openjdk7/build/linux-i586<br>
> ALT_OUTPUTDIR = /home/dli/openjdk7/build/linux-i586<br>> ABS_OUTPUTDIR = /home/dli/openjdk7/build/linux-i586<br>><br>> Build Tool Settings:<br>> SLASH_JAVA = /NOT-SET<br>> ALT_SLASH_JAVA =<br>
> VARIANT = OPT<br>> JDK_DEVTOOLS_DIR = /home/dli/openjdk7<br>> ALT_JDK_DEVTOOLS_DIR = /home/dli/openjdk7<br>> ANT_HOME = /home/dli/ant<br>> FINDBUGS_HOME = /home/dli/findbugs-1.3.0<br>> UNIXCOMMAND_PATH = /bin/<br>
> ALT_UNIXCOMMAND_PATH =<br>> COMPILER_PATH = /usr/bin/<br>> ALT_COMPILER_PATH =<br>> DEVTOOLS_PATH = /usr/bin/<br>> ALT_DEVTOOLS_PATH = /usr/bin<br>> UNIXCCS_PATH = /usr/ccs/bin/<br>> ALT_UNIXCCS_PATH =<br>
> USRBIN_PATH = /usr/bin/<br>> ALT_USRBIN_PATH =<br>> GCC29_COMPILER_PATH = /home/dli/openjdk7/linux/gcc29/usr/<br>> ALT_GCC29_COMPILER_PATH =<br>> COMPILER_NAME = GCC<br>> COMPILER_VERSION =<br>
> CC_VER = 3.4 [requires at least 3.2]<br>> ZIP_VER = 2.3 [requires at least 2.2]<br>> UNZIP_VER = 5.51 [requires at least 5.12]<br>> ANT_VER = 1.7 [requires at least 1.6.3]<br>> FINDBUGS_VER = 1.3 [requires at least 1.1]<br>
> TEMPDIR = /home/dli/openjdk7/build/linux-i586/tmp<br>><br>> Build Directives:<br>> OPENJDK =<br>> USE_HOTSPOT_INTERPRETER_MODE =<br>> PEDANTIC =<br>> DEV_ONLY = true<br>> NO_DOCS =<br>
> NO_IMAGES =<br>> TOOLS_ONLY =<br>> INSANE = true<br>> COMPILE_APPROACH = parallel<br>> PARALLEL_COMPILE_JOBS = 2<br>> ALT_PARALLEL_COMPILE_JOBS =<br>> FASTDEBUG =<br>> COMPILER_WARNINGS_FATAL = false<br>
> COMPILER_WARNING_LEVEL =<br>> INCREMENTAL_BUILD = false<br>> CC_HIGHEST_OPT = -O3<br>> CC_HIGHER_OPT = -O3<br>> CC_LOWER_OPT = -O2<br>> CXXFLAGS = -O2 -fPIC -DCC_NOEX -W -Wall -Wno-unused<br>
> -Wno-parentheses -fno-omit-frame-pointer -D_LITTLE_ENDIAN<br>> CFLAGS = -O2 -fno-strict-aliasing -fPIC -W -Wall -Wno-unused<br>> -Wno-parentheses -fno-omit-frame-pointer -D_LITTLE_ENDIAN<br>> BOOT_JAVA_CMD = /home/dli/jdk1.6.0_03/bin/java -client -Xmx344m<br>
> -Xms128m -XX:PermSize=32m -XX:MaxPermSize=160m<br>> BOOT_JAVAC_CMD = /home/dli/jdk1.6.0_03/bin/javac<br>> -J-XX:ThreadStackSize=768 -J-client -J-Xmx344m -J-Xms128m<br>> -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -encoding ascii<br>
> BOOT_JAR_CMD = /home/dli/jdk1.6.0_03/bin/jar<br>> BOOT_JARSIGNER_CMD = /home/dli/jdk1.6.0_03/bin/jarsigner<br>> JAVAC_CMD = /home/dli/jdk1.6.0_03/bin/javac -J-XX:ThreadStackSize=768<br>> -J-client -J-Xmx344m -J-Xms128m -J-XX:PermSize=32m<br>
> -J-XX:MaxPermSize=160m -source 1.5 -target 5 -encoding ascii<br>> -Xbootclasspath:/home/dli/openjdk7/build/linux-i586/classes<br>> JAVAH_CMD = /home/dli/jdk1.6.0_03/bin/javah -bootclasspath<br>> /home/dli/openjdk7/build/linux-i586/classes<br>
> JAVADOC_CMD = /home/dli/jdk1.6.0_03/bin/javadoc -J-client -J-Xmx344m<br>> -J-Xms128m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m<br>><br>> Build Platform Settings:<br>> USER = dli<br>> PLATFORM = linux<br>
> ARCH = i586<br>> LIBARCH = i386<br>> ARCH_FAMILY = i586<br>> ARCH_DATA_MODEL = 32<br>> ARCHPROP = i386<br>> LINUX_VERSION = 3 (Heidelberg)<br>> ALSA_VERSION = 1.0.6<br>> OS_VERSION = 2.6.17 [requires at least 2.4.9-e.3]<br>
> OS_NAME = linux<br>> TEMP_FREE_SPACE = 2507836<br>> FREE_SPACE = 2507836<br>> MB_OF_MEMORY = 472<br>><br>> GNU Make Settings:<br>> MAKE = make<br>> MAKE_VER = 3.80 [requires at least 3.78]<br>
> MAKECMDGOALS = sanity<br>> MAKEFLAGS = w<br>> SHELL = /bin/sh<br>><br>> Target Build Versions:<br>> JDK_VERSION = 1.7.0<br>> MILESTONE = Frame-Pointer<br>> RELEASE = 1.7.0-Frame-Pointer<br>
> FULL_VERSION = 1.7.0-Frame-Pointer-Dli<br>> BUILD_NUMBER = Dli<br>><br>> External File/Binary Locations:<br>> USRJDKINSTANCES_PATH = /opt/java<br>> BUILD_JDK_IMPORT_PATH = /NOT-SET/re/jdk/1.7.0/promoted/latest/binaries<br>
> ALT_BUILD_JDK_IMPORT_PATH =<br>> JDK_IMPORT_PATH = /home/dli/jdk1.6.0_03<br>> ALT_JDK_IMPORT_PATH = /home/dli/jdk1.6.0_03<br>> LANGTOOLS_DIST =<br>> ALT_LANGTOOLS_DIST =<br>> CORBA_DIST = /home/dli/openjdk7/build/linux-i586/corba/dist<br>
> ALT_CORBA_DIST = /home/dli/openjdk7/build/linux-i586/corba/dist<br>> JAXP_DIST = /home/dli/openjdk7/build/linux-i586/jaxp/dist<br>> ALT_JAXP_DIST = /home/dli/openjdk7/build/linux-i586/jaxp/dist<br>> JAXWS_DIST = /home/dli/openjdk7/build/linux-i586/jaxws/dist<br>
> ALT_JAXWS_DIST = /home/dli/openjdk7/build/linux-i586/jaxws/dist<br>> HOTSPOT_DOCS_IMPORT_PATH = /NO_DOCS_DIR<br>> ALT_HOTSPOT_DOCS_IMPORT_PATH =<br>> HOTSPOT_IMPORT_PATH = /home/dli/openjdk7/build/linux-i586/hotspot/import<br>
> ALT_HOTSPOT_IMPORT_PATH =<br>> /home/dli/openjdk7/build/linux-i586/hotspot/import<br>> HOTSPOT_CLIENT_PATH =<br>> /home/dli/openjdk7/build/linux-i586/hotspot/import/jre/lib/i386/client<br>> ALT_HOTSPOT_CLIENT_PATH =<br>
> HOTSPOT_SERVER_PATH =<br>> /home/dli/openjdk7/build/linux-i586/hotspot/import/jre/lib/i386/server<br>> ALT_HOTSPOT_SERVER_PATH =<br>> CACERTS_FILE = /home/dli/openjdk7/jdk/src/share/lib/security/cacerts<br>
> ALT_CACERTS_FILE =<br>> MOZILLA_HEADERS_PATH = /home/dli/openjdk7/share/plugin<br>> ALT_MOZILLA_HEADERS_PATH = /home/dli/openjdk7/share/plugin<br>> CUPS_HEADERS_PATH = /usr/include<br>> ALT_CUPS_HEADERS_PATH =<br>
><br>> OPENJDK Export Binary Plug Settings:<br>> PLUG_EXPORT_DIRNAME =<br>> PLUG_LIBRARY_NAMES =<br>><br>><br>> WARNING: You are building in 'INSANE' mode. You<br>> should not use this mode, and in fact,<br>
> it may be removed at any time. If you<br>> have build problems as a result of using<br>> INSANE mode, then you should not expect<br>> assistance from anyone with the problems<br>
> or consequences you experience.<br>><br>> WARNING: You are not building the LANGTOOLS sources.<br>> Lang tools (javac) will be obtained from<br>> the location set in ALT_JDK_IMPORT_PATH.<br>
><br>> WARNING: You are not building the INSTALL sources.<br>> This will result in a development-only<br>> build of the JDK, lacking the installation bundles<br>><br>> WARNING: Your build environment has the variable DEV_ONLY<br>
> defined. This will result in a development-only<br>> build of the JDK, lacking the documentation<br>> build and installation bundles.<br>><br>> WARNING: You are building in 'INSANE' mode. You<br>
> should not use this mode, and in fact,<br>> it may be removed at any time. If you<br>> have build problems as a result of using<br>> INSANE mode, then you should not expect<br>
> assistance from anyone with the problems<br>> or consequences you experience.<br>><br>> WARNING: This machine appears to only have 472Mb of physical memory,<br>> builds on this machine could be slow.<br>
><br>> WARNING: The official linux builds use OS version 2.4.9-e.3.<br>> You appear to be using OS version 2.6.17.<br>><br>> WARNING: The build is being done on Linux 3 (Heidelberg).<br>> The official linux builds use Linux Advanced Server,<br>
> specifically Linux Advanced Server release 2.1AS.<br>> The version found was '2.6.17'.<br>><br>> WARNING: The linux compiler is not version 3.2<br>> Specifically the GCC compiler.<br>
> You appear to be using compiler version: 3.4<br>> The compiler was obtained from the following location:<br>> /usr/bin/<br>><br>> WARNING: You are building in 'INSANE' mode. You<br>
> should not use this mode, and in fact,<br>> it may be removed at any time. If you<br>> have build problems as a result of using<br>> INSANE mode, then you should not expect<br>
> assistance from anyone with the problems<br>> or consequences you experience.<br>><br>> WARNING: The BUILD_NUMBER needs to contain b[0-9][0-9]*. Currently<br>> BUILD_NUMBER=Dli.<br>> This has been known to cause build failures.<br>
><br>> WARNING: This machine appears to only have 472Mb of physical memory,<br>> builds on this machine could be slow.<br>><br>> WARNING: The official linux builds use OS version 2.4.9-e.3.<br>> You appear to be using OS version 2.6.17.<br>
><br>> WARNING: The build is being done on Linux 3 (Heidelberg).<br>> The official linux builds use Linux Advanced Server,<br>> specifically Linux Advanced Server release 2.1AS.<br>> The version found was '2.6.17'.<br>
><br>> WARNING: The linux compiler is not version 3.2<br>> Specifically the GCC compiler.<br>> You appear to be using compiler version: 3.4<br>> The compiler was obtained from the following location:<br>
> /usr/bin/<br>><br>> INSANE mode requested.<br>> Sanity will not force a build termination, even with errors.<br><br></blockquote></div><br><br clear="all"><br>-- <br>Addr: 1025N, 23rd str, APT 33,<br>
Lincoln, NE, 68503<br>Phone: (402)310-9826<br>WWW: <a href="http://cse.unl.edu/~fxian">cse.unl.edu/~fxian</a>