How to install ghc and base with profiling support, in Haskell Platform - haskell

This answer to the problem I'm having suggests running e.g. sudo apt-get install ghc-prof on Debian systems to install base libraries with profiling support. However I've installed Haskell Platform (through the 'Generic' option). How do I (re)install ghc/base with profiling support?

The Haskell Platform comes with profiling libraries for base. If you've installed the platform, and are using the platform-installed libraries, then you should "just" have it already. The only possibility is if you've still got your distro-installed GHC in your path, and are using that instead...

Related

How to downgrade cabal version in Haskell platform?

I've installed the Haskell platform which came with the 7.10.2 version of ghc and the 1.22.6.0 version of cabal. My favorite editor is Atom, so I've installed the ide-haskell and haskell-ghc-mod. Since the ghc-mod has some problems with cabal>=1.22, I need to downgrade cabal. Haskel platform came with an activate-hs script to switch versions but I didn't understand how it works.
The ./activate-hs script only switches between different already installed platform versions. So if you don't have a prior version of the platform installed it won't help. More generally, you should not probably not downgrade cabal versions, as often compilers are coupled to particular releases of cabal.
But if you did want to, the correct way would just be to create a sandbox and then run cabal-install cabal-install-1.20.2.0 or the like. You can then take the resultant binary and move it into your path directly.

How do I enable CUDA on the examples on the accelerate-examples package?

I've installed CUDA on my OSX Yosemite. I've downloaded the accelerate-examples package and compiled it with cabal install. It compiled correctly. When I ran the examples, though, I noticed they do not offer a option to run under CUDA. For example:
vh:accelerate-crystal apple1$ ./accelerate-crystal
EKG monitor started at: http://localhost:8000
accelerate-crystal (c) [2011..2013] The Accelerate Team
Usage: accelerate-crystal [OPTIONS]
Available backends:
* interpreter reference implementation (sequential)
This makes them run slow (and, obviously, beat the purpose). How do I enable CUDA on the compiled examples?
I think you just need to use the -fcuda flag when you Cabal install. This will install the acclerate-cuda package and enable the CUDA backend for all the examples (they seem to use the CUDA backend by default if it's enabled).

What is the "officially" recommended way of installing Haskell from source?

How does one install Haskell from source (on Red Hat) now?
The current page has broken links and conflicting advice.
From http://www.haskell.org/platform/linux.html
Get and install GHC 7.6.3 prior to building the platform
From http://www.haskell.org/ghc/download_ghc_7_6_3
For most users, we recommend installing the Haskell Platform instead of GHC. The current Haskell Platform release includes a recent GHC release as well as some other tools (such as cabal), and a larger set of libraries that are known to work together.
(the link to cabal-install is broken).
The broken link should be pointing to http://www.haskell.org/haskellwiki/Cabal-Install instead. If you want to install from source, you're first going to have to compile and install GHC from source, then you can install the Haskell Platform from its source.
I'm not really sure what conflicting information you're seeing, if you want to build from source you have to install GHC first. Alternatively, you can just install the Haskell Platform from the distributable (might not be possible on Red Hat) and it'll install GHC for you. Both are pretty straightforward.

Port a debian package to YUM for CentOS

I have a project that runs on Debian and uses many packages provided from the Debian repositories.
Because of demand, I've looked into porting the project to CentOS, but found that many of the packages I require are completely missing - at least 10 dependencies would have to be compiled manually at install time on the users machine.
My question is, what is the best way to create an installer for the user's machine? Should I use automake tools (with the standard ./configure, make, make install), to compile the required libraries, or is this a non-standard approach. Note that my app doesn't actually need to be compiled since it is written in Python, so is it weird to do a "make", when you're not compiling your own app?
Should the configure script just warn the user that package X is missing, and let them handle the rest?
Should I roll my own dependency checker by runng pkg-config manually a few times for each library required, and exit if something is missing?
I'm quite new to this, so any tips to get me moving in the right direction are appreciated.
Edit: I am familiar with RPM and yum for red hat base distros, but CentOS is missing many multimedia packages that I require. An example of one of my package dependencies is "liquidsoap" which is a programmable audio engine: http://savonet.sourceforge.net/
This is available on Debian, but not Redhat/Centos
See this link on CentOS package management.
http://wiki.centos.org/PackageManagement/Yum
CentOS is redhat based and does not use .deb packages by default. However apt package management has been ported to tons of platforms, you may be able to use a port for centOS
If you use YUM whatever packages you need will be there for your application as redhat distros need all the same things that any other distro does.
EDIT: To get the details out of comments
Packages not available on the target platform either have to be built (possibly as a port) on the target platform and then shipped in the ported package (in this case YUM), or code needs to be modified and forked to use packages which already are available on the target platform. The choice depends on which is worse, or which is even possible given your constraints.

Is it possible to install the Haskell Platform on CentOS?

I'm running CentOS 5.5 and I want to install the Haskell Platform there. According to haskell.org CentOS is not supported at all (http://hackage.haskell.org/platform/linux.html). Does anyone know if it is possible to setup Haskell on CentOS 5.5? I searched the web but could not find any relevant information myself.
Try compiling from source. This is the recommended way to install the Haskell platform when there is no binary package for your OS. This guy was able to build it for CentOS 5.2.
Haskell Platform from source on Unix-like

Resources