Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 01 Oct 2014, 16:55
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Engineering/Science/Simulation
How to install the Glasgow Haskell Compiler (ghc)?
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
Ginkolo

Joined: 30 Oct 2010
Posts: 1

PostPosted: Sat 30 Oct 2010, 08:40    Post_subject:  How to install the Glasgow Haskell Compiler (ghc)?  

Hi Puppy Community,
i installed the debian package of the ghc but it seems not to work, nothing happens when i type the command "ghc" into the terminal (it shows "command not found").
Does anyone have an idea what i can do ?
Back to top
View user's profile Send_private_message 
edoc


Joined: 07 Aug 2005
Posts: 4377
Location: Southeast Georgia, USA

PostPosted: Tue 02 Nov 2010, 10:18    Post_subject:  

What is, ghc, please?

I tried a search for a c or c++ compiler that is Puppy-friendly and your post was one of the results.

Thanks!

Found the answer:

Quote:
The Glasgow Haskell Compiler is a robust, fully-featured, optimising compiler for the functional programming language Haskell. GHC compiles Haskell to either native code or C. It implements numerous experimental language extensions to Haskell for example concurrency, a foreign language interface, several type-system extensions, exceptions, and so on. GHC comes with a generational garbage collector, a space and time profiler, and a comprehensive set of libraries

_________________
Thanks! David
Home page: http://nevils-station.com
Don't google Search! http://duckduckgo.com
Puppy upup Raring 3992 & Lighthouse64-b602

Edited_time_total
Back to top
View user's profile Send_private_message Visit_website 
amigo

Joined: 02 Apr 2007
Posts: 2252

PostPosted: Tue 02 Nov 2010, 13:47    Post_subject:  

Check the package contents -the executable program may not be named exactly 'ghc'.
Back to top
View user's profile Send_private_message 
emil

Joined: 10 Nov 2009
Posts: 618
Location: Austria

PostPosted: Tue 02 Nov 2010, 19:05    Post_subject: GHC sfs package
Sub_title: made in Puppy 431 dont know for the newer branches
 

Hello Ginkolo,

I made a sfs package of the ghc system. It includes all sources and also a lot of documentatio. So it is rather large ~110 MB.

Download of ghc-12.6.1.sfs

Executables are in /usr/local/bin.
You can start the compiler mode with ghc-6.12.1 and the interpreter mode with ghci-6.12.1 from terminal. Later I saw that I didn't got the latest stable release which is version 6.12.3, hrmmmpf ...

However If you want to keep up-to-date this should help you building on your own (you will need the devx.sfs)
Cookbook:
I downloaded the package "for all Linux distros" ghc-6.12.1.20100329-i386-unknown-linux.tar.bz2

open terminal in your download location ([Tab] means press Tab for autocompletion of name) and then type the following commands:

Code:
# tar xjvf ghc-[Tab]
# cd ghc-[Tab]
# ./configure                      (*)
# new2dir make install       (**)
# cd ..
# mksquashfs ghc-12.6.1-i468 ghc-12.6.1.sfs (***)


Ok, the stars indicate that it was not completely straightforward, at
* it complained for a missing libgmp.so.3
and at ** it complained about missing libtinfo.so which turned out that libtinfo is included in libncursesw and so I downloaded the libraries from
http://www.puppylinux.ca/tpp/ttuuxxx/Libs/
and symlinked libtinfo.so to libncursesw.so like this

Code:
# ln -s libncursesw.so.5 libtinfo.so.5
# ln -s libtinfo.so.5 libtinfo.so


then I put the missing libraries in /usr/lib. I guess it is better to include them also in the sfs package, therefore i copied them into /ghc-12.6.1-i486/usr/lib before the mksquashfs command (thats why there is the (***)).
Build took about 30 minutes on my dual core machine ...

I doubt that it will work in Lupu but you can try, otherways the above cookbook should give you a starter to build your own version (there is also a ubuntu binary on their server, but binaries don't always work so well).

Edit: Oh, I forgot: Welcome to the puppy forum!

Edited_time_total
Back to top
View user's profile Send_private_message Visit_website 
Rockdtben

Joined: 20 Sep 2011
Posts: 2

PostPosted: Tue 20 Sep 2011, 09:10    Post_subject: Re: GHC sfs package
Sub_title: made in Puppy 431 dont know for the newer branches
 

emil wrote:
Hello Ginkolo,

I made a sfs package of the ghc system. It includes all sources and also a lot of documentatio. So it is rather large ~110 MB.

Download of ghc-12.6.1.sfs

You can start the compiler mode with ghc and the interpreter mode with ghci from terminal. Later I saw that I didn't got the latest stable release which is version 6.12.3, hrmmmpf ...

However If you want to keep up-to-date this should help you building on your own (you will need the devx.sfs)
Cookbook:
I downloaded the package "for all Linux distros" ghc-6.12.1.20100329-i386-unknown-linux.tar.bz2

open terminal in your download location ([Tab] means press Tab for autocompletion of name) and then type the following commands:

Code:
# tar xjvf ghc-[Tab]
# cd ghc-[Tab]
# ./configure                      (*)
# new2dir make install       (**)
# cd ..
# mksquashfs ghc-12.6.1-i468 ghc-12.6.1.sfs (***)


Ok, the stars indicate that it was not completely straightforward, at
* it complained for a missing libgmp.so.3
and at ** it complained about missing libtinfo.so which turned out that libtinfo is included in libncursesw and so I downloaded the libraries from
http://www.puppylinux.ca/tpp/ttuuxxx/Libs/
and symlinked libtinfo.so to libncursesw.so like this

Code:
# ln -s libncursesw.so.5 libtinfo.so.5
# ln -s libtinfo.so.5 libtinfo.so


then I put the missing libraries in /usr/lib. I guess it is better to include them also in the sfs package, therefore i copied them into /ghc-12.6.1-i486/usr/lib before the mksquashfs command (thats why there is the (***)).
Build took about 30 minutes on my dual core machine ...

I doubt that it will work in Lupu but you can try, otherways the above cookbook should give you a starter to build your own version (there is also a ubuntu binary on their server, but binaries don't always work so well).

Edit: Oh, I forgot: Welcome to the puppy forum!



Hey I have two problems with this solution.

One your "Download of ghc-12.6.1.sfs" link says I am forbidden when I to download the file.
Two the other link in the post doesn't work. (http://www.puppylinux.ca/tpp/ttuuxxx/Libs/)

So I tried on my own to follow your directions using other libs and I just got stuck. Maybe I am doing it wrong. The .so.5 files are just pointing to the actual file?

I'm interested in installing xmonad on puppy and I need ghc for this. Any help on this?
Back to top
View user's profile Send_private_message 
emil

Joined: 10 Nov 2009
Posts: 618
Location: Austria

PostPosted: Wed 21 Sep 2011, 17:46    Post_subject: Links not working  

Ok, the first problem I could easily solve Very Happy , I had to set file permissions right on the server (chmod 644). So the download link for the sfs should work now.

The needed libraries should be contained in the sfs. I just included the links as a comment how I got it to run back then, so if anyone compiles a new version and has similar problems there is a clue how to solve it.

If you have to recompile and need to download those libraries then the 2nd problem is that puppylinux.ca repository was closed some times ago Sad .
Big loss for this community, but I think the libraries of tuxx are available elsewhere. Maybe search this forum, or send a private message to forum member tuxx (and post link here).

So good luck, as stated I made this in Puppy 431 don't know about newer version. I hope it works for you!
kind regards
emil Cool

PS: about the symlinks, If I recall correctly

Code:
# ln -s libncursesw.so.5 libtinfo.so.5
# ln -s libtinfo.so.5 libtinfo.so


produces a symlink libtinfo.so which points to a symlink libtinfo.so.5 which points to libncursesw.so.5 (this is the actual library file)

But if you recompile ghc in another (newer) Puppy version those libraries may actually be present and maybe you get other hickups. Watch the error messages!
Back to top
View user's profile Send_private_message Visit_website 
Rockdtben

Joined: 20 Sep 2011
Posts: 2

PostPosted: Tue 27 Sep 2011, 23:01    Post_subject:  

Thank you, your .sfs file worked for me. Although I didn't get xmonad to install properly yet. I am still working on it.
Back to top
View user's profile Send_private_message 
emil

Joined: 10 Nov 2009
Posts: 618
Location: Austria

PostPosted: Mon 17 Oct 2011, 14:30    Post_subject:  

I noticed, one will probably need the runhaskell command for the build instructions.

In this package this is runghc
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Engineering/Science/Simulation
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0737s ][ Queries: 12 (0.0046s) ][ GZIP on ]