Bug 272013

Summary: www/node16: fix build with clang 16
Product: Ports & Packages Reporter: Dimitry Andric <dim>
Component: Individual Port(s)Assignee: Juraj Lutter <otis>
Status: Closed FIXED    
Severity: Affects Some People CC: dave, eduardo
Priority: --- Flags: bugzilla: maintainer-feedback? (otis)
Version: Latest   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272645
Bug Depends on:    
Bug Blocks: 271047    
Attachments:
Description Flags
www/node16: fix build with clang 16 none

Description Dimitry Andric freebsd_committer freebsd_triage 2023-06-15 16:25:56 UTC
Clang 16 has a new error about integer values being outside the valid
range for enum types, which shows up when building www/node16:

  ../deps/v8/src/base/bit-field.h:43:29: error: integer value 7 is outside the valid range of values [0, 3] for this enumeration type [-Wenum-constexpr-conversion]
    static constexpr T kMax = static_cast<T>(kNumValues - 1);
                              ^

Upstream fixed most of these errors in
<https://chromium.googlesource.com/v8/v8.git/+/d15d49b09d>, so add a
backported version of it, with a few additions, to fix them.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2023-06-15 16:26:20 UTC
Created attachment 242793 [details]
www/node16: fix build with clang 16
Comment 2 Juraj Lutter freebsd_committer freebsd_triage 2023-07-06 17:45:04 UTC
This has been fixed in commit ee3e6d5a17a0c78bb56f8d5719de82b8dd49950d (although by different approach).
Comment 3 Dimitry Andric freebsd_committer freebsd_triage 2023-07-06 17:50:59 UTC
Fine for now, at some point the option to suppress these errors is going to go away upstream, then we can look at it again.
Comment 4 Nuno Teixeira freebsd_committer freebsd_triage 2023-07-17 08:38:49 UTC
Same issue with node 18.16.1 but it fails on aarch64 but amd64 builds fine.

https://people.freebsd.org/~eduardo/logs/node18/node18-18.16.1.log

I've tested ee3e6d5a17a0c78bb56f8d5719de82b8dd49950d and it builds ok on aarch64.

Any clues?