Skip to content

cross: drop gfortran from fftw in cross-compilation overlay#1850

Merged
brianmcgillion merged 1 commit intotiiuae:mainfrom
vadika:fix/disable-fftw-fortran-cross
Mar 23, 2026
Merged

cross: drop gfortran from fftw in cross-compilation overlay#1850
brianmcgillion merged 1 commit intotiiuae:mainfrom
vadika:fix/disable-fftw-fortran-cross

Conversation

@vadika
Copy link
Copy Markdown
Contributor

@vadika vadika commented Mar 23, 2026

Summary

  • Remove gfortran from fftwFloat.nativeBuildInputs in the cross-compilation overlay
  • PipeWire → fftwFloat (fftw-single) → gfortran dependency chain forces cross-compilation of the entire Fortran toolchain for aarch64, which is not in the binary cache
  • Ghaf does not use FFTW Fortran bindings; the Fortran wrapper is only generated when docs are enabled (--disable-doc is already set for cross builds)

Test plan

  • nix build --dry-run .#packages.x86_64-linux.nvidia-jetson-orin-agx-debug-from-x86_64 no longer includes aarch64-unknown-linux-gnu-gfortran in derivations to build
  • Full cross build of Jetson Orin target succeeds
  • Audio (PipeWire) functionality unaffected on target

PipeWire depends on fftwFloat (fftw-single), which unconditionally
includes gfortran in nativeBuildInputs. This forces cross-compilation
of the entire Fortran toolchain (gfortran + binutils) for aarch64,
none of which is available in the binary cache.

Ghaf does not use FFTW Fortran bindings. The Fortran wrapper generation
in FFTW is only triggered when docs are enabled, and --disable-doc is
already set when withDoc is false (which it is for cross builds where
stdenv.cc.isGNU may differ).

Remove gfortran from fftwFloat.nativeBuildInputs in the cross overlay
to eliminate the unnecessary Fortran toolchain build.

Signed-off-by: vadik likholetov <vadikas@gmail.com>
@vadika vadika force-pushed the fix/disable-fftw-fortran-cross branch from 8cc34a9 to 795d826 Compare March 23, 2026 14:06
@vadika vadika requested a review from brianmcgillion March 23, 2026 14:06
Copy link
Copy Markdown
Contributor

@avnik avnik left a comment

Choose a reason for hiding this comment

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

Looks good. But maybe also add
.overlay { withDocs = false; }? to strip doc generation entriely?

@brianmcgillion
Copy link
Copy Markdown
Collaborator

Jenkins failing appears unrelated

@brianmcgillion brianmcgillion merged commit e421c26 into tiiuae:main Mar 23, 2026
31 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants