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

cabalPkgConfigWrapper is broken for cross-compilation #1666

Closed
ramirez7 opened this issue Sep 13, 2022 · 2 comments
Closed

cabalPkgConfigWrapper is broken for cross-compilation #1666

ramirez7 opened this issue Sep 13, 2022 · 2 comments
Labels
bug Something isn't working wontfix

Comments

@ramirez7
Copy link
Contributor

mingwW64 in my case.

This is caused by #1641 (@hamishmack)


https://gitlab.com/macaroni.dev/macaroni.nix/-/merge_requests/12

^ You can try the sdl2-minimal example in this branch. make windows will do x-compilation. The Linux build (make build) works fine.

It will fail to resolve the sdl2 pkgconfig-depends despite that library being mapped in haskell.nix itself explicitly. This points to something being off in haskell.nix.

Resolving dependencies...
Error: cabal: Could not resolve dependencies:
[__0] trying: sdl2-minimal-0.1.0.0 (user goal)
[__1] trying: sdl2-2.5.3.3 (dependency of sdl2-minimal)
[__2] rejecting: sdl2:+recent-ish (conflict: pkg-config package sdl2>=2.0.10,
not found in the pkg-config database)
[__2] rejecting: sdl2:-recent-ish (conflict: pkg-config package sdl2>=2.0.6,
not found in the pkg-config database)
[__2] fail (backjumping, conflict set: sdl2, sdl2:recent-ish)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: sdl2, sdl2:recent-ish, sdl2-minimal

Error: cabal: Could not resolve dependencies:
trace: ERROR: cabal configure failed with:
Warning: The package list for 'hackage.haskell.org-at-2022-09-12T000000Z' is
19248 days old.
Run 'cabal update' to get the latest list of available packages.
Resolving dependencies...
Error: cabal: Could not resolve dependencies:
[__0] trying: sdl2-minimal-0.1.0.0 (user goal)
[__1] trying: sdl2-2.5.3.3 (dependency of sdl2-minimal)
[__2] rejecting: sdl2:+recent-ish (conflict: pkg-config package sdl2>=2.0.10,
not found in the pkg-config database)
[__2] rejecting: sdl2:-recent-ish (conflict: pkg-config package sdl2>=2.0.6,
not found in the pkg-config database)
[__2] fail (backjumping, conflict set: sdl2, sdl2:recent-ish)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: sdl2, sdl2:recent-ish, sdl2-minimal
@ramirez7
Copy link
Contributor Author

fwiw, setting evalPackages = pkgs in my cabalProject call fixes this. Here's an example.

Not sure if there are any side-effects to that I should know about, but things are working e2e cross-compiling to mingwW64.

@yvan-sraka yvan-sraka added the bug Something isn't working label Sep 20, 2022
jbgi added a commit to IntersectMBO/plutus that referenced this issue Oct 4, 2022
 To correctly eval the haskell.nix project we need the pkgs for the current
 system, not the cross system one.

 cf. input-output-hk/haskell.nix#1666
@stale
Copy link

stale bot commented Jan 18, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jan 18, 2023
@stale stale bot closed this as completed Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix
Projects
None yet
Development

No branches or pull requests

2 participants