LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-18-2017, 04:54 AM   #1
Southern Gorilla
Member
 
Registered: Dec 2016
Location: Arlington, TX
Distribution: Slackware 14.1
Posts: 66

Rep: Reputation: Disabled
Haskell platform can't find itself


I downloaded the tar and ran the script per the instructions. It seems to have installed successfully. But when I tried installing something I got this error;
Code:
bash-4.3$ cabal install xmonad
Config file path source is default config file.
Config file /home/ghostotw/.cabal/config not found.
Writing default configuration to /home/ghostotw/.cabal/config
cabal: The program 'ghc' version >=6.4 is required but the version of
/usr/local/bin/ghc could not be determined.
Is it missing a .pc file or something? Or did I miss a step somewhere?
 
Old 01-18-2017, 11:50 AM   #2
TheEzekielProject
Member
 
Registered: Dec 2016
Distribution: Devuan+lxde
Posts: 656

Rep: Reputation: 190Reputation: 190
Quote:
Originally Posted by Southern Gorilla View Post
I downloaded the tar and ran the script per the instructions. It seems to have installed successfully. But when I tried installing something I got this error;
Code:
bash-4.3$ cabal install xmonad
Config file path source is default config file.
Config file /home/ghostotw/.cabal/config not found.
Writing default configuration to /home/ghostotw/.cabal/config
cabal: The program 'ghc' version >=6.4 is required but the version of
/usr/local/bin/ghc could not be determined.
Is it missing a .pc file or something? Or did I miss a step somewhere?
Try
Code:
ghc -V
 
Old 01-18-2017, 06:22 PM   #3
Southern Gorilla
Member
 
Registered: Dec 2016
Location: Arlington, TX
Distribution: Slackware 14.1
Posts: 66

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TheEzekielProject View Post
Try
Code:
ghc -V
I get this;
Code:
/usr/local/haskell/ghc-8.0.1-x86_64/lib/ghc-8.0.1/bin/ghc: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
 
Old 01-18-2017, 06:39 PM   #4
TheEzekielProject
Member
 
Registered: Dec 2016
Distribution: Devuan+lxde
Posts: 656

Rep: Reputation: 190Reputation: 190
You don't have ghc installed. Install it from your ditro's repositories and try again
 
Old 01-18-2017, 08:02 PM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,455

Rep: Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601
why are you trying to install from the source ?
there could be a ton of needed prerequisites that meed too be installed set up and working first

use your package manager

from source did you read the README as per the INSTRUCTIONS on the website
a copy of sed README :

as per the below file

did you install and set up GHC ?
Quote:



Haskell Platform
----------------

OVERVIEW
--------
"Haskell Platform" is a combination of the GHC compiler and core libraries,
plus additional tools and libraries covering a range of common programming
tasks. The platform is maintained and released so as to be a consistent, stable
base. It aims to be a quick way to a working Haskell environment, and a solid
foundation on which to base production software.

While end-users _can_ build the platform themselves, it is generally recommended,
if possible, to use the prebuilt binaries available from https://www.haskell.org/platform/

DISTRIBUTION
------------
The platform comes in several forms:

*source repo* - This is the source of the system that builds the platform. It
includes the file that defines the versions of GHC and other packages that make
up the platform. You can use this to build the platform from just a GHC bindist.

You can check out the official release from github:
http://github.com/haskell/haskell-platform
The master branch is always stable, and releases are tagged like "2014.2.0.0".
Development usually happens in other branches.

*source tarball* - This is a specially packaged version of the repo that
includes the sources of the packages that make up the platform, and excludes
some of the ancillary things in the source repo. You can use this to build
the platform without access to hackage or even an internet connection. You still
need a GHC bindist.

*installer* - For Windows and OS X, the platform is distributed as a standard
installer for the operating system. It contains a fully built version of the
platform, accompanying documentation, and additional scripts and files needed
to integrate well with the standard environment and development tools.

Running the installer is all you need to get a working Haskell environment.

*OS distribution packages* - For many Linux, BSD, and other similar Posix,
the platform has been packaged into packages for the local package manager.
These can be selected and installed, from the appropriate package repos, with
the standard package manager tools.

*generic bindist* - For Linux, there is a generic bindist. This is compiled
against standard versions of the common system libraries, and if your system
has those, you can generally just unpack this tarball, and run a script to
get it setup.


REQUIREMENTS FOR BUILDING
-------------------------
You need the platform build files, either from the *source repo* or the
*source tarball*. Build instructions are the same for either.

You need a GHC bindist that matches the OS you are compiling on. It must also
match the GHC version used by the platform, currently 7.10.3. You can get this
from:
https://www.haskell.org/ghc/download_ghc_7_10_3

The machine doing the build needs to have a working Haskell setup: Usually,
GHC (7.4 or later), Cabal (1.16 or later), and haddock and HsColour must be on
the $PATH.


BUILDING
--------
The platform is now built by a program called hptool. That tool is a shake based
build system that creates both the traditional haskell-platform source tarball,
and can build a complete, hermetic build of the platform for use in building OS
installer packages.

In either the source repo or unpacked source tarball, simply run this:

./platform.sh $PATH_TO_GHC_BINDIST_TARBALL

This will build the hptool itself, and then use that tool to build first the
platform source tarball, and finally the hermetic build of all the platform
packages.

If you are building for a Posix like system (Linux, or BSD), then you can add
the command line option --prefix to specify where, on the target system the
tree of built things will be placed. It defaults to "/usr/local/haskell". The
build will include another directory under that named "ghc-x.y.z-arch" and
everything will be installed under there.

Adding -j<n> (no space between the j and the number of cores) to the build invocation will enable building on multiple cores at
once.


INSTALLATION
------------
After the build completes, it will print instructions for how to take the build
product and install it on systems. The build products are in:
build/product

For OS X and Windows, the built product is just a standard installer. Copy it
to the target system and install it.

For Posix like systems, the built product is a tarball, which should be unpacked
at / (it includes the prefix spec'd in the build). Then, on the target, you
must run the activate-hs script in the installed bin dir, usually:
/usr/local/haskell/ghc-x.y.z-arch/bin/activate-hs
That script will do the final package registrations, and symlink all the command
line tools (ghc, haddock, etc..) into /usr/local/bin. Run the script with -n or
-? to find out more.

Last edited by John VV; 01-18-2017 at 08:04 PM.
 
Old 01-18-2017, 10:22 PM   #6
Southern Gorilla
Member
 
Registered: Dec 2016
Location: Arlington, TX
Distribution: Slackware 14.1
Posts: 66

Original Poster
Rep: Reputation: Disabled
I did exactly what I said in the first post. I followed the instructions here which only say I needed to download that "linux-generic" tarball and run the build script. According to the info at the top of that page it's supposed to install GHC as part of the process. I didn't get the actual source to compile myself.

I'll double-check when I get home, but I'm reasonably certain I did look for GHC and found it in /usr/bin.
 
Old 01-18-2017, 11:16 PM   #7
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 792

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
The error message you posted says that you are missing libtinfo.so.5
 
Old 01-19-2017, 01:31 AM   #8
Southern Gorilla
Member
 
Registered: Dec 2016
Location: Arlington, TX
Distribution: Slackware 14.1
Posts: 66

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by norobro View Post
The error message you posted says that you are missing libtinfo.so.5
Right. And I haven't bothered looking for it. I'm mainly confused as to how anything is missing when I used a build script that is supposed to install everything. The Haskell site advises against doing an actual build from source but I may have to go that route.
 
Old 01-20-2017, 09:19 AM   #9
Southern Gorilla
Member
 
Registered: Dec 2016
Location: Arlington, TX
Distribution: Slackware 14.1
Posts: 66

Original Poster
Rep: Reputation: Disabled
Found the solution here.
Just to preserve the answer and spread it around a bit, here's the code that fixed it;
Code:
ln -s /usr/lib64/libncurses.so.5 /usr/lib64/libtinfo.so.5
Everything was installed it just wasn't linked for some reason. Either that or the symlink is a workaround. The blog post I found this on is over six months old and the problem still exists. Is this something worthy of a bug report?
 
Old 01-20-2017, 11:36 AM   #10
TheEzekielProject
Member
 
Registered: Dec 2016
Distribution: Devuan+lxde
Posts: 656

Rep: Reputation: 190Reputation: 190
I have the same symlink on my system but I did not have to create it manually
 
Old 01-20-2017, 01:54 PM   #11
Southern Gorilla
Member
 
Registered: Dec 2016
Location: Arlington, TX
Distribution: Slackware 14.1
Posts: 66

Original Poster
Rep: Reputation: Disabled
I wonder why it didn't link on mine. Strange.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot find -lsndfile / libsndfile in 32-bit linux platform $shellCrypt Linux - Newbie 2 01-16-2015 09:16 AM
how to find linux server platform nuttynibbles Linux - Newbie 2 05-23-2010 09:13 AM
how to find out about platform, cpu info etc. nasridine Linux - Newbie 3 01-21-2010 01:51 AM
Python multi platform conform code: how to find out on which OS you are? browny_amiga Programming 3 11-13-2008 12:23 PM
command to find hardware platform? andrew.deackes Linux - Hardware 5 10-02-2006 06:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration