Skip to content

cross-compiling ROOT on ARM given the root_base run exports #331

@kratsg

Description

@kratsg

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

#128 in this PR from ~5 years ago, the v0 recipe got the following addition to the run section:

  run:
...
    # FIXME: Required to ensure a consistent etc/allDict.cxx.pch
    - {{ pin_compatible('libcxx', min_pin='x', max_pin='x') }}
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
    - {{ pin_compatible('xxhash', max_pin='x.x.x') }}
    - nlohmann_json
...

and the problem is that this ends up causing issues for downstream packages that both depend on root (and root_base) by pulling in both x86 and arm64 architectures (and compiler flags) at the same time -- such as seen with RooUnfold. The set of packages that conda pulls in looks to be

 │ ╭─ Resolving environments
 │ │ 
 │ │ Resolving build environment:
 │ │   Platform: linux-64 [__unix=0=0, __linux=6.11.0=0, __glibc=2.34=0, __archspec=1=zen2]
 │ │   Channels: 
 │ │    - file:///home/conda/feedstock_root/build_artifacts/
 │ │    - conda-forge
 │ │   Specs:
 │ │    - gcc_linux-aarch64 14.*
 │ │    - gxx_linux-aarch64 14.*
 │ │    - sysroot_linux-aarch64 2.17.*
 │ │    - cmake
 │ │    - make
 │ │    - cross-python_linux-aarch64
 │ │    - python 3.10.* *_cpython
 │ │    - root_base 6.36.4.*
 │ │ 
 │ │ ╭───────────────────────────────┬──────────────┬───────────────────────┬─────────────┬─────────────╮
 │ │ │ Package                       ┆ Version      ┆ Build                 ┆ Channel     ┆        Size │
 │ │ ╞═══════════════════════════════╪══════════════╪═══════════════════════╪═════════════╪═════════════╡
...
 │ │ │ _x86_64-microarch-level       ┆ 3            ┆ 3_zen2                ┆ conda-forge ┆    9.60 KiB │
...
 │ │ │ binutils_impl_linux-64        ┆ 2.45         ┆ default_hfdba357_104  ┆ conda-forge ┆    3.57 MiB │
 │ │ │ binutils_impl_linux-aarch64   ┆ 2.45         ┆ default_hc5fa074_104  ┆ conda-forge ┆    3.39 MiB │
 │ │ │ binutils_linux-64             ┆ 2.45         ┆ default_h4852527_104  ┆ conda-forge ┆   35.33 KiB │
 │ │ │ binutils_linux-aarch64        ┆ 2.45         ┆ default_h7726a90_104  ┆ conda-forge ┆   35.39 KiB │
...
 │ │ │ gcc_impl_linux-64             ┆ 14.3.0       ┆ he8b2097_16           ┆ conda-forge ┆   71.80 MiB │
 │ │ │ gcc_impl_linux-aarch64        ┆ 14.3.0       ┆ h25aa15c_16           ┆ conda-forge ┆   76.49 MiB │
 │ │ │ gcc_linux-64                  ┆ 14.3.0       ┆ h298d278_15           ┆ conda-forge ┆   28.15 KiB │
 │ │ │ gcc_linux-aarch64             ┆ 14.3.0       ┆ hc6a817b_15           ┆ conda-forge ┆   28.15 KiB │
...
 │ │ │ ld_impl_linux-64              ┆ 2.45         ┆ default_hbd61a6d_104  ┆ conda-forge ┆  708.54 KiB │
 │ │ │ ld_impl_linux-aarch64         ┆ 2.45         ┆ default_h27e1c4c_104  ┆ conda-forge ┆  768.94 KiB │
...
 │ │ │ libgcc                        ┆ 15.2.0       ┆ he0feb66_16           ┆ conda-forge ┆ 1018.36 KiB │
 │ │ │ libgcc-devel_linux-64         ┆ 14.3.0       ┆ hf649bbc_116          ┆ conda-forge ┆    2.94 MiB │
 │ │ │ libgcc-devel_linux-aarch64    ┆ 14.3.0       ┆ h8c5ef91_16           ┆ conda-forge ┆    2.23 MiB │
 │ │ │ libgcc-ng                     ┆ 15.2.0       ┆ h69a702a_16           ┆ conda-forge ┆   26.62 KiB │
...

and so on, and you can see that it's a clear mix of both architectures. I think, after talking briefly with @matthewfeickert offline and also running into a similar issue with conda-forge/pytensor-suite-feedstock#191 as well -- we need to remove compiler pins on the runtime dependencies by using the cxx-compiler meta-package instead as recommended by @h-vetinari.

Granted, I don't know what happened for getting ROOT 6.24 that required needing to add this in or what the FIXME particular relates to here (maybe @chrisburr remembers?) but it would be really good to unblock this moving forward to be able to move towards ARM computing.

Installed packages

n/a

Environment info

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions