-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
node 18.20.0 build failure #52230
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
I presume that will be related to one of the V8 commits in https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V18.md#commits. |
I also got the same error to build 16.20.1 version on macOS today. Any solution about it? Thanks. |
it is not happening for all node 18.20.0 builds, so I think it might be also xcode sdk related. |
I'm also seeing in MacPorts' upgrade of the nodes18 port:
This is with
|
One workaround is adding |
Relevant commit to backport might be v8/v8@d15d49b |
Original commit message: Make bitfields only as wide as necessary for enums clang now complains when a BitField for an enum is too wide. We could suppress this, but it seems kind of useful from an uninformed distance, so I made a few bitfields smaller instead. (For AddressingMode, since its size is target-dependent, I added an explicit underlying type to the enum instead, which suppresses the diag on a per-enum basis.) This is without any understanding of the code I'm touching. Especially the change in v8-internal.h feels a bit risky to me. Bug: chromium:1348574 Change-Id: I73395de593045036b72dadf4e3147b5f7e13c958 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3794708 Commit-Queue: Nico Weber <thakis@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Hannes Payer <hpayer@chromium.org> Auto-Submit: Nico Weber <thakis@chromium.org> Cr-Commit-Position: refs/heads/main@{#82109} Refs: v8/v8@d15d49b PR-URL: #52337 Fixes: #52230 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
This should be fixed in Node.js 18.20.3. |
Thank you. I want to leave a little help here for those who come after. The specific modification location is https://github.com/nodejs/node/blob/v14.21.3/common.gypi#L498 ['OS=="mac"', {
'defines': ['_DARWIN_USE_64_BIT_INODE=1'],
'xcode_settings': {
'ALWAYS_SEARCH_USER_PATHS': 'NO',
'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
# (Equivalent to -fPIC)
'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
'PREBINDING': 'NO', # No -Wl,-prebind
'MACOSX_DEPLOYMENT_TARGET': '10.13', # -mmacosx-version-min=10.13
'USE_HEADERMAP': 'NO',
'OTHER_CFLAGS': [
'-fno-strict-aliasing',
],
'WARNING_CFLAGS': [
'-Wall',
'-Wendif-labels',
'-W',
'-Wno-unused-parameter',
+ '-Wno-enum-constexpr-conversion',
],
}, then ./configure --prefix=your install dir
make -j 7 # your cores
make install reference |
That compiler option is planned to be removed in the next version of LLVM Clang so I strongly recommend planning to update to at least 18.20.3 when possible. For 16.x and earlier you may need to patch v8 in the future. The patch from 18.x is a good starting point but it may need modifying to be correct on earlier versions (please always check |
While trying to upgrade node@18 to 18.20.0, but run into some build issue. The error log is as below:
error build log
full build log, https://github.com/Homebrew/homebrew-core/actions/runs/8443780973/job/23130539115
relates to Homebrew/homebrew-core#167236
The text was updated successfully, but these errors were encountered: