HEAD doesn't not build on OS X

David Peixotto dmp at rice.edu
Thu Jul 21 00:19:20 CEST 2011


I've attached a small patch that seems to fix the build. The problem was that the `dtraceSparkCounters` function was getting called even when we were not compiling for the threaded rts. The patch just moves the call inside the #ifdef for the threaded rts.

The call had been placed outside the #ifdef for the
THREADED_RTS symbol which caused a compile error since
the spark_stats field of a capability is only available when
compiling for the threaded rts.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Only-call-dtraceSparkCounters-in-threaded-rts.patch
Type: application/octet-stream
Size: 1300 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20110720/b569f295/attachment-0001.obj>
-------------- next part --------------


On Jul 20, 2011, at 1:29 PM, Johan Tibell wrote:

> Still broken, but now for some other reason:
> 
> "inplace/bin/ghc-stage1" -optc-Wall -optc-Wextra
> -optc-Wstrict-prototypes -optc-Wmissing-prototypes
> -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return
> -optc-Wpointer-arith -optc-Wmissing-noreturn -optc-Wnested-externs
> -optc-Wredundant-decls -optc-Iincludes -optc-Irts -optc-DCOMPILING_RTS
> -optc-fno-strict-aliasing -optc-fno-common -optc-Ilibffi/build/include
> -optc-DDTRACE -optc-fomit-frame-pointer -optc-DRtsWay=\"rts_v\"
> -H64m -O -fasm -Iincludes -Irts -DCOMPILING_RTS -package-name rts
> -dcmm-lint  -Ilibffi/build/include -DDTRACE     -i -irts
> -irts/dist/build -irts/dist/build/autogen -Irts/dist/build
> -Irts/dist/build/autogen           -optc-O2   -c rts/ClosureFlags.c -o
> rts/dist/build/ClosureFlags.o
> In file included from rts/Schedule.h:15,
> 
>                 from rts/Capability.c:23:0:
> rts/Trace.h: In function ‘traceSparkCounters’:
> 
> rts/Trace.h:516:0:
>     error: ‘Capability’ has no member named ‘spark_stats’
> 
> rts/Trace.h:516:0:
>     error: ‘Capability’ has no member named ‘spark_stats’
> 
> rts/Trace.h:516:0:
>     error: ‘Capability’ has no member named ‘spark_stats’
> 
> rts/Trace.h:516:0:
>     error: ‘Capability’ has no member named ‘spark_stats’
> 
> rts/Trace.h:516:0:
>     error: ‘Capability’ has no member named ‘spark_stats’
> 
> rts/Trace.h:516:0:
>     error: ‘Capability’ has no member named ‘spark_stats’
> 
> rts/Trace.h:516:0:
>     warning: implicit declaration of function ‘sparkPoolSize’
> 
> rts/Trace.h:516:0:
>     warning: nested extern declaration of ‘sparkPoolSize’
> 
> rts/Trace.h:516:0:
>     error: ‘Capability’ has no member named ‘sparks’
> make[1]: *** [rts/dist/build/Capability.o] Error 1
> make[1]: *** Waiting for unfinished jobs....
> make: *** [all] Error 2
> 
> On Tue, Jul 19, 2011 at 9:55 PM, Johan Tibell <johan.tibell at gmail.com> wrote:
>> Duncan, could you please take a look.
>> 
>> On Tue, Jul 19, 2011 at 9:51 PM, Johan Tibell <johan.tibell at gmail.com> wrote:
>>> I just unpulled all the new GHC event patches, starting with
>>> d77df1caad3a5f833aac9275938a0675e1ee6aac, and the build is chugging
>>> along.
>>> 
>>> On Tue, Jul 19, 2011 at 8:38 PM, Johan Tibell <johan.tibell at gmail.com> wrote:
>>>> While trying to build head (from a maintainer-clean tree) I get the
>>>> following error:
>>>> 
>>>> echo "compiler_stage1_depfile_haskell_EXISTS = YES" >>
>>>> compiler/stage1/build/.depend-v.haskell.tmp
>>>> for dir in compiler/stage1/build/./ compiler/stage1/build/Llvm/
>>>> compiler/stage1/build/LlvmCodeGen/ compiler/stage1/build/PPC/
>>>> compiler/stage1/build/RegAlloc/ compiler/stage1/build/RegAlloc/Graph/
>>>> compiler/stage1/build/RegAlloc/Linear/
>>>> compiler/stage1/build/RegAlloc/Linear/PPC/
>>>> compiler/stage1/build/RegAlloc/Linear/SPARC/
>>>> compiler/stage1/build/RegAlloc/Linear/X86/
>>>> compiler/stage1/build/SPARC/ compiler/stage1/build/SPARC/CodeGen/
>>>> compiler/stage1/build/Vectorise/
>>>> compiler/stage1/build/Vectorise/Builtins/
>>>> compiler/stage1/build/Vectorise/Monad/
>>>> compiler/stage1/build/Vectorise/Type/
>>>> compiler/stage1/build/Vectorise/Utils/ compiler/stage1/build/X86/; do
>>>> if test ! -d $dir; then mkdir -p $dir; fi done
>>>> grep -v ' : [a-zA-Z]:/' compiler/stage1/build/.depend-v.haskell.tmp >
>>>> compiler/stage1/build/.depend-v.haskell
>>>> "/usr/sbin/dtrace" -Iincludes -Irts -Ilibffi/build/include -C -x
>>>> cpppath=/usr/bin/gcc -h -o rts/dist/build/RtsProbes.h -s
>>>> rts/RtsProbes.d
>>>> . includes/HsFFI.h
>>>> .. includes/ghcconfig.h
>>>> ... includes/ghcautoconf.h
>>>> ... includes/ghcplatform.h
>>>> .. includes/stg/Types.h
>>>> .. /usr/lib/gcc/i686-apple-darwin10/4.2.1/include/stdint.h
>>>> .. /usr/lib/gcc/i686-apple-darwin10/4.2.1/include/float.h
>>>> . includes/rts/EventLogFormat.h
>>>> dtrace: failed to compile script rts/RtsProbes.d: line 71: parameter
>>>> is already declared in probe input prototype: StgWord, parameter #6
>>>> make[1]: *** [rts/dist/build/RtsProbes.h] Error 1
>>>> make: *** [all] Error 2
>>>> 
>>> 
>> 
> 
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
> 



More information about the Glasgow-haskell-users mailing list