Skip to content

Fail to build against EL10 #604

@Vonng

Description

@Vonng

Describe the bug
Fail to build on el10, both x86_64 and aarch64. same workflow works on el8/el9.

To Reproduce
Just build on EL10 compatible OS like RockyLinux 10.0

Expected behavior
A clear and concise description of what you expected to happen.

Version Information:

  • PLV8 Version: [e.g. 3.2.4]
  • Postgres Version [e.g. 13-18]
  • Operating System and Version [e.g. Ubuntu 22.04, or MacOS 15.5]
  • Rocky Linux 10.0 (Red Quartz)
  • gcc (GCC) 14.2.1 20250110 (Red Hat 14.2.1-7)

Additional context

Problem one, can find the default g++ compiler, can be fixed by replace a line in Makefile

-       @cd deps/v8-cmake && mkdir -p build && cd build && cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -Denable-fPIC=ON -DCMAKE_BUILD_TYPE=Release ../ && make -j $(NUMPROC)
+       @cd deps/v8-cmake && mkdir -p build && cd build && cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -Denable-fPIC=ON -DCMAKE_BUILD_TYPE=Release ../ && make -j $(NUMPROC)

Problem two

make[3]: *** [CMakeFiles/v8_base_without_compiler.dir/build.make:3864: CMakeFiles/v8_base_without_compiler.dir/v8/src/heap/cppgc/stats-collector.cc.o] Error 1
In file included from /root/rpmbuild/BUILD/plv8-3.2.4/deps/v8-cmake/v8/src/heap/cppgc/sweeper.h:14,
                 from /root/rpmbuild/BUILD/plv8-3.2.4/deps/v8-cmake/v8/src/heap/cppgc/sweeper.cc:5:
/root/rpmbuild/BUILD/plv8-3.2.4/deps/v8-cmake/v8/src/heap/cppgc/stats-collector.h: In member function ‘void cppgc::internal::StatsCollector::ForAllAllocationObservers(Callback)’:
/root/rpmbuild/BUILD/plv8-3.2.4/deps/v8-cmake/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
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/istream:40,
                 from /usr/include/c++/14/sstream:40,
                 from /root/rpmbuild/BUILD/plv8-3.2.4/deps/v8-cmake/v8/src/base/logging.h:10,
                 from /root/rpmbuild/BUILD/plv8-3.2.4/deps/v8-cmake/v8/src/base/macros.h:12,
                 from /root/rpmbuild/BUILD/plv8-3.2.4/deps/v8-cmake/v8/src/heap/cppgc/sweeper.h:10:
/usr/include/stdio.h:158:32: note:   initializing argument 1 of ‘int remove(const char*)’
  158 | extern int remove (const char *__filename) __THROW;
      |                    ~~~~~~~~~~~~^~~~~~~~~~
/root/rpmbuild/BUILD/plv8-3.2.4/deps/v8-cmake/v8/src/heap/cppgc/sweeper.cc: In function ‘constexpr const char* cppgc::internal::{anonymous}::ToString(MutatorThreadSweepingMode)’:
/root/rpmbuild/BUILD/plv8-3.2.4/deps/v8-cmake/v8/src/heap/cppgc/sweeper.cc:62:1: warning: control reaches end of non-void function [-Wreturn-type]
   62 | }
      | ^
make[3]: *** [CMakeFiles/v8_base_without_compiler.dir/build.make:3878: CMakeFiles/v8_base_without_compiler.dir/v8/src/heap/cppgc/sweeper.cc.o] Error 1
In file included from /root/rpmbuild/BUILD/plv8-3.2.4/deps/v8-cmake/v8/src/heap/cppgc/trace-event.h:9,
                 from /root/rpmbuild/BUILD/plv8-3.2.4/deps/v8-cmake/v8/src/heap/cppgc/stats-collector.h:20,
                 from /root/rpmbuild/BUILD/plv8-3.2.4/deps/v8-cmake/v8/src/heap/cppgc/process-heap-statistics.h:9,
                 from /root/rpmbuild/BUILD/plv8-3.2.4/deps/v8-cmake/v8/src/heap/cppgc/heap-base.h:23,
                 from /root/rpmbuild/BUILD/plv8-3.2.4/deps/v8-cmake/v8/src/heap/cppgc-js/cpp-heap.h:20,
                 from /root/rpmbuild/BUILD/plv8-3.2.4/deps/v8-cmake/v8/src/heap/cppgc-js/cpp-marking-state.h:10,
                 from /root/rpmbuild/BUILD/plv8-3.2.4/deps/v8-cmake/v8/src/heap/marking-worklist.h:14,
                 from /root/rpmbuild/BUILD/plv8-3.2.4/deps/v8-cmake/v8/src/heap/marking-visitor.h:12:
In member function ‘v8::internal::tracing::ScopedTracer::~ScopedTracer()’,
    inlined from ‘v8::internal::ConcurrentMarking::RunMinor(v8::JobDelegate*)’ at /root/rpmbuild/BUILD/plv8-3.2.4/deps/v8-cmake/v8/src/heap/concurrent-marking.cc:504:7:
/root/rpmbuild/BUILD/plv8-3.2.4/deps/v8-cmake/v8/src/tracing/trace-event.h:569:30: warning: ‘trace_event_unique_tracer501.data_.category_group_enabled’ may be used uninitialized [-Wmaybe-uninitialized]
  569 |                        data_.category_group_enabled))) {
      |                        ~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/root/rpmbuild/BUILD/plv8-3.2.4/deps/v8-cmake/v8/src/heap/concurrent-marking.cc: In member function ‘v8::internal::ConcurrentMarking::RunMinor(v8::JobDelegate*)’:
/root/rpmbuild/BUILD/plv8-3.2.4/deps/v8-cmake/v8/src/tracing/trace-event.h:148:41: note: ‘trace_event_unique_tracer501’ declared here
  148 | #define INTERNAL_TRACE_EVENT_UID3(a, b) trace_event_unique_##a##b
      |                                         ^~~~~~~~~~~~~~~~~~~
In member function ‘v8::internal::tracing::ScopedTracer::~ScopedTracer()’,
    inlined from ‘v8::internal::ConcurrentMarking::RunMajor(v8::JobDelegate*, v8::base::EnumSet<v8::internal::CodeFlushMode, int>, unsigned int, bool)’ at /root/rpmbuild/BUILD/plv8-3.2.4/deps/v8-cmake/v8/src/heap/concurrent-marking.cc:400:7:
/root/rpmbuild/BUILD/plv8-3.2.4/deps/v8-cmake/v8/src/tracing/trace-event.h:569:30: warning: ‘trace_event_unique_tracer397.data_.category_group_enabled’ may be used uninitialized [-Wmaybe-uninitialized]
  569 |                        data_.category_group_enabled))) {
      |                        ~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/root/rpmbuild/BUILD/plv8-3.2.4/deps/v8-cmake/v8/src/heap/concurrent-marking.cc: In member function ‘v8::internal::ConcurrentMarking::RunMajor(v8::JobDelegate*, v8::base::EnumSet<v8::internal::CodeFlushMode, int>, unsigned int, bool)’:
/root/rpmbuild/BUILD/plv8-3.2.4/deps/v8-cmake/v8/src/tracing/trace-event.h:148:41: note: ‘trace_event_unique_tracer397’ declared here
  148 | #define INTERNAL_TRACE_EVENT_UID3(a, b) trace_event_unique_##a##b
      |                                         ^~~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/Makefile2:246: CMakeFiles/v8_base_without_compiler.dir/all] Error 2
make[1]: *** [Makefile:91: all] Error 2
make[1]: Leaving directory '/root/rpmbuild/BUILD/plv8-3.2.4/deps/v8-cmake/build'
make: *** [Makefile:50: deps/v8-cmake/build/libv8_libbase.a] Error 2
make: *** Deleting file 'deps/v8-cmake/build/libv8_libbase.a'
error: Bad exit status from /var/tmp/rpm-tmp.vLmuzA (%build)

RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.vLmuzA (%build)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions