Trouble installing Timeplot in RHEL - haskell

When installing Timeplot in RHEL 6 using the following command
cabal install timeplot
I get the following error:
Data/Array/IArray.hs:1:14: Unsupported extension: Trustworthy

To install timeplot I needed to install the haskell-platform and cairo-devel package (from EPEL) with
sudo yum install haskell-platform cairo-devel
Then install gtk2hs-buildtools
cabal install gtk2hs-buildtools
Open a new terminal at this point to get the new $PATH that includes $HOME/.cabal/bin
You many need to manually install strptime-1.0.6, as strptime-1.0.7 gave me the following error
building strptime-1.0.7...
Data/Time/Parse.hsc:22:18:
Could not find module `Foreign.ForeignPtr.Unsafe':
Use -v to see a list of the files searched for.
Install strptime-1.0.6 with
cabal install strptime-1.0.6
Then install timeplot
cabal install timeplot

Timeplot probably depends on a newer array than what comes with the installed GHC or platform, and thus it tries to pull it off hackage. And the new array (that is selected by default) is not backwards compatible with older GHCs.

Related

Installing octave in termux, "Unable to correct problems, you have held broken packages"

I am trying to install octave from the "Its Pointless" repository mentioned in the termux wiki. The repository is added successfully as far as I can tell. However, when I try the command pkg install octave I get the error "octave Depends openblas" "octave Depends arpack-ng" "Unable to correct problems, you have held broken packages"
I have run dpkg --get-selections | grep held but it doesn't return anything.
When I try to run pkg install openblas it gives the error "openblas Depends libgcc but it is not installable"
When I try to run pkg install libgcc it gives the error "package libgcc is not available but is referred to by another package, this may mean the package is missing, has been obsoleted, or is only available from another source. However, the following packages replace it: ndk-sysroot"
After searching some more I did pkg install clang but I still get the same errors. ndk-sysroot has been installed during installation of clang.
I have done apt-get autoclean, apt-get autoremove and apt-get purge but that did not do anything.
What can I do to fix this problem and install octave on my phone?
The problem got solved by itself.
I tried pkg install octave again and got a response saying "The repository https://termux.net stable Release is no longer signed."
So I ran the command bash setup-pointless-repo.sh again.
And that was it! pkg install octave is now working.

Let Cabal-Install show the install plan

If I install a package using cabal install pkg then cabal will install all packages that pkg depends on. If there is a conflict with already installed packages then cabal shows which packages have to be installed freshly, which ones are updated and which installed ones will be broken.
Is there a way to get this list unconditionally instead of running the install procedure?
cabal install <pkg> --dry-run will print the packages that will be installed without actually performing any of the installation. It will not show this information though if the package is installed or similar.

I updated ghc to a new version, how do I automatically reinstall all cabal packages?

For instance, I've just updated ghc from 7.6.2 to 7.6.3 and would like just reinstall all the packages I had previously installed.
Running
cabal install world
will install all the previously installed packages. Some packages might not install, in which case one can delete them from ~/.cabal/world and run the command again, and install them again later when they are working again with that version of ghc.

How to fix Error 2 when trying to make haskell-platform?

I downloaded the Haskell-platform source from here: http://www.haskell.org/platform/linux.html, installed ghc, and did /.configure. However when I do sudo make, I get the following error:
Preprocessing library HUnit-1.2.4.2...
Test/HUnit/Base.hs:1:1:
Could not find module `Prelude'
Perhaps you haven't installed the profiling libraries for package `base'?
Use -v to see a list of the files searched for.
Error:
Building the HUnit-1.2.4.2 package failed
make: *** [build.stamp] Error 2
Does anyone knows how to fix this?
I'm trying to install on Ubuntu 12.04.1 LTS
Instead of trying to install from the sources, simply install the Ubuntu packages, which will be much simpler, with:
$ sudo apt-get install haskell-platform
If you need a local version of the documentation and the profiling libraries, install the additional packages with:
$ sudo apt-get install haskell-platform-doc haskell-platform-prof
Daniel Fisher's comment led me to the solution. You have to install all the profiling libraries for each of the ghc packages you have installed.
Just write
sudo apt-get install ghc*-prof
That's how it worked for me

How to upgrade gtk2hsC2hs?

I am trying cabal install glib-0.12.3 under my Ubuntu 11.10 using cabal-install 0.10.2. However, it shows the following error messages:
setup: The program gtk2hsC2hs version >=0.13.5 is required but the version
found at /usr/bin/gtk2hsC2hs is version 0.13.4
cabal: Error: some packages failed to install:
glib-0.12.3 failed during the configure step. The exception was:
ExitFailure 1
After half an hour's search, I cannot find where this gtk2hsC2hs is. I dug into places like http://code.haskell.org/gtk2hs/tools/c2hs/, but could not seem to find the right version.
How could I upgrade my gtk2hsC2hs? Thanks!
It's part of the gtk2hs-buildtools package.
$ cabal install gtk2hs-buildtools
(maybe with the --global flag, depends on how you want to install packages in general) should provide you with the newest version that should be able to build the latest gtk2hs packages.
Since the old gtk2hsC2hs is in /usr/bin, make sure that the new one is either installed there (replacing the old) or in a directory appearing before /usr/bin in your $PATH. A default cabal install installs executables (on Linux) in $HOME/.cabal/bin, so it would be a good idea to have that the first directory in the $PATH.

Resources