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

gcc 14.2.0 breaks the build of Node-20.9.0 #56516

Open
ddwolf opened this issue Jan 8, 2025 · 1 comment
Open

gcc 14.2.0 breaks the build of Node-20.9.0 #56516

ddwolf opened this issue Jan 8, 2025 · 1 comment

Comments

@ddwolf
Copy link

ddwolf commented Jan 8, 2025

Version

Node.js v20.9.0

Platform

$ uname -a
Linux kp920 6.11.0-13-generic #14-Ubuntu SMP PREEMPT_DYNAMIC Sun Dec  1 00:22:04 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux

Subsystem

No response

What steps will reproduce the bug?

  1. Ensure gcc14.2 was installed
  2. build node-20.9.0 using standard method:
./configure --prefix=/usr/local/node-v20.9.0
make -j 64

How often does it reproduce? Is there a required condition?

It fails everytime. Only need GCC 14.2.0

What is the expected behavior? Why is that the expected behavior?

The build process should not fail.

What do you see instead?

In file included from ../deps/v8/src/heap/cppgc/process-heap-statistics.h:9,
                 from ../deps/v8/src/heap/cppgc/process-heap-statistics.cc:5:
../deps/v8/src/heap/cppgc/stats-collector.h: In member function ‘void cppgc::internal::StatsCollector::ForAllAllocationObservers(Callback)’:
../deps/v8/src/heap/cppgc/stats-collector.h:401:48: error: cannot convert ‘std::vector<cppgc::internal::StatsCollector::AllocationObserver*>::iterator’ to ‘const char*’
  401 |         std::remove(allocation_observers_.begin(), allocation_observers_.end(),
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
      |                                                |
      |                                                std::vector<cppgc::internal::StatsCollector::AllocationObserver*>::iterator

Additional information

Solution

using method suggested from this question

  • Either include <algorithm> in the header file deps/v8/src/heap/cppgc/stats-collector.h
  • Or build using gcc13: PATH=/usr/local/Python-3.11.0/bin:/usr/local/gcc-13.2.0/bin:$PATH make -j 64
@richardlau
Copy link
Member

  • Either include <algorithm> in the header file deps/v8/src/heap/cppgc/stats-collector.h

For Node.js 20, this was fixed in 20.10.0 by 4b243b5.

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

2 participants