From: Bone Baboon <bone.baboon@disroot.org>
To: help-guix@gnu.org
Subject: Haskell program build and run using Cabal
Date: Sat, 10 Apr 2021 23:23:42 -0400 [thread overview]
Message-ID: <87sg3xec75.fsf@disroot.org> (raw)
I am trying to build a Haskell program from source and run it. I am
using Cabal a Haskell build tool to do this. I am able to build and run
this program without the following error messages on other Linux
operating systems.
`cabal --version` outputs:
```
cabal-install version 2.4.0.0
compiled using version 2.4.0.1 of the Cabal library
```
I have installed GHC a Haskell compiler. When I run `ghc --version` it
outputs:
```
The Glorious Glasgow Haskell Compilation System, version 8.6.5
```
When I run `cabal new-build` it outputs:
```
cabal: Use of GHC's environment variable GHC_PACKAGE_PATH is incompatible with Cabal. Use the flag --package-db to specify a package database (it can be used multiple times).
```
After running `unset GHC_PACKAGE_PATH` I can build the program with
`cabal new-build`. `unset GHC_PACKAGE_PATH` does not persist across
different terminal emulator instances.
Then when I try to run the program using `cabal new-run` I get this
error message:
```
error while loading shared libraries: libgmp.so.10: cannot open shared object file: No such file or directory
```
I added `gmp` to my system configuration and reconfigured the system.
However the error persists.
The command `locate libgmp.so.10` shows that libgmp.so.10 is in the
store.
Doing an internet search for this error message shows people dealing
with it by setting environment variables.
With Cabal's `new-build` and `new-run` commands I am running into issues
with environment variables. Are environment variables managed in Guix
system configurations? I searched the Guix manual for the search term
"environment variable" and did not see a prominent section on
environment variables. That leads me to guess that in Guix environment
variables are left to configuration files in the users home directory.
next reply other threads:[~2021-04-11 3:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-11 3:23 Bone Baboon [this message]
2021-04-11 13:12 ` Haskell program build and run using Cabal Gary Johnson
2021-04-11 16:11 ` John Soo
2021-04-11 17:31 ` Bone Baboon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sg3xec75.fsf@disroot.org \
--to=bone.baboon@disroot.org \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).