Skip to content

Duplicate v8 target errors when cross-compiling #37441

Open
@minrk

Description

@minrk

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

fails with this error:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildIssues and PRs related to build files or the CI.gypIssues and PRs related to the GYP tool and .gyp build filesmacosIssues and PRs related to the macOS platform / OSX.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions