Skip to content

release-cross: Add 64-bit big-endian POWER#443234

Merged
OPNA2608 merged 1 commit intoNixOS:masterfrom
OPNA2608:init/ppc64-release-cross-tools
Dec 16, 2025
Merged

release-cross: Add 64-bit big-endian POWER#443234
OPNA2608 merged 1 commit intoNixOS:masterfrom
OPNA2608:init/ppc64-release-cross-tools

Conversation

@OPNA2608
Copy link
Contributor

@OPNA2608 OPNA2608 commented Sep 15, 2025

See #443234 (comment) for an overview of untested & known-failing builds. A decent amount of the tests work though, and should populate a good amount of cross-built derivations in the cache for easier testing of these targets.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@ofborg ofborg bot added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Sep 15, 2025
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Sep 15, 2025
@nix-owners nix-owners bot requested a review from Ericson2314 September 15, 2025 18:19
@OPNA2608
Copy link
Contributor Author

OPNA2608 commented Sep 17, 2025

All:

Glibc ELFv1:

  • rustc¹, and by extension cargo, fail in a way that I'm unfamiliar with.
  • mesa² fails due to rust-bindgen(?) giving clang a gnuabielfv*-containing target triplet, which it doesn't understand. This is fixed in the CC wrapper, so might need a similar fix somewhere else.

Glibc ELFv2:

  • rustc currently can't parse the platform triplet… I think. Can crop the ABI part to just gnu like on glibc ELFv1, but then it builds ELFv1 objects and linking fails.
    There is a cfg.target_abi that would support setting elfv1 and elfv2, but I'm not sure if that can be done for the bootstrapping, or where/how one would set that. Will prolly just mark rustc as broken on big-endian glibc ELFv2 POWER, unless someone Rust-knowledgable can figure that out.

musl (ELFv2):


1:

    Finished `dev` profile [unoptimized] target(s) in 29.94s
WARNING: The `change-id` is missing in the `bootstrap.toml`. This means that you will not be able to track the major changes made to the bootstrap configurations.
NOTE: to silence this warning, add `change-id = 142379` or `change-id = "ignore"` at the top of `bootstrap.toml`

thread 'main' panicked at src/bootstrap/src/lib.rs:1715:17:
self.symlink_file(link, dst) failed with File exists (os error 17)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Panic was initiated from src/bootstrap/src/lib.rs:1715:17
Build completed unsuccessfully in 0:00:35
make: *** [Makefile:19: all] Error 1

2:

FAILED: [code=1] src/compiler/rust/bindings.rs 
/nix/store/10y3zpzsc7jsc7bkpk3vrj2b4j0n7skr-rust-bindgen-0.72.0/bin/bindgen ../src/compiler/rust/bindings.h --output /build/source/build/src/compiler/rust/bindings.rs --raw-line '#![allow(clippy::all)]' --raw-line '#![allow(improper_ctypes)]' --raw-line '#![allow(unused_unsafe)]' --raw-line '#![allow(non_camel_case_types)]' --raw-line '#![allow(non_snake_case)]' --raw-line '#![allow(non_upper_case_globals)]' --raw-line '#![allow(unnecessary_transmutes)]' --allowlist-var 'NIR_.*' --allowlist-var 'nir_.*_infos' --allowlist-var 'rust_.*' --allowlist-function 'glsl_.*' --allowlist-function _mesa_shader_stage_to_string --allowlist-function 'nir_.*' --allowlist-function 'compiler_rs.*' --allowlist-function 'u_memstream.*' --allowlist-type u_memstream --no-prepend-enum-name --with-derive-default --allowlist-type exec_list --allowlist-type exec_node --allowlist-type float_controls --allowlist-type gc_ctx --allowlist-type gl_access_qualifier --allowlist-type gl_frag_result --allowlist-type gl_interp_mode --allowlist-type gl_shader_stage --allowlist-type gl_subgroup_size --allowlist-type gl_system_value --allowlist-type gl_tess_spacing --allowlist-type gl_varying_slot --allowlist-type gl_vert_attrib --allowlist-type glsl_type --allowlist-type 'nir_.*' --allowlist-type mesa_scope --allowlist-type mesa_prim --allowlist-type pipe_shader_type --allowlist-type shader_info --allowlist-type tess_primitive_mode --allowlist-type u_printf_info --rust-target 1.89.0 --rust-edition 2021 -- -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS '-DPACKAGE_VERSION="25.2.2"' '-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/-/issues"' -DHAVE_OPENGL=1 -DHAVE_OPENGL_ES_1=1 -DHAVE_OPENGL_ES_2=1 -DHAVE_ASAHI -DHAVE_CROCUS -DHAVE_D3D12 -DHAVE_ETNAVIV -DHAVE_FREEDRENO -DHAVE_I915 -DHAVE_IRIS -DHAVE_LIMA -DHAVE_LLVMPIPE -DHAVE_NOUVEAU -DHAVE_PANFROST -DHAVE_R300 -DHAVE_R600 -DHAVE_RADEONSI -DHAVE_SOFTPIPE -DHAVE_SVGA -DHAVE_TEGRA -DHAVE_V3D -DHAVE_VC4 -DHAVE_VIRGL -DHAVE_ZINK -DHAVE_SWRAST -DHAVE_NVK -DVIDEO_CODEC_VC1DEC=1 -DVIDEO_CODEC_H264DEC=1 -DVIDEO_CODEC_H264ENC=1 -DVIDEO_CODEC_H265DEC=1 -DVIDEO_CODEC_H265ENC=1 -DVIDEO_CODEC_AV1DEC=1 -DVIDEO_CODEC_AV1ENC=1 -DVIDEO_CODEC_VP9DEC=1 -DHAVE_X11_PLATFORM -DHAVE_WAYLAND_PLATFORM -DHAVE_SURFACELESS_PLATFORM -DHAVE_DRM_PLATFORM -DHAVE_XCB_PLATFORM -DUSE_LIBGLVND=1 -DUSE_D3D12_PREVIEW_HEADERS=0 -DHAVE_GALLIUM_D3D12_VIDEO -DHAVE_ST_VDPAU -DHAVE_VA_SURFACE_ATTRIB_DRM_FORMAT_MODIFIERS -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_DRM -DGLAPI_EXPORT_PROTO_ENTRY_POINTS=0 -DALLOW_KCMP -DMESA_DEBUG=0 -DENABLE_SHADER_CACHE -DHAVE___BUILTIN_BSWAP32 -DHAVE___BUILTIN_BSWAP64 -DHAVE___BUILTIN_CLZ -DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_CTZ -DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL -DHAVE___BUILTIN_POPCOUNT -DHAVE___BUILTIN_POPCOUNTLL -DHAVE___BUILTIN_UNREACHABLE -DHAVE___BUILTIN_TYPES_COMPATIBLE_P -DHAVE_FUNC_ATTRIBUTE_CONST -DHAVE_FUNC_ATTRIBUTE_FLATTEN -DHAVE_FUNC_ATTRIBUTE_MALLOC -DHAVE_FUNC_ATTRIBUTE_PURE -DHAVE_FUNC_ATTRIBUTE_UNUSED -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT -DHAVE_FUNC_ATTRIBUTE_WEAK -DHAVE_FUNC_ATTRIBUTE_FORMAT -DHAVE_FUNC_ATTRIBUTE_PACKED -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL -DHAVE_FUNC_ATTRIBUTE_ALIAS -DHAVE_FUNC_ATTRIBUTE_NORETURN -DHAVE_FUNC_ATTRIBUTE_OPTIMIZE -DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DHAVE_UINT128 -DHAVE_REALLOCARRAY -DHAVE_FMEMOPEN -D_GNU_SOURCE -DUSE_GCC_ATOMIC_BUILTINS -DMAJOR_IN_SYSMACROS -DHAS_SCHED_H -DHAS_SCHED_GETAFFINITY -DHAVE_LINUX_FUTEX_H -DHAVE_ENDIAN_H -DHAVE_DLFCN_H -DHAVE_SYS_SHM_H -DHAVE_SYS_INOTIFY_H -DHAVE_LINUX_UDMABUF_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_MEMFD_CREATE -DHAVE_RANDOM_R -DHAVE_FLOCK -DHAVE_STRTOK_R -DHAVE_GETRANDOM -DHAVE_POSIX_FALLOCATE -DHAVE_SECURE_GETENV -DHAVE_GNU_QSORT_R -DHAVE_STRUCT_TIMESPEC -DHAVE_PROGRAM_INVOCATION_NAME -DHAVE_ISSIGNALING -DHAVE_POSIX_MEMALIGN -DHAVE_DIRENT_D_TYPE -DHAVE_STRTOD_L -DHAVE_DLADDR -DHAVE_DL_ITERATE_PHDR -DHAVE_ZLIB -DHAVE_ZSTD -DHAVE_COMPRESSION -DHAVE_PTHREAD -DHAVE_PTHREAD_SETAFFINITY -DHAVE_LIBDRM -DHAVE_LIBUDEV '-DMESA_LLVM_VERSION_STRING="19.1.7"' -DLLVM_IS_SHARED=1 -DLLVM_AVAILABLE=1 -DDRAW_LLVM_AVAILABLE=1 -DAMD_LLVM_AVAILABLE=1 -DGALLIVM_USE_ORCJIT=0 -DHAVE_SPIRV_TOOLS -DUSE_LIBELF -DHAVE_VALGRIND -DTHREAD_SANITIZER=0 -DHAVE_LIBUNWIND -DWL_HIDE_DEPRECATED -DHAVE_WL_DISPATCH_QUEUE_TIMEOUT -DHAVE_WL_CREATE_QUEUE_WITH_NAME -DXCB_KEYSYMS_AVAILABLE -DHAVE_X11_DRM -DHAVE_DRI -DHAVE_DRI2 -DHAVE_DRI3_EXPLICIT_SYNC -DHAVE_DRISW_KMS -DHAVE_GALLIUM_EXTRA_HUD=1 -DHAVE_LIBSENSORS=1 -target powerpc64-unknown-linux-gnuabielfv1 -DNDEBUG -I/build/source/src/compiler/nir/. -I/build/source/build/src/compiler/nir/. -I/build/source/src/compiler/. -I/build/source/build/src/compiler/. -I/build/source/src/. -I/build/source/build/src/. -I/build/source/include/. -I/build/source/build/include/. -I/build/source/include/. -I/build/source/build/include/. -I/build/source/src/util/.. -I/build/source/build/src/util/.. -I/nix/store/pg6i8hinacpsljg6bgh3mvhlbd4n3p4k-zlib-powerpc64-unknown-linux-gnuabielfv1-1.3.1-dev/include -pthread -I/nix/store/4dgw4fa6438mxwwpgrbi552pwpxvfyp4-valgrind-powerpc64-unknown-linux-gnuabielfv1-3.25.1-dev/include/valgrind -I/nix/store/6j97nfg16p8jzxwf0ja0pwsp9wd0wlnv-zstd-powerpc64-unknown-linux-gnuabielfv1-1.5.7-dev/include -I/nix/store/3xl18k8kgy2fww4r04iw4pfhfrinq7yi-libunwind-powerpc64-unknown-linux-gnuabielfv1-1.8.2-dev/include -pthread -I/nix/store/4dgw4fa6438mxwwpgrbi552pwpxvfyp4-valgrind-powerpc64-unknown-linux-gnuabielfv1-3.25.1-dev/include/valgrind -I/nix/store/v0gwznq8ssv85ag43yv726ph6fi75ym9-libdrm-powerpc64-unknown-linux-gnuabielfv1-2.4.125-dev/include -I/nix/store/v0gwznq8ssv85ag43yv726ph6fi75ym9-libdrm-powerpc64-unknown-linux-gnuabielfv1-2.4.125-dev/include/libdrm -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS '-DPACKAGE_VERSION="25.2.2"' '-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/-/issues"' -DHAVE_OPENGL=1 -DHAVE_OPENGL_ES_1=1 -DHAVE_OPENGL_ES_2=1 -DHAVE_ASAHI -DHAVE_CROCUS -DHAVE_D3D12 -DHAVE_ETNAVIV -DHAVE_FREEDRENO -DHAVE_I915 -DHAVE_IRIS -DHAVE_LIMA -DHAVE_LLVMPIPE -DHAVE_NOUVEAU -DHAVE_PANFROST -DHAVE_R300 -DHAVE_R600 -DHAVE_RADEONSI -DHAVE_SOFTPIPE -DHAVE_SVGA -DHAVE_TEGRA -DHAVE_V3D -DHAVE_VC4 -DHAVE_VIRGL -DHAVE_ZINK -DHAVE_SWRAST -DHAVE_NVK -DVIDEO_CODEC_VC1DEC=1 -DVIDEO_CODEC_H264DEC=1 -DVIDEO_CODEC_H264ENC=1 -DVIDEO_CODEC_H265DEC=1 -DVIDEO_CODEC_H265ENC=1 -DVIDEO_CODEC_AV1DEC=1 -DVIDEO_CODEC_AV1ENC=1 -DVIDEO_CODEC_VP9DEC=1 -DHAVE_X11_PLATFORM -DHAVE_WAYLAND_PLATFORM -DHAVE_SURFACELESS_PLATFORM -DHAVE_DRM_PLATFORM -DHAVE_XCB_PLATFORM -DUSE_LIBGLVND=1 -DUSE_D3D12_PREVIEW_HEADERS=0 -DHAVE_GALLIUM_D3D12_VIDEO -DHAVE_ST_VDPAU -DHAVE_VA_SURFACE_ATTRIB_DRM_FORMAT_MODIFIERS -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_DRM -DGLAPI_EXPORT_PROTO_ENTRY_POINTS=0 -DALLOW_KCMP -DMESA_DEBUG=0 -DENABLE_SHADER_CACHE -DHAVE___BUILTIN_BSWAP32 -DHAVE___BUILTIN_BSWAP64 -DHAVE___BUILTIN_CLZ -DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_CTZ -DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL -DHAVE___BUILTIN_POPCOUNT -DHAVE___BUILTIN_POPCOUNTLL -DHAVE___BUILTIN_UNREACHABLE -DHAVE___BUILTIN_TYPES_COMPATIBLE_P -DHAVE_FUNC_ATTRIBUTE_CONST -DHAVE_FUNC_ATTRIBUTE_FLATTEN -DHAVE_FUNC_ATTRIBUTE_MALLOC -DHAVE_FUNC_ATTRIBUTE_PURE -DHAVE_FUNC_ATTRIBUTE_UNUSED -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT -DHAVE_FUNC_ATTRIBUTE_WEAK -DHAVE_FUNC_ATTRIBUTE_FORMAT -DHAVE_FUNC_ATTRIBUTE_PACKED -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL -DHAVE_FUNC_ATTRIBUTE_ALIAS -DHAVE_FUNC_ATTRIBUTE_NORETURN -DHAVE_FUNC_ATTRIBUTE_OPTIMIZE -DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DHAVE_UINT128 -DHAVE_REALLOCARRAY -DHAVE_FMEMOPEN -D_GNU_SOURCE -DUSE_GCC_ATOMIC_BUILTINS -DMAJOR_IN_SYSMACROS -DHAS_SCHED_H -DHAS_SCHED_GETAFFINITY -DHAVE_LINUX_FUTEX_H -DHAVE_ENDIAN_H -DHAVE_DLFCN_H -DHAVE_SYS_SHM_H -DHAVE_SYS_INOTIFY_H -DHAVE_LINUX_UDMABUF_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_MEMFD_CREATE -DHAVE_RANDOM_R -DHAVE_FLOCK -DHAVE_STRTOK_R -DHAVE_GETRANDOM -DHAVE_POSIX_FALLOCATE -DHAVE_SECURE_GETENV -DHAVE_GNU_QSORT_R -DHAVE_STRUCT_TIMESPEC -DHAVE_PROGRAM_INVOCATION_NAME -DHAVE_ISSIGNALING -DHAVE_POSIX_MEMALIGN -DHAVE_DIRENT_D_TYPE -DHAVE_STRTOD_L -DHAVE_DLADDR -DHAVE_DL_ITERATE_PHDR -DHAVE_ZLIB -DHAVE_ZSTD -DHAVE_COMPRESSION -DHAVE_PTHREAD -DHAVE_PTHREAD_SETAFFINITY -DHAVE_LIBDRM -DHAVE_LIBUDEV '-DMESA_LLVM_VERSION_STRING="19.1.7"' -DLLVM_IS_SHARED=1 -DLLVM_AVAILABLE=1 -DDRAW_LLVM_AVAILABLE=1 -DAMD_LLVM_AVAILABLE=1 -DGALLIVM_USE_ORCJIT=0 -DHAVE_SPIRV_TOOLS -DUSE_LIBELF -DHAVE_VALGRIND -DTHREAD_SANITIZER=0 -DHAVE_LIBUNWIND -DWL_HIDE_DEPRECATED -DHAVE_WL_DISPATCH_QUEUE_TIMEOUT -DHAVE_WL_CREATE_QUEUE_WITH_NAME -DXCB_KEYSYMS_AVAILABLE -DHAVE_X11_DRM -DHAVE_DRI -DHAVE_DRI2 -DHAVE_DRI3_EXPLICIT_SYNC -DHAVE_DRISW_KMS -DHAVE_GALLIUM_EXTRA_HUD=1 -DHAVE_LIBSENSORS=1 -std=c11 -MD -MQ ../src/compiler/rust/bindings.h -MF src/compiler/rust/bindings.h.d
Unable to generate bindings: clang diagnosed error: error: version 'abielfv1' in target triple 'powerpc64-unknown-linux-gnuabielfv1' is invalid

Also happens on hardware when building rusticl is enabled:

FAILED: [code=1] src/gallium/frontends/rusticl/rusticl_mesa_bindings.rs src/gallium/frontends/rusticl/rusticl_mesa_bindings.c 
/nix/store/vh1by20llxprymszj08rfhzjpdxpxc18-rust-bindgen-0.72.0/bin/bindgen ../src/gallium/frontends/rusticl/rusticl_mesa_bindings.h --output /build/source/build/src/gallium/frontends/rusticl/rusticl_mesa_bindings.rs --raw-line '#![allow(clippy::all)]' --raw-line '#![allow(improper_ctypes)]' --raw-line '#![allow(unused_unsafe)]' --raw-line '#![allow(non_camel_case_types)]' --raw-line '#![allow(non_snake_case)]' --raw-line '#![allow(non_upper_case_globals)]' --raw-line '#![allow(unnecessary_transmutes)]' --raw-line '#![allow(warnings)]' --no-convert-floats --default-enum-style rust --with-derive-partialeq --with-derive-eq --with-derive-partialord --with-derive-ord --with-derive-hash --with-derive-default --anon-fields-prefix anon_ --use-array-pointers-in-arguments --allowlist-function 'blob_.*' --allowlist-function 'disk_cache_.*' --allowlist-type float_controls --allowlist-function 'mesa_.*' --allowlist-var 'OS_.*' --allowlist-function 'rz?alloc_.*' --allowlist-function 'SHA1.*' --allowlist-var 'SHA1_.*' --allowlist-function 'u_.*' --allowlist-function 'util_format_.*' --allowlist-function 'util_vma_.*' --no-copy util_vma_heap --allowlist-type 'cl_sampler_.*_mode' --constified-enum-module 'cl_sampler_.*_mode' --allowlist-function 'clc_.*' --allowlist-type clc_kernel_arg_access_qualifier --bitfield-enum clc_kernel_arg_access_qualifier --allowlist-type clc_kernel_arg_type_qualifier --bitfield-enum clc_kernel_arg_type_qualifier --allowlist-type gl_access_qualifier --bitfield-enum gl_access_qualifier --allowlist-function 'glsl_.*' --allowlist-function 'nir_.*' --allowlist-var nir_debug --allowlist-var 'NIR_DEBUG_.*' --bitfield-enum nir_lower_int64_options --bitfield-enum nir_opt_if_options --bitfield-enum nir_variable_mode --allowlist-function 'should_.*_nir' --allowlist-function 'spirv_.*' --allowlist-function 'pipe_.*' --allowlist-var 'PIPE_.*' --allowlist-type pipe_endian --bitfield-enum pipe_map_flags --allowlist-type pipe_query_type --constified-enum-module pipe_query_type --allowlist-type pipe_resource_usage --bitfield-enum pipe_resource_usage --allowlist-type pipe_tex_filter --constified-enum-module pipe_tex_filter --allowlist-type pipe_tex_wrap --constified-enum-module pipe_tex_wrap --allowlist-function 'rusticl_.*' --allowlist-function 'std(err|out)_ptr' --allowlist-function mmap --allowlist-function munmap --allowlist-var 'MAP_.*' --allowlist-var 'PROT_.*' --allowlist-var 'WINSYS_HANDLE_TYPE_.*' --experimental --wrap-static-fns --wrap-static-fns-path /build/source/build/src/gallium/frontends/rusticl/rusticl_mesa_bindings.c --rust-target 1.89.0 --rust-edition 2021 -- -fno-builtin-malloc -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS '-DPACKAGE_VERSION="25.2.2"' '-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/-/issues"' -DHAVE_OPENGL=1 -DHAVE_OPENGL_ES_1=1 -DHAVE_OPENGL_ES_2=1 -DHAVE_CROCUS -DHAVE_D3D12 -DHAVE_ETNAVIV -DHAVE_FREEDRENO -DHAVE_I915 -DHAVE_LIMA -DHAVE_LLVMPIPE -DHAVE_NOUVEAU -DHAVE_R300 -DHAVE_R600 -DHAVE_RADEONSI -DHAVE_SOFTPIPE -DHAVE_SVGA -DHAVE_TEGRA -DHAVE_V3D -DHAVE_VC4 -DHAVE_VIRGL -DHAVE_ZINK -DHAVE_SWRAST -DVIDEO_CODEC_VC1DEC=1 -DVIDEO_CODEC_H264DEC=1 -DVIDEO_CODEC_H264ENC=1 -DVIDEO_CODEC_H265DEC=1 -DVIDEO_CODEC_H265ENC=1 -DVIDEO_CODEC_AV1DEC=1 -DVIDEO_CODEC_AV1ENC=1 -DVIDEO_CODEC_VP9DEC=1 -DHAVE_X11_PLATFORM -DHAVE_WAYLAND_PLATFORM -DHAVE_SURFACELESS_PLATFORM -DHAVE_DRM_PLATFORM -DHAVE_XCB_PLATFORM -DUSE_LIBGLVND=1 -DUSE_D3D12_PREVIEW_HEADERS=0 -DHAVE_GALLIUM_D3D12_VIDEO -DHAVE_ST_VDPAU -DHAVE_VA_SURFACE_ATTRIB_DRM_FORMAT_MODIFIERS -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_DRM -DGLAPI_EXPORT_PROTO_ENTRY_POINTS=0 -DALLOW_KCMP -DMESA_DEBUG=0 -DENABLE_SHADER_CACHE -DHAVE___BUILTIN_BSWAP32 -DHAVE___BUILTIN_BSWAP64 -DHAVE___BUILTIN_CLZ -DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_CTZ -DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL -DHAVE___BUILTIN_POPCOUNT -DHAVE___BUILTIN_POPCOUNTLL -DHAVE___BUILTIN_UNREACHABLE -DHAVE___BUILTIN_TYPES_COMPATIBLE_P -DHAVE_FUNC_ATTRIBUTE_CONST -DHAVE_FUNC_ATTRIBUTE_FLATTEN -DHAVE_FUNC_ATTRIBUTE_MALLOC -DHAVE_FUNC_ATTRIBUTE_PURE -DHAVE_FUNC_ATTRIBUTE_UNUSED -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT -DHAVE_FUNC_ATTRIBUTE_WEAK -DHAVE_FUNC_ATTRIBUTE_FORMAT -DHAVE_FUNC_ATTRIBUTE_PACKED -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL -DHAVE_FUNC_ATTRIBUTE_ALIAS -DHAVE_FUNC_ATTRIBUTE_NORETURN -DHAVE_FUNC_ATTRIBUTE_OPTIMIZE -DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DHAVE_UINT128 -DHAVE_REALLOCARRAY -DHAVE_FMEMOPEN -D_GNU_SOURCE -DUSE_GCC_ATOMIC_BUILTINS -DMAJOR_IN_SYSMACROS -DHAS_SCHED_H -DHAS_SCHED_GETAFFINITY -DHAVE_LINUX_FUTEX_H -DHAVE_ENDIAN_H -DHAVE_DLFCN_H -DHAVE_SYS_SHM_H -DHAVE_SYS_INOTIFY_H -DHAVE_LINUX_UDMABUF_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_MEMFD_CREATE -DHAVE_RANDOM_R -DHAVE_FLOCK -DHAVE_STRTOK_R -DHAVE_GETRANDOM -DHAVE_POSIX_FALLOCATE -DHAVE_SECURE_GETENV -DHAVE_GNU_QSORT_R -DHAVE_STRUCT_TIMESPEC -DHAVE_PROGRAM_INVOCATION_NAME -DHAVE_ISSIGNALING -DHAVE_POSIX_MEMALIGN -DHAVE_DIRENT_D_TYPE -DHAVE_STRTOD_L -DHAVE_DLADDR -DHAVE_DL_ITERATE_PHDR -DHAVE_ZLIB -DHAVE_ZSTD -DHAVE_COMPRESSION -DHAVE_PTHREAD -DHAVE_PTHREAD_SETAFFINITY -DHAVE_LIBDRM -DHAVE_LIBUDEV '-DMESA_LLVM_VERSION_STRING="19.1.7"' -DLLVM_IS_SHARED=1 -DLLVM_AVAILABLE=1 -DDRAW_LLVM_AVAILABLE=1 -DAMD_LLVM_AVAILABLE=1 -DGALLIVM_USE_ORCJIT=0 -DHAVE_SPIRV_TOOLS -DUSE_LIBELF -DHAVE_VALGRIND -DTHREAD_SANITIZER=0 -DHAVE_LIBUNWIND -DWL_HIDE_DEPRECATED -DHAVE_WL_DISPATCH_QUEUE_TIMEOUT -DHAVE_WL_CREATE_QUEUE_WITH_NAME -DXCB_KEYSYMS_AVAILABLE -DHAVE_X11_DRM -DHAVE_DRI -DHAVE_DRI2 -DHAVE_DRI3_EXPLICIT_SYNC -DHAVE_DRISW_KMS -DHAVE_GALLIUM_EXTRA_HUD=1 -DHAVE_LIBSENSORS=1 -DHAVE_ETNAVIV_NO_PEST -I/build/source/src/gallium/include -I/build/source/build/src/gallium/include -I/build/source/src/gallium/auxiliary -I/build/source/build/src/gallium/auxiliary -I/build/source/include/. -I/build/source/build/include/. -I/build/source/src/. -I/build/source/build/src/. -DNDEBUG -I/build/source/src/compiler/nir/. -I/build/source/build/src/compiler/nir/. -I/build/source/src/compiler/. -I/build/source/build/src/compiler/. -I/build/source/src/. -I/build/source/build/src/. -I/build/source/include/. -I/build/source/build/include/. -I/nix/store/0i1crxwgilfzkm7qvfrx0f8xqpwwjx0b-valgrind-3.25.1-dev/include/valgrind -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS '-DPACKAGE_VERSION="25.2.2"' '-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/-/issues"' -DHAVE_OPENGL=1 -DHAVE_OPENGL_ES_1=1 -DHAVE_OPENGL_ES_2=1 -DHAVE_CROCUS -DHAVE_D3D12 -DHAVE_ETNAVIV -DHAVE_FREEDRENO -DHAVE_I915 -DHAVE_LIMA -DHAVE_LLVMPIPE -DHAVE_NOUVEAU -DHAVE_R300 -DHAVE_R600 -DHAVE_RADEONSI -DHAVE_SOFTPIPE -DHAVE_SVGA -DHAVE_TEGRA -DHAVE_V3D -DHAVE_VC4 -DHAVE_VIRGL -DHAVE_ZINK -DHAVE_SWRAST -DVIDEO_CODEC_VC1DEC=1 -DVIDEO_CODEC_H264DEC=1 -DVIDEO_CODEC_H264ENC=1 -DVIDEO_CODEC_H265DEC=1 -DVIDEO_CODEC_H265ENC=1 -DVIDEO_CODEC_AV1DEC=1 -DVIDEO_CODEC_AV1ENC=1 -DVIDEO_CODEC_VP9DEC=1 -DHAVE_X11_PLATFORM -DHAVE_WAYLAND_PLATFORM -DHAVE_SURFACELESS_PLATFORM -DHAVE_DRM_PLATFORM -DHAVE_XCB_PLATFORM -DUSE_LIBGLVND=1 -DUSE_D3D12_PREVIEW_HEADERS=0 -DHAVE_GALLIUM_D3D12_VIDEO -DHAVE_ST_VDPAU -DHAVE_VA_SURFACE_ATTRIB_DRM_FORMAT_MODIFIERS -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_DRM -DGLAPI_EXPORT_PROTO_ENTRY_POINTS=0 -DALLOW_KCMP -DMESA_DEBUG=0 -DENABLE_SHADER_CACHE -DHAVE___BUILTIN_BSWAP32 -DHAVE___BUILTIN_BSWAP64 -DHAVE___BUILTIN_CLZ -DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_CTZ -DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL -DHAVE___BUILTIN_POPCOUNT -DHAVE___BUILTIN_POPCOUNTLL -DHAVE___BUILTIN_UNREACHABLE -DHAVE___BUILTIN_TYPES_COMPATIBLE_P -DHAVE_FUNC_ATTRIBUTE_CONST -DHAVE_FUNC_ATTRIBUTE_FLATTEN -DHAVE_FUNC_ATTRIBUTE_MALLOC -DHAVE_FUNC_ATTRIBUTE_PURE -DHAVE_FUNC_ATTRIBUTE_UNUSED -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT -DHAVE_FUNC_ATTRIBUTE_WEAK -DHAVE_FUNC_ATTRIBUTE_FORMAT -DHAVE_FUNC_ATTRIBUTE_PACKED -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL -DHAVE_FUNC_ATTRIBUTE_ALIAS -DHAVE_FUNC_ATTRIBUTE_NORETURN -DHAVE_FUNC_ATTRIBUTE_OPTIMIZE -DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DHAVE_UINT128 -DHAVE_REALLOCARRAY -DHAVE_FMEMOPEN -D_GNU_SOURCE -DUSE_GCC_ATOMIC_BUILTINS -DMAJOR_IN_SYSMACROS -DHAS_SCHED_H -DHAS_SCHED_GETAFFINITY -DHAVE_LINUX_FUTEX_H -DHAVE_ENDIAN_H -DHAVE_DLFCN_H -DHAVE_SYS_SHM_H -DHAVE_SYS_INOTIFY_H -DHAVE_LINUX_UDMABUF_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_MEMFD_CREATE -DHAVE_RANDOM_R -DHAVE_FLOCK -DHAVE_STRTOK_R -DHAVE_GETRANDOM -DHAVE_POSIX_FALLOCATE -DHAVE_SECURE_GETENV -DHAVE_GNU_QSORT_R -DHAVE_STRUCT_TIMESPEC -DHAVE_PROGRAM_INVOCATION_NAME -DHAVE_ISSIGNALING -DHAVE_POSIX_MEMALIGN -DHAVE_DIRENT_D_TYPE -DHAVE_STRTOD_L -DHAVE_DLADDR -DHAVE_DL_ITERATE_PHDR -DHAVE_ZLIB -DHAVE_ZSTD -DHAVE_COMPRESSION -DHAVE_PTHREAD -DHAVE_PTHREAD_SETAFFINITY -DHAVE_LIBDRM -DHAVE_LIBUDEV '-DMESA_LLVM_VERSION_STRING="19.1.7"' -DLLVM_IS_SHARED=1 -DLLVM_AVAILABLE=1 -DDRAW_LLVM_AVAILABLE=1 -DAMD_LLVM_AVAILABLE=1 -DGALLIVM_USE_ORCJIT=0 -DHAVE_SPIRV_TOOLS -DUSE_LIBELF -DHAVE_VALGRIND -DTHREAD_SANITIZER=0 -DHAVE_LIBUNWIND -DWL_HIDE_DEPRECATED -DHAVE_WL_DISPATCH_QUEUE_TIMEOUT -DHAVE_WL_CREATE_QUEUE_WITH_NAME -DXCB_KEYSYMS_AVAILABLE -DHAVE_X11_DRM -DHAVE_DRI -DHAVE_DRI2 -DHAVE_DRI3_EXPLICIT_SYNC -DHAVE_DRISW_KMS -DHAVE_GALLIUM_EXTRA_HUD=1 -DHAVE_LIBSENSORS=1 -std=c11 -MD -MQ ../src/gallium/frontends/rusticl/rusticl_mesa_bindings.h -MF src/gallium/frontends/rusticl/rusticl_mesa_bindings.h.d
Unable to generate bindings: clang diagnosed error: error: version 'abielfv1' in target triple 'powerpc64-unknown-linux-gnuabielfv1' is invalid

@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Nov 6, 2025
@alexfmpe
Copy link
Member

I think ghc*.hello should work

elfv1 builds and I can run it with $(nix-build -A qemu)/bin/qemu-ppc64, the other ones fail while building the cross compiling ghc

Looks similar to your Glibc ELFv2 issues above

$ nix-build -A pkgsCross.ppc64-elfv1.haskellPackages.hello
/nix/store/rmqhvzgkjj6fxgvgvqmf3dy7fhvkfmhv-hello-powerpc64-unknown-linux-gnuabielfv1-1.0.0.2

$ nix-build -A pkgsCross.ppc64-elfv2.haskellPackages.hello
Command line: _build/stage0/bin/powerpc64-unknown-linux-gnuabielfv2-ghc -Wall -Wcompat -hisuf p_hi -osuf p_o -hcsuf p_hc -static -prof -hide-all-packages -no-user-package-db '-package-env -' '-package-db _build/stage1/inplace/package.conf.d' '-this-unit-id ghc-prim-0.11.0-c1f3' '-package-id rts-1.0.2' -i -i/build/ghc-9.8.4-source/_build/stage1/libraries/ghc-prim/build -i/build/ghc-9.8.4-source/_build/stage1/libraries/ghc-prim/build/autogen -i/build/ghc-9.8.4-source/libraries/ghc-prim -Irts/include -I_build/stage1/libraries/ghc-prim/build -I/nix/store/kh15qyzvgwpa5cjh3dczkrvjba09qqq5-numactl-powerpc64-unknown-linux-gnuabielfv2-2.0.18-dev/include -I/nix/store/zc9jq1yhd7f7zwgfh4pp8050p7kdh747-libffi-powerpc64-unknown-linux-gnuabielfv2-3.5.1-dev/include -I/build/ghc-9.8.4-source/rts/include -I/build/ghc-9.8.4-source/_build/stage1/rts/build/include -optP-include -optP_build/stage1/libraries/ghc-prim/build/autogen/cabal_macros.h -outputdir _build/stage1/libraries/ghc-prim/build -fdiagnostics-color=always -this-unit-id ghc-prim -XHaskell2010 -no-global-package-db -package-db=/build/ghc-9.8.4-source/_build/stage1/inplace/package.conf.d -ghcversion-file=rts/include/ghcversion.h -ghcversion-file=rts/include/ghcversion.h -Wnoncanonical-monad-instances -optc-Wno-error=inline -c libraries/ghc-prim/GHC/Types.hs -o _build/stage1/libraries/ghc-prim/build/GHC/Types.p_o -fsplit-sections -O -H64m -O2 -haddock -fPIC -fexternal-dynamic-refs -Wno-deprecated-flags -Wno-trustworthy-safe
===> Command failed with error code: 1
/nix/store/s8jpc5gis5vkdwws88k7385il7xyvmk5-powerpc64-unknown-linux-gnuabielfv2-binutils-2.44/bin/powerpc64-unknown-linux-gnuabielfv2-ld.gold: error: /build/ghc50384_0/ghc_5.p_o: ABI version 2 is not compatible with ABI version 1 output
`powerpc64-unknown-linux-gnuabielfv2-ld.gold' failed in phase `Merge objects'. (Exit code: 1)

$ nix-build -A pkgsCross.ppc64-musl.haskellPackages.hello
Command line: _build/stage0/bin/powerpc64-unknown-linux-musl-ghc -Wall -Wcompat -hisuf p_hi -osuf p_o -hcsuf p_hc -static -prof -hide-all-packages -no-user-package-db '-package-env -' '-package-db _build/stage1/inplace/package.conf.d' '-this-unit-id ghc-prim-0.11.0-c1f3' '-package-id rts-1.0.2' -i -i/build/ghc-9.8.4-source/_build/stage1/libraries/ghc-prim/build -i/build/ghc-9.8.4-source/_build/stage1/libraries/ghc-prim/build/autogen -i/build/ghc-9.8.4-source/libraries/ghc-prim -Irts/include -I_build/stage1/libraries/ghc-prim/build -I/nix/store/pwjnbwn7nw6xhvrlc886a7g9325772dc-numactl-powerpc64-unknown-linux-musl-2.0.18-dev/include -I/nix/store/7h3s5avyxd0dw122z7brmngjcxil4b9p-libffi-powerpc64-unknown-linux-musl-3.5.1-dev/include -I/build/ghc-9.8.4-source/rts/include -I/build/ghc-9.8.4-source/_build/stage1/rts/build/include -optP-include -optP_build/stage1/libraries/ghc-prim/build/autogen/cabal_macros.h -outputdir _build/stage1/libraries/ghc-prim/build -fdiagnostics-color=always -this-unit-id ghc-prim -XHaskell2010 -no-global-package-db -package-db=/build/ghc-9.8.4-source/_build/stage1/inplace/package.conf.d -ghcversion-file=rts/include/ghcversion.h -ghcversion-file=rts/include/ghcversion.h -Wnoncanonical-monad-instances -optc-Wno-error=inline -c libraries/ghc-prim/GHC/Types.hs -o _build/stage1/libraries/ghc-prim/build/GHC/Types.p_o -fsplit-sections -O -H64m -O2 -haddock -fPIC -fexternal-dynamic-refs -Wno-deprecated-flags -Wno-trustworthy-safe
===> Command failed with error code: 1
/nix/store/sw4y4qs45mss9wcqlzlb4n7rdzz23wm2-powerpc64-unknown-linux-musl-binutils-2.44/bin/powerpc64-unknown-linux-musl-ld: /build/ghc51228_0/ghc_5.p_o: ABI version 2 is not compatible with ABI version 1 output
/nix/store/sw4y4qs45mss9wcqlzlb4n7rdzz23wm2-powerpc64-unknown-linux-musl-binutils-2.44/bin/powerpc64-unknown-linux-musl-ld: failed to merge target specific data of file /build/ghc51228_0/ghc_5.p_o
`powerpc64-unknown-linux-musl-ld' failed in phase `Merge objects'. (Exit code: 1)

@OPNA2608
Copy link
Contributor Author

ppc64 ELFv2 cross GHC might need https://gitlab.haskell.org/ghc/ghc/-/commit/ead75532c9dc915bfa9ebaef0ef5d148e793cc0a, or smth similar / older but related to it, applied/backported to the various source-built GHC versions that we support. Will see if I can find the time to look into that.

Maybe interesting to @minijackson as well?

@OPNA2608 OPNA2608 added the 6.topic: exotic Exotic hardware or software platform label Nov 14, 2025
@OPNA2608
Copy link
Contributor Author

OPNA2608 commented Nov 16, 2025

#462247 will fix pkgsCross.ppc64-elfv2.haskellPackages.hello, but needs some work still. Might also fix ppc64-musl, haven't tried that yet though. Checked, also fixes pkgsCross.ppc64-musl.haskellPackages.hello.

Copy link
Member

@minijackson minijackson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There isn't any support guarantee for ppc64be, so I think this PR is perfectly fine as it is. I think the failing packages can be fixed on their own time, in subsequent PRs.

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Nov 17, 2025
@OPNA2608
Copy link
Contributor Author

OPNA2608 commented Dec 1, 2025

@SuperSandro2000, anything against merging this? You asked for opinions on this in the #cross-compiling:nixos.org Matrix channel awhile ago, but I don't think anything ever came out of that.

@OPNA2608
Copy link
Contributor Author

Okay well, I got asked to submit this in the first place, and I'm not aware of any restrictions that apply to adding cross-trunk jobset tests… And I'm somewhat actively working on fixing stuff.

Prolly fine to merge… If not, please revert. I'll blame the radio silence xP.

@OPNA2608 OPNA2608 added this pull request to the merge queue Dec 16, 2025
Merged via the queue into NixOS:master with commit f2ef986 Dec 16, 2025
41 checks passed
@OPNA2608 OPNA2608 deleted the init/ppc64-release-cross-tools branch December 16, 2025 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: cross-compilation Building packages on a different platform than they will be used on 6.topic: exotic Exotic hardware or software platform 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants