Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenJDK 7 build fails on OS X #51

Closed
adamretter opened this issue Jul 20, 2016 · 7 comments
Closed

OpenJDK 7 build fails on OS X #51

adamretter opened this issue Jul 20, 2016 · 7 comments

Comments

@adamretter
Copy link

I am following the instructions https://github.com/hgomez/obuildfactory/wiki/Building-and-Packaging-OpenJDK7-for-OSX

My system is OS X El Capitain, Version 10.11.5 (15F34).

$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

When I run XBUILD=true ./obuildfactory/openjdk7/macosx/standalone-job.sh then I eventually end up with this error output:

llvm-g++ -D_ALLBSD_SOURCE -D_GNU_SOURCE -DAMD64 -I/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm/prims -I/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm -I/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm/precompiled -I/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/cpu/x86/vm -I/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/os_cpu/bsd_x86/vm -I/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/os/bsd/vm -I/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/os/posix/vm -I/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm/adlc -I../generated -DASSERT -fsanitize=address -fno-omit-frame-pointer -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1  -fno-rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1  -fno-rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -Werror -g -c -o ../generated/adfiles/forms.o /Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm/adlc/forms.cpp 
llvm-g++ -D_ALLBSD_SOURCE -D_GNU_SOURCE -DAMD64 -I/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm/prims -I/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm -I/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm/precompiled -I/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/cpu/x86/vm -I/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/os_cpu/bsd_x86/vm -I/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/os/bsd/vm -I/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/os/posix/vm -I/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm/adlc -I../generated -DASSERT -fsanitize=address -fno-omit-frame-pointer -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1  -fno-rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1  -fno-rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -Werror -g -c -o ../generated/adfiles/formsopt.o /Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm/adlc/formsopt.cpp 
/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm/adlc/filebuff.cpp:109:8: error: 'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to
      true [-Werror,-Wundefined-bool-conversion]
  if( !this ) return NULL;      // The empty buffer region
      ~^~~~
/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm/adlc/filebuff.cpp:122:8: error: 'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to
      true [-Werror,-Wundefined-bool-conversion]
  if( !this ) return br;        // Merging into nothing
      ~^~~~
