Bug 272013 - www/node16: fix build with clang 16
Summary: www/node16: fix build with clang 16
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Juraj Lutter
URL:
Keywords:
Depends on:
Blocks: 271047
  Show dependency treegraph
 
Reported: 2023-06-15 16:25 UTC by Dimitry Andric
Modified: 2023-10-29 17:37 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (otis)


Attachments
www/node16: fix build with clang 16 (6.70 KB, patch)
2023-06-15 16:26 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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?