Anut-py / h-raylib

Haskell bindings for raylib
https://hackage.haskell.org/package/h-raylib
Apache License 2.0
84 stars 14 forks source link

cabal file does not specify dependency on X11/extensions/Xge.h #8

Open ramirez7 opened 1 year ago

ramirez7 commented 1 year ago

I saw that the Xext dependency was removed recently https://github.com/Anut-py/h-raylib/commit/5a09c28bac06adbf1b2891152c52d2f36ceeb7be

But when building 4.5.0.7 with macaroni.nix, it fails due to that dependency not being declared:

Configuring library for h-raylib-4.5.0.7..
building
Preprocessing library for h-raylib-4.5.0.7..
Building library for h-raylib-4.5.0.7..
[1 of 4] Compiling Raylib.Types     ( src/Raylib/Types.hs, dist/build/Raylib/Types.o, dist/build/Raylib/Types.dyn_o )
[2 of 4] Compiling Raylib.Colors    ( src/Raylib/Colors.hs, dist/build/Raylib/Colors.o, dist/build/Raylib/Colors.dyn_o )
[3 of 4] Compiling Raylib.Util      ( src/Raylib/Util.hs, dist/build/Raylib/Util.o, dist/build/Raylib/Util.dyn_o )
[4 of 4] Compiling Raylib           ( src/Raylib.hs, dist/build/Raylib.o, dist/build/Raylib.dyn_o )
In file included from raylib/src/external/glfw/src/x11_platform.h:48,
                 from raylib/src/external/glfw/src/platform.h:62,
                 from raylib/src/external/glfw/src/internal.h:331,
                 from raylib/src/external/glfw/src/init.c:30,

                 from raylib/src/rglfw.c:61:0: error: 

/nix/store/r0pzhgq3l9mfhc67gxc7aarv15pjshql-libXi-1.8-dev/include/X11/extensions/XInput2.h:32:10: error:
     fatal error: X11/extensions/Xge.h: No such file or directory
       32 | #include <X11/extensions/Xge.h>
          |          ^~~~~~~~~~~~~~~~~~~~~~
   |
32 | #include <X11/extensions/Xge.h>
   |          ^
compilation terminated.
`cc' failed in phase `C Compiler'. (Exit code: 1)
error: builder for '/nix/store/w7yzb3cdb5lvkr57llyvy2i28ay8z1j0-h-raylib-lib-h-raylib-4.5.0.7.drv' failed with exit code 1;
       last 10 log lines:
       >
       > /nix/store/r0pzhgq3l9mfhc67gxc7aarv15pjshql-libXi-1.8-dev/include/X11/extensions/XInput2.h:32:10: error:
       >      fatal error: X11/extensions/Xge.h: No such file or directory
       >        32 | #include <X11/extensions/Xge.h>
       >           |          ^~~~~~~~~~~~~~~~~~~~~~
       >    |
       > 32 | #include <X11/extensions/Xge.h>
       >    |          ^
       > compilation terminated.
       > `cc' failed in phase `C Compiler'. (Exit code: 1)
       For full logs, run 'nix log /nix/store/w7yzb3cdb5lvkr57llyvy2i28ay8z1j0-h-raylib-lib-h-raylib-4.5.0.7.drv'.
error: 1 dependencies of derivation '/nix/store/q9mawhklkbnpi65h7r88va5672fdwgbd-h-raylib-minimal-exe-h-raylib-minimal-0.1.0.0.drv' failed to build
make: *** [Makefile:2: build] Error 1

For now, 4.5.0.3 seems to build fine.

Anut-py commented 1 year ago

This issue was supposed to propagate Xext from Xi, I'm not sure why this isn't working.

ramirez7 commented 1 year ago

Thanks for the link! I'll look into it - I'm using nixpkgs-unstable + haskell.nix, but maybe it is lagging behind and hasn't picked up that PR yet.

ramirez7 commented 1 year ago

Looks like my the nixpkgs-unstable in haskell.nix is from September https://github.com/NixOS/nixpkgs/commit/e14f9fb57315f0d4abde222364f19f88c77d2b79. I'lll try bumping and see if that fixes it

Anut-py commented 1 year ago

@ramirez7 Any updates on this?

ramirez7 commented 1 year ago

Not yet. I'll give it a go next week (I'm focused on preparing for Ludum Dare 52 this week!)

ramirez7 commented 1 year ago

I tried h-raylib 4.5.0.4 and got the same error

Anut-py commented 1 year ago

Ok, I'll check with nixpkgs to find out what's wrong. I'll add Xext back in in the next version.

Anut-py commented 1 year ago

I added Xext again in version 4.5.1.0

ramirez7 commented 1 year ago

Nice! I'll bump my h-raylib example.