Gmp.h not found

I installed installed Chez Scheme and Idris2 and now I would like to install idris2-pack. For this end I used the command provided:

bash -c "$(curl -fsSL https://raw.githubusercontent.com/stefan-hoeck/idris2-pack/main/install.bash)"

But that fails with the following error:

./_datatypes.h:3:10: fatal error: 'gmp.h' file not found

I have installed the following related packages:

  • chez
  • gmp
  • idris
  • idris2

and gmp.h is installed:

  • /nix/store/aakpck7mmlzf9m9sf1hkp3bjkm90kxnq-gmp-with-cxx-6.3.0-dev/include/gmp.h
  • /nix/store/qzm3pxhfrh17mglh9afywg727i2b4vwd-gmp-with-cxx-6.3.0-dev/include/gmp.h

What do I have to do so that gmp.h can be found?

1 Like

Hi @waffle8946 , what is the relation between my problem and your link?

This issue will be solved with the next release 24.11:

Under NixOS 24.11 I can install pack but not update it:

Installed

gmp # GNU multiple precision arithmetic library
idris2 # A purely functional programming language with first class types
idris2Packages.idris2Api # Idris2 Compiler API Library
idris2Packages.idris2Lsp # Language Server for Idris2
idris2Packages.pack # An Idris2 Package Manager with Curated Package Collections

Update

~ pack update
...
In file included from casts.c:1:
In file included from ./casts.h:3:
In file included from ./cBackend.h:8:
./_datatypes.h:3:10: fatal error: 'gmp.h' file not found
    3 | #include <gmp.h>
      |          ^~~~~~~
1 error generated.
make[2]: *** [<eingebaut>: casts.o] Fehler 1
[ build ] make[2]: Verzeichnis „/home/klt/.pack/.tmp0/idris2-compiler/support/refc“ wird verlassen
make[1]: *** [Makefile:11: build-refc] Fehler 2
[ build ] make[1]: Verzeichnis „/home/klt/.pack/.tmp0/idris2-compiler/support“ wird verlassen
make: *** [Makefile:176: /home/klt/.pack/.tmp0/idris2-compiler/support/c/libidris2_support.so] Fehler 2
[ fatal ] Error when executing system command.
          Command: "make" "support" "PREFIX=/home/klt/.pack/install/f840d1b771be59000b478780dcfc1dfa2bfde624/idris2" "SCHEME=scheme"
          Error code: 2

Where can I get gmp.h from?