Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure: libffi #279955

Closed
Maybegus opened this issue Jan 10, 2024 · 4 comments · Fixed by #280002
Closed

Build failure: libffi #279955

Maybegus opened this issue Jan 10, 2024 · 4 comments · Fixed by #280002

Comments

@Maybegus
Copy link

Steps To Reproduce

Steps to reproduce the behavior:

  1. build libffi-3.3

Build log

trying https://drivers.amd.com/drivers/linux/amdgpu-pro-21.30-1290604-ubuntu-20.04.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
Running phase: unpackPhase
unpacking source archive /nix/store/xf097h6i4i3dpg4dk45zzpkbfz6kw6cf-libffi-3.3.tar.gz
source root is libffi-3.3
setting SOURCE_DATE_EPOCH to timestamp 1574525816 of file libffi-3.3/doc/libffi.pdf
Running phase: patchPhase
applying patch /nix/store/bhg3i6gf8wq0x4v735ry3932cwyf7pih-fix-implicit-fun-decl.patch
patching file include/ffi_common.h
Hunk #1 succeeded at 103 with fuzz 2 (offset -25 lines).
can't find file to patch at input line 36
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/src/tramp.c b/src/tramp.c
|index 7e005b054..5f19b557f 100644
|--- a/src/tramp.c
|+++ b/src/tramp.c
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
1 out of 1 hunk ignored

...

error: builder for '/nix/store/zkfl27m3pvq3jgxhp3xwimfhdjn99yvr-libffi-3.3.drv' failed with exit code 1

Additional context

Fails as a dependency of amdgpu-pro

Notify maintainers

@tjni @trofi @armeenm

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"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.69, NixOS, 24.05 (Uakari), 24.05pre562833.5f64a12a7289`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@trofi
Copy link
Contributor

trofi commented Jan 10, 2024

Both libffi and libffi_3_3 build fine for me. linuxPackages_latest.amdgpu-pro does fail.

@trofi
Copy link
Contributor

trofi commented Jan 10, 2024

Oh:

    amdgpu-pro = callPackage ../os-specific/linux/amdgpu-pro {
      libffi = pkgs.libffi.overrideAttrs (orig: rec {
        version = "3.3";
        src = fetchurl {
          url = "https://github.com/libffi/libffi/releases/download/v${version}/${orig.pname}-${version}.tar.gz";
          sha256 = "0mi0cpf8aa40ljjmzxb7im6dbj45bb0kllcd09xgmp834y9agyvj";
        };
      });
    };

@fabaff fabaff changed the title Build failure: PACKAGENAME Build failure: libffi Jan 10, 2024
trofi added a commit to trofi/nixpkgs that referenced this issue Jan 10, 2024
Without the change `amdgpu-pro` tried to build `libffi-3.3` with patches
for `libffi-3.4` and failed as:

    patching file include/ffi_common.h
    Hunk NixOS#1 succeeded at 103 with fuzz 2 (offset -25 lines).
    can't find file to patch at input line 36

THe change uses `libffi_3_3` instead.

Closes: NixOS#279955
trofi added a commit to trofi/nixpkgs that referenced this issue Jan 10, 2024
Without the change `amdgpu-pro` tried to build `libffi-3.3` with patches
for `libffi-3.4` and failed as:

    patching file include/ffi_common.h
    Hunk NixOS#1 succeeded at 103 with fuzz 2 (offset -25 lines).
    can't find file to patch at input line 36

THe change uses `libffi_3_3` instead.

Closes: NixOS#279955
@trofi
Copy link
Contributor

trofi commented Jan 10, 2024

I would say the problem is not in libffi, but in amdgpu-pro. Proposed the possible fix as #280002

@trofi
Copy link
Contributor

trofi commented Jan 10, 2024

/cc @corngood

flandweber pushed a commit to flandweber/nixpkgs that referenced this issue Jan 21, 2024
Without the change `amdgpu-pro` tried to build `libffi-3.3` with patches
for `libffi-3.4` and failed as:

    patching file include/ffi_common.h
    Hunk NixOS#1 succeeded at 103 with fuzz 2 (offset -25 lines).
    can't find file to patch at input line 36

THe change uses `libffi_3_3` instead.

Closes: NixOS#279955
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants