Skip to content

Compilation issues on NixOS + Wayland #77

Description

@menaceinfrills

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions