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: haskellPackages.sdl2-gfx #260863

Closed
locallycompact opened this issue Oct 13, 2023 · 2 comments
Closed

Build failure: haskellPackages.sdl2-gfx #260863

locallycompact opened this issue Oct 13, 2023 · 2 comments
Assignees
Labels
0.kind: build failure A package fails to build

Comments

@locallycompact
Copy link
Contributor

Hi. I'm not sure when this began failing to build. This was working at some point.

https://hydra.nixos.org/log/mzkflkxx1ps6nimbwd483k52b87lqch3-sdl2-gfx-0.3.0.0.drv

@locallycompact locallycompact added the 0.kind: build failure A package fails to build label Oct 13, 2023
@locallycompact
Copy link
Contributor Author

locallycompact commented Oct 13, 2023

Bisecting yields this commit a83158c @sternenseemann

@sternenseemann sternenseemann self-assigned this Nov 5, 2023
@sternenseemann sternenseemann changed the title Build failure: haskellPackages.sdl2-gfx haskellPackages.mkDerivation: Cabal incorrectly fails to find SDL2 (instead of sdl2) if pkg config deps are propagated Nov 5, 2023
@sternenseemann
Copy link
Member

Using

nix-build -E 'with import ./. {}; with haskell.lib.compose; overrideCabal { __propagatePkgConfigDepends = true; configureFlags = [ "-v3" ]; } haskellPackages.sdl2-gfx'

the issue reveals itself: Cabal attempts a linker test using the found libraries via pkg-config which includes an -lSDL2 directive (thus the uppercase SDL2 in the error message). Due to propagation, the argument list is too long and execve will fail somewhere. Consequently, we'll have to employ similar workarounds as for the gi packages as shown in #265678.

@sternenseemann sternenseemann changed the title haskellPackages.mkDerivation: Cabal incorrectly fails to find SDL2 (instead of sdl2) if pkg config deps are propagated Build failure: haskellPackages.sdl2-gfx Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: build failure A package fails to build
Projects
None yet
Development

No branches or pull requests

2 participants