Skip to content

after moving to meson build no longer possible to build on ppc64le host #12769

@matevy

Description

@matevy

Describe the bug

after no longer being able to build with automake and need to use meson in 2.26.x version building nix pacakges fails with the following error:

error:
       … while evaluating a branch condition
         at /nix/store/xfh1w1c6d3v1b79fwdfnddcbg1pdj674-source/pkgs/stdenv/booter.nix:68:9:
           67|         pred: n:
           68|         if n == len then
             |         ^
           69|           rnul pred

       … while calling the 'length' builtin
         at /nix/store/xfh1w1c6d3v1b79fwdfnddcbg1pdj674-source/pkgs/stdenv/booter.nix:65:13:
           64|     let
           65|       len = builtins.length list;
             |             ^
           66|       go =

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: Unknown CPU type: ppc64

Expected behavior

work as it did earlier with 2.25.x using automake

Additional context

executing the following line in nix.src implements a workaround:

grep -rl 'host_machine.cpu_family()' * | xargs sed -i "s/host_machine.cpu_family()/'powerpc64le'/g"

The issue is with meson's host_machine.cpu_family(). In automake/configure environment cpu_family is powerpc64 / powerpc64le but in meson environment it becomes ppc64/ppc64le.
But nix expects powerpc64/powerpc64le


Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions