Skip to content

Duplicate v8 target errors when cross-compiling #37441

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildIssues and PRs related to Node.js builds or CI infrastructure.gypIssues and PRs related to GYP and .gyp or .gypi build files.macosIssues and PRs related to the macOS platform.staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions