Saturday, December 10, 2022

Re: [UPDATE] lang/node 18.12.1

--- node-v18.12.1.diff.old 2022-12-10 01:15:05.262758869 -0800
+++ node-v18.12.1.diff 2022-12-10 02:03:20.417936767 -0800
@@ -247,19 +247,22 @@
}

-#if defined(V8_HOST_ARCH_64_BIT)
-@@ -22,12 +23,3 @@
+@@ -22,12 +23,12 @@

inline Atomic64 Relaxed_CompareAndSwap(volatile Atomic64* ptr,
Atomic64 old_value, Atomic64 new_value) {
-@@ -358,7 +358,7 @@ inline void Relaxed_Memmove(volatile Atomic8* dst, vol
--
-- // On some platforms we need additional declarations to make
-- // AtomicWord compatible with our other Atomic* types.
++@@ -468,7 +468,7 @@ inline int Relaxed_Memcmp(volatile const Atomic8* s1,
+
+ // On some platforms we need additional declarations to make
+ // AtomicWord compatible with our other Atomic* types.
--#if defined(V8_OS_MACOSX) || defined(V8_OS_OPENBSD) || defined(V8_OS_AIX)
-+#if defined(V8_OS_MACOSX) || defined(V8_OS_AIX)
-- #include "src/base/atomicops_internals_atomicword_compat.h"
-- #endif
--
++-#if defined(V8_OS_DARWIN) || defined(V8_OS_OPENBSD) || defined(V8_OS_AIX)
+++#if defined(V8_OS_DARWIN) || defined(V8_OS_AIX)
+ #include "src/base/atomicops_internals_atomicword_compat.h"
+ #endif
+
Index: patches/patch-deps_v8_src_base_cpu_cc
===================================================================
RCS file: patches/patch-deps_v8_src_base_cpu_cc
On Sat, Dec 10, 2022 at 12:35 AM Volker Schlecht
<openbsd-ports@schlecht.dev> wrote:
>
> FWIW, github user barrykn, who identified the bug now also confirmed
> that it builds and works.

Hi, I'm github user barrykn!

It builds and works on amd64, but it fails to build on i386.
On i386 I get lots of errors like this:

In file included from
../deps/v8/src/libplatform/tracing/tracing-controller.cc:10:
In file included from ../deps/v8/src/base/atomicops.h:472:
../deps/v8/src/base/atomicops_internals_atomicword_compat.h:26:19:
error: redefinition of 'Relaxed_CompareAndSwap'
inline AtomicWord Relaxed_CompareAndSwap(volatile AtomicWord* ptr,
^
../deps/v8/src/base/atomicops.h:262:17: note: previous definition is here
inline Atomic64 Relaxed_CompareAndSwap(volatile Atomic64* ptr,
^

I have attempted a fix and am attaching it as a patch to your patch,
but I have not tested it yet; I won't be able to test it until
later today. (Also, this is the first time in many years that
I've sent a patch to a mailing list, so hopefully I won't mess this
up...)

I'll follow up with another email once I test this on both
amd64 and i386.
--
-Barry K. Nathan <barryn@pobox.com>

No comments:

Post a Comment