Solaris jdk9 build problem

Semyon Sadetsky semyon.sadetsky at oracle.com
Tue Jun 2 13:56:18 UTC 2015


On 6/2/2015 4:50 PM, Magnus Ihse Bursie wrote:
> On 2015-06-02 15:21, Semyon Sadetsky wrote:
>> Hello,
>>
>> Hate to disturb you again but I got yet another show stopper for my 
>> Solaris build:
>>
>> Generating solaris_amd64_docs/jvmti.html
>> Creating libverify.so from 2 file(s)
>> Creating libjava.so from 60 file(s)
>> Creating libfdlibm.a from 62 file(s)
>> Creating libzip.so from 21 file(s)
>> Creating libjli.so from 15 file(s)
>> Creating libnet.so from 21 file(s)
>> Creating libnio.so from 23 file(s)
>> Compiling 3 properties into resource bundles for jdk.jdi
>> Compiling 246 files for jdk.jdi
>> "/jdk9/client/jdk/src/java.base/unix/native/libjava/childproc.c", 
>> line 384: error: statement not reached (E_STATEMENT_NOT_REACHED)
>> cc: acomp failed for 
>> /jdk9/client/jdk/src/java.base/unix/native/libjava/childproc.c
>> gmake[3]: *** 
>> [/jdk9/client/build/solaris-x86_64-normal-server-fastdebug/support/native/java.base/libjava/childproc.o] 
>> Error 2
>> gmake[3]: *** Waiting for unfinished jobs....
>> gmake[2]: *** [java.base-libs] Error 1
>
> I belive the rest of the log says: "please try again with 
> --disable-warnings-as-errors" or something like that.
>
> Do it! :)
>
> An even better solution is to investigate the warning and fix the code.
>
> I can't really say why you're getting this warning, though. Your 
> version of the compiler might differ too much from the official ones.
>
> /Magnus

Okay.
What is the official one? I used Solaris studio 12.3 it has compiler 
version 5.10 which was recommended in the docs.

--Semyon

