Re: HEAD build fails on OS X

2013-04-08 Thread Carter Schonwald
Hey all,

i seem to be able to get a working build of ghc head on my mac with the
merge commit by spj from april 3 that has sha hash:
b84da617c4dadcfbf47796e7a75c21d6b4c4947a

I've run ghc-stage2 --interactive from the ./inplace director and it seems
to work.

I will test it more over the next day as I have time.

I should also mention that running the make build process ended with the
following warning, which is probably irrelevant:
Warning: -rtsopts and -with-rtsopts have no effect with -shared.
Call hs_init_ghc() from your main() function to set these options.


I hope this is helpful
-Carter




On Wed, Apr 3, 2013 at 8:35 PM, Kazu Yamamoto k...@iij.ad.jp wrote:

 Richard,

  Here's the end of my output:
 
  Installing library in
  /Users/rae/local/stow/ghc-head/lib/ghc-7.7.20130403/haskell2010-1.1.1.0
  /Users/rae/local/stow/ghc-head/lib/ghc-7.7.20130403/bin/ghc-pkg
 --force --global-package-db
 /Users/rae/local/stow/ghc-head/lib/ghc-7.7.20130403/package.conf.d update
 rts/package.conf.install
  dyld: Library not loaded:
 @loader_path/../terminfo-0.3.2.5/libHSterminfo-0.3.2.5-ghc7.7.20130403.dylib
Referenced from:
 /Users/rae/local/stow/ghc-head/lib/ghc-7.7.20130403/bin/ghc-pkg
Reason: image not found
  make[1]: *** [install_packages] Trace/BPT trap: 5

 Please join this ticket.

 http://hackage.haskell.org/trac/ghc/ticket/7686
 http://hackage.haskell.org/trac/ghc/ticket/7806

 --Kazu

 ___
 ghc-devs mailing list
 ghc-devs@haskell.org
 http://www.haskell.org/mailman/listinfo/ghc-devs

___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


Excessive inlining in libraries/time/Data/Time/Format.hs

2013-04-08 Thread Gabor Greif
While investigating the residual problem with #7814, I discovered that
there is some excessive inlining going on in
libraries/time/Data/Time/Format.hs:

 wc -l libraries/time/Data/Time/Format.hs
libraries/time/dist-install/build/Data/Time/Format.cmm
247 libraries/time/Data/Time/Format.hs
 103342 libraries/time/dist-install/build/Data/Time/Format.cmm

Format.cmm is created by -ddump-cmm-raw with the STAGE1 GHC HEAD.

I am compiling for ELF/PPC, but that should be an irrelevant detail.

Can somebody confirm this?

Thanks and cheers,

Gabor

___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


Re: [GHC] #7820: Installing profiling library BREAKS non-profiling executable

2013-04-08 Thread Ryan Newton
By the way, does anyone have a positive example of a package on hackage
that (1) uses foreign primops and (2) is robust across a wide variety of
platforms and build methods?  It would be great to work from such an
example.

Thanks,
  -Ryan



On Mon, Apr 8, 2013 at 10:57 AM, GHC cvs-...@haskell.org wrote:

 #7820: Installing profiling library BREAKS non-profiling executable

 --+-
 Reporter:  rrnewton   |  Owner:
 Type:  bug| Status:  new
 Priority:  normal |  Component:  Compiler
  Version:  7.6.2  |   Keywords:  profiling
   Os:  Linux  |   Architecture:  x86_64 (amd64)
  Failure:  Runtime crash  |  Blockedby:
 Blocking: |Related:

 --+-
  I am trying to work through problems with different GHC ways so that I
  can broadly deploy a library of foreign primops for lockfree data
  structures.  Here's the package I am testing at the moment:

  https://github.com/rrnewton/haskell-lockfree-
  queue/tree/5d990fe43a983fc5ed32c3f58cb2e59df71b00b6/AtomicPrimops

  Here is a recipe for reproducing the bug from within that directory.  Both
  of these build modes work FINE:

  (cabal install --enable-library-profiling; cd testing; make prof;
  ./Test_prof.exe)
  (cabal install --disable-library-profiling; cd testing; make;
  ./Test_threaded.exe)

  That is, building both library and executable with profiling, or without
  profiling, works fine.  But then this creates an executable that
  segfaults:

  (cabal install --enable-library-profiling; cd testing; make;
  ./Test_threaded.exe)

  At runtime the call to the .cmm-defined foreign primop just returns zero,
  and then the process segfaults when it tries to use that as a Haskell
  value.

  But my understanding is that --enable-library-profiling should just add
  extra binaries to .cabal and NOT change the behavior of the non-profiling
  binaries.

  Yet I can confirm that I see slightly different binary sizes with the non-
  profiling .o and .a files installed in ~/.cabal/lib depending on whether
  --enable-library-profiling is activated.  Perhaps this in itself is a
  cabal bug, but I haven't tracked down exactly what the difference is yet.

  I have confirmed the above behavior under:
* Mac OS (ghc 7.4.2 and 7.6.2)
* Linux, RHEL 6 (ghc 7.4.2 and 7.6.2)

 --
 Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7820
 GHC http://www.haskell.org/ghc/
 The Glasgow Haskell Compiler

___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


integer-simple linker errors?

2013-04-08 Thread Gabor Greif
Hi all,

I am getting below errors from libraries/integer-simple.

Which integer-gmp / GHC change caused this? I looked briefly, but
could not find anything.

Thanks,

Gabor

0130407.so: undefined reference to `__word_encodeDouble'

/libHSinteger-simple-0.1.1.0-ghc7.7.20130407.so: undefined reference
to `__word_encodeFloat'

___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


Re: integer-simple linker errors?

2013-04-08 Thread Ian Lynagh

Hi Gabor,

On Mon, Apr 08, 2013 at 08:15:34PM +0200, Gabor Greif wrote:
 
 I am getting below errors from libraries/integer-simple.
 
 Which integer-gmp / GHC change caused this? I looked briefly, but
 could not find anything.
 
 0130407.so: undefined reference to `__word_encodeDouble'
 
 /libHSinteger-simple-0.1.1.0-ghc7.7.20130407.so: undefined reference
 to `__word_encodeFloat'

It's plausible that no-one's ever tried to build integer-simple the dyn
way before.


Thanks
Ian


___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


Re: integer-simple linker errors?

2013-04-08 Thread Gabor Greif
Hi Ian!

Yeah, but why is dynamic different at all?

Looking at integer-gmp, it imports __int_encodeFloat instead of
__word_encodeFloat.

GHC rts exports __int_encodeFloat. How can this even work in the
statically linked case?

I am very sleepy, otherwise I'd try to build a vanilla OS X GHC with
integer-simple now ...

Till tomorrow, things may become clearer to me.

Cheers,

Gabor

On 4/8/13, Ian Lynagh i...@well-typed.com wrote:

 Hi Gabor,

 On Mon, Apr 08, 2013 at 08:15:34PM +0200, Gabor Greif wrote:

 I am getting below errors from libraries/integer-simple.

 Which integer-gmp / GHC change caused this? I looked briefly, but
 could not find anything.

 0130407.so: undefined reference to `__word_encodeDouble'

 /libHSinteger-simple-0.1.1.0-ghc7.7.20130407.so: undefined reference
 to `__word_encodeFloat'

 It's plausible that no-one's ever tried to build integer-simple the dyn
 way before.


 Thanks
 Ian



___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


segfault building on os x

2013-04-08 Thread Carter Schonwald
Hey all,

today i've spent a wee bit of time building ghc
head 9e460664f3179c53f2f439238929b501691ddf24
(the last commit of april 7th by Gabor) on my mac today,
with the quick-llvm build setting,

my compilation segfaults towards the end when its building the stage2 libs
as follow

carter repoScratcher/ghc ‹master› » make
 2 ↵
===--- building phase 0
make -r --no-print-directory -f ghc.mk phase=0 phase_0_builds
make[1]: Nothing to be done for `phase_0_builds'.
===--- building phase 1
make -r --no-print-directory -f ghc.mk phase=1 phase_1_builds
make[1]: Nothing to be done for `phase_1_builds'.
===--- building final phase
make -r --no-print-directory -f ghc.mk phase=final all
inplace/bin/ghc-stage2 -hisuf hi -osuf  o -hcsuf hc -static  -H64m -O0
-fllvm-package-name old-time-1.1.0.1 -hide-all-packages -i
-ilibraries/old-time/. -ilibraries/old-time/dist-install/build
-ilibraries/old-time/dist-install/build/autogen
-Ilibraries/old-time/dist-install/build
-Ilibraries/old-time/dist-install/build/autogen
-Ilibraries/old-time/include-optP-include
-optPlibraries/old-time/dist-install/build/autogen/cabal_macros.h -package
base-4.7.0.0 -package old-locale-1.0.0.5 -XHaskell98 -XCPP
-XForeignFunctionInterface -O -fllvm  -no-user-package-db -rtsopts
 -odir libraries/old-time/dist-install/build -hidir
libraries/old-time/dist-install/build -stubdir
libraries/old-time/dist-install/build  -dynamic-too -c
libraries/old-time/dist-install/build/System/Time.hs -o
libraries/old-time/dist-install/build/System/Time.o -dyno
libraries/old-time/dist-install/build/System/Time.dyn_o
make[1]: *** [libraries/old-time/dist-install/build/System/Time.o]
Segmentation fault: 11


this is from a freshly cloned, ./sync-all, perl boot, ./configured ; make'd
build

thanks
-Carter
___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


Stage1Only

2013-04-08 Thread Trevor Elliott

Hi Everyone,

I've been trying to produce just a stage1 compiler by setting Stage1Only 
in my mk/build.mk.  What I've been discovering, is that the build system 
seems to ignore this (or I haven't set it in the right place) and trys 
to build a stage2 compiler and its associated tools.


What is the best way to stop the build system after stage1 + libraries 
has finished?


Thanks!

--trevor



smime.p7s
Description: S/MIME Cryptographic Signature
___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


Re: Stage1Only

2013-04-08 Thread Trevor Elliott
I searched on trac for bugs relating to Stage1Only, and didn't come up 
with anything, but a google search turned up this:


http://hackage.haskell.org/trac/ghc/ticket/7639

I'm going to try passing stage=1 in build.mk.

--trevor

On 04/08/2013 05:20 PM, Trevor Elliott wrote:

Hi Everyone,

I've been trying to produce just a stage1 compiler by setting Stage1Only
in my mk/build.mk.  What I've been discovering, is that the build system
seems to ignore this (or I haven't set it in the right place) and trys
to build a stage2 compiler and its associated tools.

What is the best way to stop the build system after stage1 + libraries
has finished?

Thanks!

--trevor



___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs





smime.p7s
Description: S/MIME Cryptographic Signature
___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


Re: Stage1Only

2013-04-08 Thread Trevor Elliott
So this did something different, but still tries to build tools like 
hsc2hs with the stage1 compiler.  This won't really work for a target 
like the HaLVM, as there's no notion of a filesystem in the target 
environment.


So, back to my original question: what's the easiest way to just 
generate a stage1 compiler and the libraries that it will require?


Thanks!

--trevor

On 04/08/2013 06:07 PM, Trevor Elliott wrote:

I searched on trac for bugs relating to Stage1Only, and didn't come up
with anything, but a google search turned up this:

http://hackage.haskell.org/trac/ghc/ticket/7639

I'm going to try passing stage=1 in build.mk.

--trevor

On 04/08/2013 05:20 PM, Trevor Elliott wrote:

Hi Everyone,

I've been trying to produce just a stage1 compiler by setting Stage1Only
in my mk/build.mk.  What I've been discovering, is that the build system
seems to ignore this (or I haven't set it in the right place) and trys
to build a stage2 compiler and its associated tools.

What is the best way to stop the build system after stage1 + libraries
has finished?

Thanks!

--trevor



___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs





___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs





smime.p7s
Description: S/MIME Cryptographic Signature
___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


Re: the cmm pages on the wiki seem out of date

2013-04-08 Thread Simon Marlow
A quick answer is that I put some documentation at the top of 
compiler/cmm/CmmParse.y that explains the new syntax.  That should help 
you get to grips with the changes.


Cheers,
Simon

On 06/04/13 13:48, Simon Peyton-Jones wrote:

Simon Marlow is the man who will really know.  He's in the middle of getting to 
grips with Facebook but I'm sure he'll pop up soon.

In general, yes please do update the wiki; thank you.

Simon

|  -Original Message-
|  From: ghc-devs-boun...@haskell.org [mailto:ghc-devs-boun...@haskell.org] On
|  Behalf Of Edward Z. Yang
|  Sent: 06 April 2013 09:12
|  To: Carter Schonwald
|  Cc: ghc-devs@haskell.org
|  Subject: Re: the cmm pages on the wiki seem out of date
|
|  Yes, there were some pretty recent (as in, not present in 7.6) improvements
|  to C-- syntax.  Updates would be much appreciated; you can probably figure 
out
|  what the changes are by snooping the changelogs for compiler/cmm.
|
|  Edward
|
|  Excerpts from Carter Schonwald's message of Fri Apr 05 20:37:23 -0700 2013:
|   Hey all, I've been staring at the cmm primop code in ghc over the past week
|   to understand a number of things, and I was just today looking at the
|   current cmm documentation on the ghc wiki.
|  
|   specifically i've been looking at
|   https://github.com/ghc/ghc/blob/master/compiler/cmm/Cmm.hs
|   https://github.com/ghc/ghc/blob/master/compiler/cmm/CmmParse.y
|   and
|   https://github.com/ghc/ghc/blob/master/rts/PrimOps.cmm
|  
|   versus the wiki docs
|   http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/CmmType
|  
|   it looks like CMM supports a nicer function definition convention than the
|   wiki implies.
|   (and presumably that also would hold  for the ffi for calling user written
|   cmm code too?)
|  
|  
|   If the wiki is out of date, i'm happy to make a first pass at trying to add
|   this info somewhere,
|  
|   thanks
|   -Carter
|
|  ___
|  ghc-devs mailing list
|  ghc-devs@haskell.org
|  http://www.haskell.org/mailman/listinfo/ghc-devs




___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs