NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.1k stars 14.14k forks source link

Investigate waf issues #248425

Open AndersonTorres opened 1 year ago

AndersonTorres commented 1 year ago

Describe the bug

There are some issues on waf that deserve some study.

waf support on cross-compilation is doubtful

Steps To Reproduce

Steps to reproduce the behavior:

  1. Try to build e.g. pkgsStatic.fomp
  2. Puzzling error message: python not found
  3. Propagates Python
  4. ld can't link

Expected behavior

A static fomp

Screenshots

Additional context

Found while refactoring waf

https://github.com/NixOS/nixpkgs/pull/243758

Notify maintainers

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
output here
AndersonTorres commented 1 year ago

https://github.com/NixOS/nixpkgs/pull/249251#issuecomment-1703564306

lopsided98 commented 1 year ago

My impression was that waf cross-compilation mostly worked. I got cross-compilation working for samba and its related dependencies (which all use waf) several years ago (#113263), and they have worked since then. Have you found packages other than fomp that fail?

Artturin commented 1 year ago

The issue is that fomp has python3 in buildInputs instead of nativeBuildInputs.

AndersonTorres commented 1 year ago

More problematic packages:

https://github.com/NixOS/nixpkgs/pull/259253

Artturin commented 1 year ago

It's likely that all packages which vendor waflib (unless newer versions of it have fixed the issue) are broken.