>
>>
>> --Semyon
>>
>>
>>
>> On 6/2/2015 1:40 PM, Semyon Sadetsky wrote:
>>>
>>> On 6/2/2015 1:33 PM, Magnus Ihse Bursie wrote:
>>>> On 2015-06-02 12:22, David Holmes wrote:
>>>>> On 2/06/2015 8:12 PM, Semyon Sadetsky wrote:
>>>>>>
>>>>>> On 6/2/2015 1:06 PM, Magnus Ihse Bursie wrote:
>>>>>>> On 2015-06-02 11:25, Semyon Sadetsky wrote:
>>>>>>>>
>>>>>>>> On 6/2/2015 11:47 AM, Magnus Ihse Bursie wrote:
>>>>>>>>> On 2015-06-02 08:20, Semyon Sadetsky wrote:
>>>>>>>>>> On 6/2/2015 2:35 AM, Magnus Ihse Bursie wrote:
>>>>>>>>>>> On 2015-06-01 21:17, Semyon Sadetsky wrote:
>>>>>>>>>>>> Hello,
>>>>>>>>>>>>
>>>>>>>>>>>> Could you help me to resolve 9 build problem on Solaris 11.2:
>>>>>>>>>>>>
>>>>>>>>>>>> /usr/ccs/bin/nm: solaris_x86_64.o: No such file or directory
>>>>>>>>>>>> gmake[8]: *** [libjvm.so] Error 1
>>>>>>>>>>>> gmake[8]: Leaving directory
>>>>>>>>>>>> `/jdk9/client/build/solaris-x86_64-normal-server-fastdebug/hotspot/solaris_amd64_compiler2/fastdebug' 
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> gmake[7]: *** [the_vm] Error 2
>>>>>>>>>>>> gmake[7]: Leaving directory
>>>>>>>>>>>> `/jdk9/client/build/solaris-x86_64-normal-server-fastdebug/hotspot/solaris_amd64_compiler2/fastdebug' 
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> and earlier in the log:
>>>>>>>>>>>>
>>>>>>>>>>>> Assembling
>>>>>>>>>>>> /jdk9/client/hotspot/src/os_cpu/solaris_x86/vm/solaris_x86_64.s 
>>>>>>>>>>>>
>>>>>>>>>>>> rm -f solaris_x86_64.o
>>>>>>>>>>>> xarch=amd64 -o solaris_x86_64.o
>>>>>>>>>>>> /jdk9/client/hotspot/src/os_cpu/solaris_x86/vm/solaris_x86_64.s 
>>>>>>>>>>>>
>>>>>>>>>>>> /usr/bin/bash: -o: command not found
>>>>>>>>>>>> gmake[8]: [solaris_x86_64.o] Error 127 (ignored)
>>>>>>>>>>>> Compiling 
>>>>>>>>>>>> /jdk9/client/hotspot/src/share/vm/gc/shared/space.cpp
>>>>>>>>>>>> rm -f space.o
>>>>>>>>>>>> /opt/solarisstudio12.3/bin/CC -DSOLARIS -DSPARC_WORKS -
>>>>>>>>>>>> ...
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> I guess there should be cc before xarch, but it's omited.
>>>>>>>>>>> I'm guessing that .s is an assembly file, so most likely it is
>>>>>>>>>>> $(AS) that resolves to empty. Can you check your spec.gmk 
>>>>>>>>>>> for the
>>>>>>>>>>> value of AS?
>>>>>>>>>>>
>>>>>>>>>>> /Magnus
>>>>>>>>>>>
>>>>>>>>>> Yes, AS was empty.
>>>>>>>>>> after I set it to /opt/solarisstudio12.3/bin/cc the first error
>>>>>>>>>> message has gone but then I got:
>>>>>>>>> You cannot set it manually. If configure has failed to detect it,
>>>>>>>>> all bets are off. I'm a bit surprised that configure allowed 
>>>>>>>>> AS to
>>>>>>>>> be empty, it should have aborted.
>>>>>>>>>
>>>>>>>>> Try running configure with
>>>>>>>>> --with-toolchain-path=/opt/solarisstudio12.3/bin. Does that 
>>>>>>>>> help you
>>>>>>>>> get a proper value of AS.
>>>>>>>>>
>>>>>>>>> /Magnus
>>>>>>>>
>>>>>>>> AS remains empty:
>>>>>>>> ====================================================
>>>>>>>> A new configuration has been successfully created in
>>>>>>>> /jdk9/client/build/solaris-x86_64-normal-server-fastdebug
>>>>>>>> using configure arguments '--enable-debug
>>>>>>>> --with-toolchain-path=/opt/solarisstudio12.3/bin'.
>>>>>>>>
>>>>>>>> Configuration summary:
>>>>>>>> * Debug level:    fastdebug
>>>>>>>> * HS debug level: fastdebug
>>>>>>>> * JDK variant:    normal
>>>>>>>> * JVM variants:   server
>>>>>>>> * OpenJDK target: OS: solaris, CPU architecture: x86, address 
>>>>>>>> length: 64
>>>>>>>>
>>>>>>>> Tools summary:
>>>>>>>> * Boot JDK:       java version "1.8.0_45" Java(TM) SE Runtime
>>>>>>>> Environment (build 1.8.0_45-b14) Java HotSpot(TM) 64-Bit Server VM
>>>>>>>> (build 25.45-b02, mixed mode)  (at /usr/jdk/instances/jdk1.8.0_45)
>>>>>>>> * Toolchain:      solstudio (Oracle Solaris Studio)
>>>>>>>> * C Compiler:     Version 5.12 (at /opt/solarisstudio12.3/bin/cc)
>>>>>>>> * C++ Compiler:   Version 5.12 (at /opt/solarisstudio12.3/bin/CC)
>>>>>>>>
>>>>>>>> Build performance summary:
>>>>>>>> * Cores to use:   2
>>>>>>>> * Memory limit:   2048 MB
>>>>>>>>
>>>>>>>> dev at solaris1:/jdk9/client$ grep "AS:"
>>>>>>>> /jdk9/client/build/solaris-x86_64-normal-server-fastdebug/spec.gmk
>>>>>>>> AS:=
>>>>>>>
>>>>>>> Do you have an as in your path or in /opt/solarisstudio12.3/bin 
>>>>>>> then?
>>>>>>> Have you even built jdk successfully on this machine?
>>>>>>>
>>>>>>> /Magnus
>>>>>>>
>>>>>> No it's a new installation. And I'm building jdk on Solaris for the
>>>>>> first time.
>>>>>> as is absent in  /opt/solarisstudio12.3/bin.
>>>>>>
>>>>>> dev at solaris1:/jdk9/client$ ls /opt/solstudio12.2/bin
>>>>>> CC              cscope          er_bit          f90 
>>>>>> rtc_patch_area  sunf90
>>>>>> CCadmin         ctc             er_cp           f95 
>>>>>> rxm             sunf95
>>>>>> amd64           ctcr            er_export       fbe rxs sunstudio
>>>>>> analyzer        ctrace          er_generic      fdumpmod smctl tcov
>>>>>> bcheck          cxref           er_html         fpp 
>>>>>> solstudio       tha
>>>>>> binopt          dbx             er_kernel       fpr 
>>>>>> spot            uncover
>>>>>> c++filt         dbxtool         er_mpipp        fsplit spot_diff 
>>>>>> version
>>>>>> c89             dem             er_mv gen_custom
>>>>>> ss_attach       whatdir
>>>>>> c99             discover        er_otfdump      getmsg sunCC 
>>>>>> xprof_atob
>>>>>> cb              dlight          er_print        indent sunas 
>>>>>> xprof_btoa
>>>>>> cc              dmake           er_rm           lint sunc89
>>>>>> cc-5.0          dumpstabs       er_src lock_lint sunc99
>>>>>> cflow           dwarfdump       er_vtunify      ptclean suncc
>>>>>> collect         er_archive      f77             ripc sunf77
>>>>>>
>>>>>> Should it be there?
>>>>>
>>>>> No it is in a separate package apparently (not installed by 
>>>>> default on Solaris 11):
>>>>>
>>>>> pkg install pkg:/developer/assembler
>>>>
>>>> Thanks for the information David!
>>>>
>>>> I opened https://bugs.openjdk.java.net/browse/JDK-8081676 to track 
>>>> that we should verify that AS is properly detected on Solaris, and 
>>>> to print the help about pkg install in case as is missing.
>>>>
>>>> /Magnus
>>>>
>>> Possible it would be worth to add this information to the readme as 
>>> well. On other linuxes gcc is used instead of as and configure does 
>>> not produce any warnings about it. It is not trivial to find the 
>>> reason for people building solaris jdk for the first time.
>>>
>>> --Semyon
>>>
>>>>>
>>>>> David
>>>>> -----
>>>>>
>>>>>>
>>>>>>
>>>>>>>> dev at solaris1:/jdk9/client$
>>>>>>>>
>>>>>>>>
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> cc: Warning: -xarch=amd64 is deprecated, use -m64 to create 
>>>>>>>>>> 64-bit
>>>>>>>>>> programs
>>>>>>>>>> ld: fatal: file solaris_x86_64.o: not an ELF object
>>>>>>>>>> gmake[8]: *** [solaris_x86_64.o] Error 2
>>>>>>>>>> gmake[8]: *** Waiting for unfinished jobs....
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>>
>>
>




More information about the build-dev mailing list