phoityne / haskell-debug-adapter

Debug Adapter for Haskell debugging system.
https://hackage.haskell.org/package/haskell-debug-adapter
BSD 3-Clause "New" or "Revised" License
54 stars 8 forks source link

Fails to `cabal install ghci-dap haskell-debug-adaptor` in `nix-shell` #23

Closed FrankC01 closed 3 years ago

FrankC01 commented 3 years ago

OS: Ubuntu 20.04.3 LTS (in VMFusion 12) nix: 2.3.15 cabal: 3.4.0.0

sudo apt install zlib1g-dev export PATH=/usr/include:/usr/lib/x86_64-linux-gnu:$PATH

  1. nix-shell
  2. cabal v2-install ghci-dap haskell-debug-adapter

Results:

Configuring library for zlib-0.6.2.3..
cabal: Missing dependency on a foreign library:
* Missing (or bad) header file: zlib.h
* Missing (or bad) C library: z
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.If the
library file does 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.
If the header file does 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.

cabal: Failed to build zlib-0.6.2.3 (which is required by
exe:haskell-debug-adapter from haskell-debug-adapter-0.0.35.0). See the build
log above for details.
phoityne commented 3 years ago

Hi.

Might be same issue. https://github.com/haskell/cabal/issues/6228

Regards.

FrankC01 commented 3 years ago

@phoityne The solution provided there:

  1. Before going into nix-shell
  2. nix-env -iA nixpkgs.zlib.dev
  3. nix-shell
  4. cabal install ghci-dap haskell-debug-adapter

Worked!

Thank you for the reference