bsl / bsl/bindings-GLFW

Compilation issues on NixOS + Wayland

Open
#77 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
16
Forks
33
PR merge metrics
No merged PRs in 30d

Description

Hi!
I'm trying to use GLFW-b for a little practice project in Nix, but somehow this library fails to build. I get the following error:

```
❯ cabal build
Warning: The package list for 'hackage.haskell.org' is 19 days old.
Run 'cabal update' to get the latest list of available packages.
Resolving dependencies...
Build profile: -w ghc-9.6.6 -O1
In order, the following will be built (use -v for more details):
- bindings-GLFW-3.3.9.2 (lib) (requires build)
- GLFW-b-1.4.8.4 (lib) (requires build)
- Haskell-OpenGL-0.1.0.0 (exe:Haskell-OpenGL) (configuration changed)
Starting bindings-GLFW-3.3.9.2 (lib)

Failed to build bindings-GLFW-3.3.9.2. The failure occurred during the
configure step.
Build log (
/home/name/.cache/cabal/logs/ghc-9.6.6/bindings-GLFW-3.3.9.2-d2f35b21b8160c888c4e9e375534e12310bd80118bb81124345802c1e567737d.log
):
Configuring library for bindings-GLFW-3.3.9.2...
Error: [Cabal-4345]
Missing dependencies on foreign libraries:
* Missing (or bad) C libraries: X11, Xi, Xrandr, Xxf86vm, Xcursor, Xinerama
This problem can usually be solved by installing the system packages that provide these libraries (you may need the "-dev" versions). If the libraries are already installed but in a non-standard location then you can use the flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.If the library files do exist, it may contain errors that are caught by the C compiler at the preprocessing stage. In this case you can re-run configure with the verbosity flag -v3 to see the error messages.

Error: [Cabal-7125]
Failed to build bindings-GLFW-3.3.9.2 (which is required by exe:Haskell-OpenGL from Haskell-OpenGL-0.1.0.0). See the build log above for details.
```

It says I'm missing a couple X11 libraries, which makes sense as I'm running wayland (with xwayland enabled).
I'm not sure how to continue...

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the reported `cabal build` failure for bindings-GLFW-3.3.9.2 on NixOS with Wayland and Xwayland, then inspect the configure step and its missing X11 libraries. Determine whether the supported build path should be fixed or documented; done means the expected path is clear and a build succeeds or the limitation is explicitly recorded.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell, nixos
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.