Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A readme/installation doc about deployment requirements. #18

Open
mmzx opened this issue Mar 25, 2020 · 3 comments
Open

A readme/installation doc about deployment requirements. #18

mmzx opened this issue Mar 25, 2020 · 3 comments

Comments

@mmzx
Copy link

mmzx commented Mar 25, 2020

The Issue I had: Linking against lzma package under a freshly installed debian-10.3.0

lzma> Configuring lzma-0.0.0.3...
lzma> Cabal-simple_mPHDZzAJ_3.0.1.0_ghc-8.8.3: Missing dependency on a foreign
lzma> library:    
lzma> * Missing (or bad) header file: lzma.h
lzma> * Missing (or bad) C library: lzma
lzma> This problem can usually be solved by installing the system package that
lzma> provides this library (you may need the "-dev" version). If the library is
lzma> already installed but in a non-standard location then you can use the flags
lzma> --extra-include-dirs= and --extra-lib-dirs= to specify where it is.If the
lzma> library file does exist, it may contain errors that are caught by the C
lzma> compiler at the preprocessing stage. In this case you can re-run configure
lzma> with the verbosity flag -v3 to see the error messages.
lzma> If the header file does exist, it may contain errors that are caught by the C
lzma> compiler at the preprocessing stage. In this case you can re-run configure
lzma> with the verbosity flag -v3 to see the error messages.
lzma>

The solution:
apt install liblzma-dev

The proposal:

Personally I am inexperienced with debian like package management and it would have been nice to have a quick readme what I would have needed to do right away to be able to link the lzma package successfully.

This ticket is just a tiny bit of fragment now, but if there was enough content and a file to host such documentation I would be happy to help further.

@mmzx mmzx changed the title A readme/instalation doc about deployment requirements. A readme/installation doc about deployment requirements. Mar 25, 2020
@hvr
Copy link
Collaborator

hvr commented May 11, 2020

Well, there's various distros, and it doesn't really scale for every FFI package to repeat the very same boilerplate in their README; hence why cabal is trying emit a generic message that applies more generally to this.

Maybe we should have a Wiki page the cabal message could link too, to go into more detail what

This problem can usually be solved by installing the system package that provides this library (you may need the "-dev" version)

entails for different Linux distros (and also non-Linux OS).

@georgefst
Copy link

apt install liblzma-dev

Thanks @mmzx! This just saved my when trying to build ghcup (which depends on this lib) on Ubuntu, where I thought installing apt install lzma-dev would be enough. In hindsight apt list *lzma* would have been a good idea, but it is easy to get stumped by this.

Anyway, I don't really have a suggestion - obviously it wouldn't be productive to list the subtleties for every possible distro...

@mmzx
Copy link
Author

mmzx commented Sep 15, 2020

Having it amongst the issues is also not appropriate. Though, I am glad you have been able to find this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants