node
node copied to clipboard
Duplicate v8 target errors when cross-compiling
We are working on packaging node for arm64 macs over at conda-forge
Attempting to cross-compile on mac, x86_64 -> arm64 with
./configure
--ninja \
--prefix=${PREFIX} \
--without-node-snapshot \
--shared \
--shared-libuv \
--shared-openssl \
--shared-zlib \
--with-intl=system-icu \
--cross-compiling --dest-os=mac --dest-cpu=arm64
ninja: error: obj.host/tools/v8_gypfiles/run_torque.ninja:546: multiple rules generate gen/torque-output-root/torque-generated/bit-fields-tq.h [-w dupbuild=err]
I was able to narrow it down to the fact that v8/torque is built for both host and target, while SHARED_INTERMEDIATE_DIR is not unique per toolset.
Adding $|OBJ
to SHARED_INTERMEDIATE_DIR via this patch so it is per-toolchain instead of per-product seems to work, but I don't know if that's actually the right fix. It seems plausible that these should only be generated once, and the bug really is is that they are being generated twice. I couldn't figure out how to solve that, though.
It still the case for 18.4.0... Any chance to fix the upstream?
Same issue when cross-compiling nodejs 16.15.0 using Buildroot (x86_64 VM -> arm64 target). I tried to apply the 2 aforementioned patches (SHARED_INTERMEDIATE_DIR and LDFLAGS) without success... Really don't know how to solve that...
Hi @scr06 ,
Did you by any chance solved this issue?
Unfortunatly no... I managed to get pre-built librairies for arm target. But node modules are not available...