/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm/adlc/archDesc.cpp:335:35: error: '&&' within '||' [-Werror,-Wlogical-op-parentheses]
    if ( instr->is_ideal_branch() && instr->label_position() == -1 ||
         ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~
/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm/adlc/filebuff.cpp:228:8: error: reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be
      assumed to always evaluate to false [-Werror,-Wtautological-undefined-compare]
  if( &br == NULL ) return os;  // The empty buffer region
       ^~    ~~~~
/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm/adlc/filebuff.cpp:244:8: error: 'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to
      true [-Werror,-Wundefined-bool-conversion]
  if( !this ) return;           // Nothing to print
      ~^~~~
/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm/adlc/archDesc.cpp:335:35: note: place parentheses around the '&&' expression to silence this warning
    if ( instr->is_ideal_branch() && instr->label_position() == -1 ||
                                  ^
         (                                                        )
/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm/adlc/archDesc.cpp:336:35: error: '&&' within '||' [-Werror,-Wlogical-op-parentheses]
        !instr->is_ideal_branch() && instr->label_position() != -1) {
        ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm/adlc/archDesc.cpp:336:35: note: place parentheses around the '&&' expression to silence this warning
        !instr->is_ideal_branch() && instr->label_position() != -1) {
                                  ^
        (                                                         )
4 errors generated.
2 errors generated.
make[8]: *** [../generated/adfiles/filebuff.o] Error 1
make[8]: *** Waiting for unfinished jobs....
make[8]: *** [../generated/adfiles/archDesc.o] Error 1
/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm/adlc/adlparse.cpp:3217:71: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
    if ( ((primary = get_ident_or_literal_constant("primary opcode")) == NULL) ) {
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm/adlc/adlparse.cpp:3217:71: note: remove extraneous parentheses around the comparison to silence this warning
    if ( ((primary = get_ident_or_literal_constant("primary opcode")) == NULL) ) {
         ~                                                            ^      ~
/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm/adlc/adlparse.cpp:3217:71: note: use '=' to turn this equality comparison into an assignment
    if ( ((primary = get_ident_or_literal_constant("primary opcode")) == NULL) ) {
                                                                      ^~
                                                                      =
/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm/adlc/adlparse.cpp:3226:77: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
      if ( ((secondary = get_ident_or_literal_constant("secondary opcode")) == NULL) ) {
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm/adlc/adlparse.cpp:3226:77: note: remove extraneous parentheses around the comparison to silence this warning
      if ( ((secondary = get_ident_or_literal_constant("secondary opcode")) == NULL) ) {
           ~                                                                ^      ~
/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm/adlc/adlparse.cpp:3226:77: note: use '=' to turn this equality comparison into an assignment
      if ( ((secondary = get_ident_or_literal_constant("secondary opcode")) == NULL) ) {
                                                                            ^~
                                                                            =
/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm/adlc/adlparse.cpp:3235:77: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
        if ( ((tertiary = get_ident_or_literal_constant("tertiary opcode")) == NULL) ) {
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm/adlc/adlparse.cpp:3235:77: note: remove extraneous parentheses around the comparison to silence this warning
        if ( ((tertiary = get_ident_or_literal_constant("tertiary opcode")) == NULL) ) {
             ~                                                              ^      ~
/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm/adlc/adlparse.cpp:3235:77: note: use '=' to turn this equality comparison into an assignment
        if ( ((tertiary = get_ident_or_literal_constant("tertiary opcode")) == NULL) ) {
                                                                            ^~
                                                                            =
/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm/adlc/adlparse.cpp:4476:21: error: '&&' within '||' [-Werror,-Wlogical-op-parentheses]
  while ((c >= '0') && (c <= '9')
         ~~~~~~~~~~~^~~~~~~~~~~~~
/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm/adlc/adlparse.cpp:4476:21: note: place parentheses around the '&&' expression to silence this warning
  while ((c >= '0') && (c <= '9')
                    ^
         (                       )
/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm/adlc/adlparse.cpp:4515:17: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
    if( (second == '=') ) {
         ~~~~~~~^~~~~~
/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm/adlc/adlparse.cpp:4515:17: note: remove extraneous parentheses around the comparison to silence this warning
    if( (second == '=') ) {
        ~       ^     ~
/Users/aretter/code/openjdkathome/sources/openjdk7/hotspot/src/share/vm/adlc/adlparse.cpp:4515:17: note: use '=' to turn this equality comparison into an assignment
    if( (second == '=') ) {
                ^~
                =
5 errors generated.
make[8]: *** [../generated/adfiles/adlparse.o] Error 1
make[7]: *** [ad_stuff] Error 2
make[6]: *** [product] Error 2
make[5]: *** [generic_build2] Error 2
make[4]: *** [product] Error 2
make[3]: *** [all_product_universal] Error 2
make[2]: *** [universal_product] Error 2
make[1]: *** [hotspot-build] Error 2
make: *** [build_product_image] Error 2
@adamretter adamretter changed the title OpenJDK 7 build fails on OSX OpenJDK 7 build fails on OS X Jul 20, 2016
@dreamingodd
Copy link

Did you fix them? I have the same error at

adlparse.cpp:3217:71

@adamretter
Copy link
Author

@dreamingodd Nope, I was hoping that someone would help

@hgomez
Copy link
Owner

hgomez commented Nov 24, 2016

Java 7 is not deprecated, so for OpenJDK 7, closing this one

@hgomez hgomez closed this as completed Nov 24, 2016
@lixuanbin
Copy link

Hey buddy, did you solve it as last?

@adamretter
Copy link
Author

@lixuanbin Nope.

@johnwatsondev
Copy link

@adamretter @lixuanbin Please execute this command export COMPILER_WARNINGS_FATAL=false before make build.

@lixuanbin
Copy link

done with ubuntu 16.04 server, inside virtualbox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants