Opened 2 years ago

Closed 2 years ago

#64902 closed defect (fixed)

openjdk11 @11.0.14.1_1: error: use of undeclared identifier 'assert'

Reported by: dbl001 (dbl) Owned by: breun (Nils Breunese)
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: Cc: usersxx
Port: openjdk11

Description

I am getting this error: error: use of undeclared identifier 'assert' on port openjdk11 on OS X 12.3

% xcrun --show-sdk-path
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk

Excerpt from main.log:

In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_java_openjdk11/openjdk11/work/openjdk11-11.0.14.1/test/hotspot/gtest/jfr/test_networkUtilization.cpp:223:
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_java_openjdk11/openjdk11/work/openjdk11-11.0.14.1/src/hotspot/share/jfr/periodic/jfrNetworkUtilization.cpp:146:3: error: use of undeclared identifier 'assert'
:info:build   assert(_interfaces != NULL, "invariant");
:info:build   ^
:info:build 14 errors generated.
:q

Attachments (1)

main.log (131.7 KB) - added by dbl001 (dbl) 2 years ago.

Download all attachments as: .zip

Change History (12)

Changed 2 years ago by dbl001 (dbl)

Attachment: main.log added

comment:1 Changed 2 years ago by jmroot (Joshua Root)

Keywords: openjdk removed
Owner: set to breun
Status: newassigned
Summary: error: use of undeclared identifier 'assert'openjdk11 @11.0.14.1_1: error: use of undeclared identifier 'assert'

comment:2 Changed 2 years ago by usersxx

Cc: usersxx added

comment:3 in reply to:  1 Changed 2 years ago by usersxx

Replying to jmroot: jmroot, I am the maintainer since commit bd5d680

comment:4 Changed 2 years ago by usersxx

Cc: usersxx removed

comment:5 Changed 2 years ago by usersxx

Cc: usersxx added

comment:6 Changed 2 years ago by usersxx

I don't have a system with MacOS 12.3 installed but after checking the source code, The build system chooses assert.h file even if "#include <assert.h>" or "#include <cassert>" isn't included. Have you tried using trace mode by using sudo port -t install openjdk11?

Last edited 2 years ago by usersxx (previous) (diff)

comment:7 Changed 2 years ago by dbl001 (dbl)

I ran openjdk11 again and it worked. I assumed you made some changes. Do you still want me to try trace mode?

comment:8 Changed 2 years ago by usersxx

I don't think there is a need to use trace mode because the port install properly.

comment:9 in reply to:  7 Changed 2 years ago by dlamija (Muhammed Ramiza)

Replying to dbl001:

I ran openjdk11 again and it worked. I assumed you made some changes. Do you still want me to try trace mode?

i've the same issue but found unmatched asset.h with
error: too many arguments provided to function-like macro invocation

In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_macports_macports-ports_java_openjdk11/openjdk11/work/openjdk11-11.0.14.1/test/hotspot/gtest/jfr/test_networkUtilization.cpp:223:
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_macports_macports-ports_java_openjdk11/openjdk11/work/openjdk11-11.0.14.1/src/hotspot/share/jfr/periodic/jfrNetworkUtilization.cpp:58:25: error: too many arguments provided to function-like macro invocation
:info:build   assert(iface != NULL, "invariant");
:info:build                         ^
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/assert.h:98:9: note: macro 'assert' defined here
:info:build #define assert(e) \

comment:10 Changed 2 years ago by usersxx

Last edited 2 years ago by usersxx (previous) (diff)

comment:11 Changed 2 years ago by usersxx <97012123+usersxx@…>

Resolution: fixed
Status: assignedclosed

In 2e53cce8f2c55ef9cdd4397af889b1aba3c656cb/macports-ports (master):

openjdk11: make build more specific

Fixes: #64902

Note: See TracTickets for help on using tickets.