Re: Error building ghc on raspberry pi.

2013-01-16 Thread Karel Gardas


Guys,

I've installed raspbian into ubuntu chroot on my panda. Now to simulate 
what GHC detects on your hardware, could you be so kind and send me 
output of:


uname -m
uname -r
uname -s
uname -v

this looks like a needed info for config.guess to detect machine 
hardware well.


Also if you send me output of:

sh config.guess

it would be great.

Everything of course run on your rpi board!

Thanks,
Karel

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Master thesis

2013-01-16 Thread Vikraman
Hi, I am looking to hack on ghc/haskell for my master thesis. What are some
areas that I should be looking into?

Any suggestions are welcome.


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: What is the scheduler type of GHC?

2013-01-16 Thread Simon Marlow

On 16/01/13 08:32, Magicloud Magiclouds wrote:

Hi,
   Just read a post about schedulers in erlang and go lang, which
informed me that erlang is preemptive and go lang is cooperative.
   So which is used by GHC? From ghc wiki about rts, if the question is
only within haskell threads, it seems like cooperative.


GHC is pre-emptive, but see http://hackage.haskell.org/trac/ghc/ticket/367.

Cheers,
Simon


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Master thesis

2013-01-16 Thread Tim Watson
Shameless plug: Cloud Haskell. See the links below for a list of open issues, 
some really complex, some really simple. Not sure if any are suitable for a 
master thesis, but feel free to look and see if there's anything meaty enough.

https://github.com/haskell-distributed/distributed-process/issues
https://github.com/haskell-distributed/distributed-process-platform/issues
https://github.com/haskell-distributed/distributed-process-platform/wiki/Contributing
 (same guidelines apply for both projects)

Versioning and conversion of serialized types (between versions) would be a 
boon to us if you could think of a neat way to do that. It would also come in 
handy for dphd I'm sure - see distributed-process-static and 
https://github.com/haskell-distributed/distributed-process/issues/106 for some 
of the reasons why we might want that.

On 16 Jan 2013, at 09:11, Vikraman wrote:

 Hi, I am looking to hack on ghc/haskell for my master thesis. What are some
 areas that I should be looking into?
 
 Any suggestions are welcome.
 
 
 ___
 Glasgow-haskell-users mailing list
 Glasgow-haskell-users@haskell.org
 http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-16 Thread Neil Davies
I looked at that route - the issue is that the emulator only has 256M of RAM 
(and that's not changeable) - so there are going to be build issues with the 
GHC tool chain - it was then that I moved to real hardware.

Neil

On 15 Jan 2013, at 17:01, rocon...@theorem.ca wrote:

 On Tue, 15 Jan 2013, Thijs Alkemade wrote:
 
 
 Op 15 jan. 2013, om 17:36 heeft rocon...@theorem.ca het volgende geschreven:
 
 Okay, I tried:
 
 SRC_HC_OPTS= -H64m -Rghc-timing -optc-mfloat-abi=hard 
 -optc-march=armv6 -optc-mfpu=vfp -optlc=-mattr=+vfp2
 GhcStage1HcOpts= -O -fllvm
 GhcStage2HcOpts= -O0 -fllvm
 GhcLibHcOpts   = -O -fllvm -optlc-float-abi=hard
 
 and I got the same error at a different build step.  I'm not sure if it is 
 earlier or later.
 
 It seems still not everything is using the hard-float ABI.
 
 ===--- building final phase
 make -r --no-print-directory -f ghc.mk phase=final all
 HC [stage 1] utils/hsc2hs/dist-install/build/tmp/hsc2hs
 /usr/bin/ld: error: utils/hsc2hs/dist-install/build/tmp/hsc2hs uses VFP 
 register arguments, utils/hsc2hs/dist-install/build/Main.o does not
 /usr/bin/ld: failed to merge target specific data of file 
 utils/hsc2hs/dist-install/build/Main.o
 ...
 
 Did you do a `make clean` first? If not, try removing just (some of) the 
 offending .o files, and see if rebuilding just those results in the same 
 error.
 
 I did a make clean first I'm afarid.
 
 -- 
 Russell O'Connor  http://r6.ca/
 ``All talk about `theft,''' the general counsel of the American Graphophone
 Company wrote, ``is the merest claptrap, for there exists no property in
 ideas musical, literary or artistic, except as defined by statute.''
 
 ___
 Glasgow-haskell-users mailing list
 Glasgow-haskell-users@haskell.org
 http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-16 Thread Neil Davies
Ok - I'll put up a machine in a DMZ sometime later today (RPi just arrived by 
post) .

I'll make it available on an non-standard ssh port - I suggest access via 
ssh-key only.

If you want to email me the appropriate line for .ssh/authorizedkeys please do. 
If you want to encrypt it with gpg, that's fine - use key id FF677414 
(neil.dav...@pnsol.com)

Neil


On 15 Jan 2013, at 17:16, Karel Gardas karel.gar...@centrum.cz wrote:

 
 Well, if you make some board available in DMZ I'm certainly interested to run 
 at least configure on it from GHC HEAD to see what we need to hack in order 
 to add support for RPi into GHC HEAD.
 
 Unfortunately GHC HEAD is now in a wrong state w.r.t. LLVM based build, but 
 Austin is working on this. I think I can hack support for RPi in the meantime 
 for testing later on fixed GHC HEAD LLVM build...
 
 Karel
 
 On 01/15/13 06:07 PM, rocon...@theorem.ca wrote:
 In theory we could try a couple variations of builds at the same time.
 But at the moment, I'm running low on ideas on what to try.
 
 I just got the, extensive, raspbian patches for 7.4.1 and I'm going to
 browse through them when I get time (apt-get source ghc).
 
 On Tue, 15 Jan 2013, Neil Davies wrote:
 
 Hi - would another RPi (or even 2 from tomorrow another one arriving)
 help?
 
 I can make them accessible (i.e. in our DMZ) -
 
 Neil
 
 On 15 Jan 2013, at 16:36, rocon...@theorem.ca wrote:
 
 On Mon, 14 Jan 2013, Thijs Alkemade wrote:
 
 Op 14 jan. 2013, om 17:30 heeft rocon...@theorem.ca het volgende
 geschreven:
 
 On Thu, 10 Jan 2013, Karel Gardas wrote:
 
 
 Hmm, are you using Raspbian? I.e. hard-float abi caught my eye in
 case of ARMv6/ARM11 chip here...
 
 I'm afraid LLVM is not well guided in your case so could you be so
 kind and test if adding -optlc=-mattr=+vfp2 helps? You need to add
 it to your build.mk probably and you will need to rebuild
 everything again...
 
 No change with
 
 SRC_HC_OPTS = -H64m -Rghc-timing -optc-mfloat-abi=hard
 -optc-march=armv6 -optc-mfpu=vfp -optlc=-mattr=+vfp2
 GhcStage1HcOpts = -O -fllvm
 GhcStage2HcOpts = -O0 -fllvm
 GhcLibHcOpts = -O -fllvm
 
 I still get the error:
 
 ===--- building final phase
 make -r --no-print-directory -f ghc.mk phase=final all
 LD libraries/ghc-prim/dist-install/build/HSghc-prim-0.3.0.0.o
 /usr/bin/ld: error:
 libraries/ghc-prim/dist-install/build/cbits/debug.o uses VFP
 register arguments,
 libraries/ghc-prim/dist-install/build/HSghc-prim-0.3.0.0.o does not
 /usr/bin/ld: failed to merge target specific data of file
 libraries/ghc-prim/dist-install/build/cbits/debug.o
 
 I don't really understand what is going on here. The file
 libraries/ghc-prim/dist-install/build/HSghc-prim-0.3.0.0.o doesn't
 even exist, so when I manually run /usr/bin/ld I get:
 
 $ /usr/bin/ld
 libraries/ghc-prim/dist-install/build/HSghc-prim-0.3.0.0.o
 /usr/bin/ld: cannot find
 libraries/ghc-prim/dist-install/build/HSghc-prim-0.3.0.0.o: No such
 file or directory
 
 What is make really doing here?
 
 My research suggests that this error is a symptom of trying to link
 something without the hard-float ABI together with something with a
 soft-float ABI. But I don't know where
 libraries/ghc-prim/dist-install/build/HSghc-prim-0.3.0.0.o is
 coming from.
 
 libraries/ghc-prim/dist-install/build/HSghc-prim-0.3.0.0.o is the
 output ld was asked to generate. Apparently, some of the input .o
 files didn't use VFP register arguments, so ld concluded that the
 output should also not use VFP register arguments. But then ld
 encountered a .o file that did use VFP register arguments, and threw
 an error (something in cbits, so probably built with different CFLAGS).
 
 From your flags I'd say you miss -optlc-float-abi=hard. I had it in
 GhcLibHcOpts, but I'm not sure that is the correct way to ensure it
 is passed to everything exactly once.
 
 Okay, I tried:
 
 SRC_HC_OPTS = -H64m -Rghc-timing -optc-mfloat-abi=hard
 -optc-march=armv6 -optc-mfpu=vfp -optlc=-mattr=+vfp2
 GhcStage1HcOpts = -O -fllvm
 GhcStage2HcOpts = -O0 -fllvm
 GhcLibHcOpts = -O -fllvm -optlc-float-abi=hard
 
 and I got the same error at a different build step. I'm not sure if
 it is earlier or later.
 
 It seems still not everything is using the hard-float ABI.
 
 ===--- building final phase
 make -r --no-print-directory -f ghc.mk phase=final all
 HC [stage 1] utils/hsc2hs/dist-install/build/tmp/hsc2hs
 /usr/bin/ld: error: utils/hsc2hs/dist-install/build/tmp/hsc2hs uses
 VFP register arguments, utils/hsc2hs/dist-install/build/Main.o does not
 /usr/bin/ld: failed to merge target specific data of file
 utils/hsc2hs/dist-install/build/Main.o
 /usr/bin/ld: error: utils/hsc2hs/dist-install/build/tmp/hsc2hs uses
 VFP register arguments, utils/hsc2hs/dist-install/build/HSCParser.o
 does not
 /usr/bin/ld: failed to merge target specific data of file
 utils/hsc2hs/dist-install/build/HSCParser.o
 /usr/bin/ld: error: utils/hsc2hs/dist-install/build/tmp/hsc2hs uses
 VFP register arguments,
 

Re: Error building ghc on raspberry pi.

2013-01-16 Thread roconnor

On Wed, 16 Jan 2013, Karel Gardas wrote:



Guys,

I've installed raspbian into ubuntu chroot on my panda. Now to simulate what 
GHC detects on your hardware, could you be so kind and send me output of:


uname -m


armv6l


uname -r


3.6.11+


uname -s


Linux


uname -v


#346 PREEMPT Fri Dec 28 00:50:33 GMT 2012

this looks like a needed info for config.guess to detect machine hardware 
well.


Also if you send me output of:

sh config.guess


armv6l-unknown-linux-gnueabihf


it would be great.

Everything of course run on your rpi board!

Thanks,
Karel


--
Russell O'Connor  http://r6.ca/
``All talk about `theft,''' the general counsel of the American Graphophone
Company wrote, ``is the merest claptrap, for there exists no property in
ideas musical, literary or artistic, except as defined by statute.''

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-16 Thread Karel Gardas


Good! So the patch I already provided is working fine at least w.r.t. 
change in configure. I've tested it here on my raspbian chroot on 
pandaboard where I've hacked config.guess to print exactly what you get 
on real rpi.


Now, I'm curious if the hack in DriverPipeline.hs helps too.

Were you able to merge the patch into your GHC? And rebuild? What was 
the result?


Thanks,
Karel

On 01/16/13 08:02 PM, rocon...@theorem.ca wrote:

On Wed, 16 Jan 2013, Karel Gardas wrote:



Guys,

I've installed raspbian into ubuntu chroot on my panda. Now to
simulate what GHC detects on your hardware, could you be so kind and
send me output of:

uname -m


armv6l


uname -r


3.6.11+


uname -s


Linux


uname -v


#346 PREEMPT Fri Dec 28 00:50:33 GMT 2012


this looks like a needed info for config.guess to detect machine
hardware well.

Also if you send me output of:

sh config.guess


armv6l-unknown-linux-gnueabihf


it would be great.

Everything of course run on your rpi board!

Thanks,
Karel





___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-16 Thread roconnor

On Wed, 16 Jan 2013, Karel Gardas wrote:



Good! So the patch I already provided is working fine at least w.r.t. change 
in configure. I've tested it here on my raspbian chroot on pandaboard where 
I've hacked config.guess to print exactly what you get on real rpi.


Now, I'm curious if the hack in DriverPipeline.hs helps too.

Were you able to merge the patch into your GHC? And rebuild? What was the 
result?


I'm still trying to figure out the correct usage of -optlc-float-abi=hard 
in mk/build.mk.  I've ben getting a lot of errors about two occurances of 
the float-abi=hard flag.



Thanks,
Karel

On 01/16/13 08:02 PM, rocon...@theorem.ca wrote:

On Wed, 16 Jan 2013, Karel Gardas wrote:



Guys,

I've installed raspbian into ubuntu chroot on my panda. Now to
simulate what GHC detects on your hardware, could you be so kind and
send me output of:

uname -m


armv6l


uname -r


3.6.11+


uname -s


Linux


uname -v


#346 PREEMPT Fri Dec 28 00:50:33 GMT 2012


this looks like a needed info for config.guess to detect machine
hardware well.

Also if you send me output of:

sh config.guess


armv6l-unknown-linux-gnueabihf


it would be great.

Everything of course run on your rpi board!

Thanks,
Karel






--
Russell O'Connor  http://r6.ca/
``All talk about `theft,''' the general counsel of the American Graphophone
Company wrote, ``is the merest claptrap, for there exists no property in
ideas musical, literary or artistic, except as defined by statute.''

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: What is the scheduler type of GHC?

2013-01-16 Thread Edward Z. Yang
Excerpts from Magicloud Magiclouds's message of Wed Jan 16 00:32:00 -0800 2013:
 Hi,
   Just read a post about schedulers in erlang and go lang, which informed
 me that erlang is preemptive and go lang is cooperative.
   So which is used by GHC? From ghc wiki about rts, if the question is only
 within haskell threads, it seems like cooperative.

Additionally, the current scheduler is round-robin with some heuristics for
when threads get to cut the line, so we do not have priorities for threads.
I'm currently working on a patch which allows for more flexible scheduling.

Edward

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-16 Thread Karel Gardas

On 01/16/13 08:12 PM, rocon...@theorem.ca wrote:

On Wed, 16 Jan 2013, Karel Gardas wrote:



Good! So the patch I already provided is working fine at least w.r.t.
change in configure. I've tested it here on my raspbian chroot on
pandaboard where I've hacked config.guess to print exactly what you
get on real rpi.

Now, I'm curious if the hack in DriverPipeline.hs helps too.

Were you able to merge the patch into your GHC? And rebuild? What was
the result?


I'm still trying to figure out the correct usage of
-optlc-float-abi=hard in mk/build.mk. I've ben getting a lot of errors
about two occurances of the float-abi=hard flag.


You should not IMHO. My patch should solve all your issues. :-) The only 
issue you may get is that your distro ghc will compile for soft-float 
ABI and your compiled GHC will compile to hard-float and object files 
will get mixed somewhere. But I trust your distro ghc builders that this 
is not the case so both GHCs should compile using hard-float. So issue 
solved, at least should be. Now I'm just waiting if you verify this or 
not so I'm either able to submit the patch for inclusion or hack it more...


Karel


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Irritating compilation error on Windows32.

2013-01-16 Thread Caitlin
Hi all.

I wrote the following test program:

bar x = x * x

on a Win32 (SP3) machine using the Haskell Platform and GHC-7.6.1
(standalone) and I have noticed the same frustrating errors. Any
suggestions would be most appreciated.

Thanks,

~Caitlin

C:\ghci
GHCi, version 7.4.2: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude
Prelude :l bar
[1 of 1] Compiling Main ( bar.hs, interpreted )
*** Exception: CreateDirectory .: permission denied (Access is denied.)

 :l bar.hs
[1 of 1] Compiling Main ( bar.hs, interpreted )
*** Exception: CreateDirectory .: permission denied (Access is denied.)

 :l C:\\bar.hs
[1 of 1] Compiling Main ( C:\bar.hs, interpreted )
*** Exception: CreateDirectory C:\\: permission denied (Access is denied.)


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users