On 16/06/2011 04:09, Manuel M T Chakravarty wrote:
Simon Marlow:
On 15/06/2011 13:35, Manuel M T Chakravarty wrote:
Ben mentioned this just this week.  IIRC he meant to ask Ian for help with the 
build system issue but couldn't reproduce it anymore.

I have been validating the tree many times in the last few days (with 3-4 
cores) and I never saw this problem.  How many threads are you using?

I saw it on my laptop with 2 cores (using 3 threads), but I don't see it on our 
8-core machine here where I normally use about 5 threads. Obviously it's 
non-deterministic, but it shouldn't be too hard to find the missing dependency 
- it looks like when building Data/Array/Parallel/PArray/PData.dyn_o we need 
the GHCi lib for HSdph-prim-par-0.5,

Right, but 'Data/Array/Parallel/PArray/PData.dyn_o' is in the package 
'dph-par', whose Cabal file includes

   Build-Depends: dph-prim-par


Doesn't that imply that the build system will complete building
'dph-prim-par' (hence, also generating 'HSdph-prim-par-0.5') before
starting to build 'dph-par' (and hence,
'Data/Array/Parallel/PArray/PData.dyn_o').

No, it doesn't work like that because we wouldn't get enough parallelism. Dependencies are tracked at the module level, so the dependency graph that make sees contains all modules of all libraries, including GHC itself. The Build-depends line is used to ensure that we configure packages in the correct order.

Unfortunately Template Haskell (and hence annotations) breaks this idea, because TH needs the whole package compiled in order to load it. This fragment from ghc.mk might be illuminating:

# Make sure we have all the GHCi libs by the time we've built
# ghc-stage2.  DPH includes a bit of Template Haskell which needs the
# GHCI libs, and we don't have a better way to express that dependency.
#
GHCI_LIBS = $(foreach lib,$(PACKAGES),$(libraries/$(lib)_dist-install_GHCI_LIB)) \
            $(compiler_stage2_GHCI_LIB)

ifeq "$(UseArchivesForGhci)" "NO"
ghc/stage2/build/tmp/$(ghc_stage2_PROG) : $(GHCI_LIBS)
endif


So possibly something needs to be done for the dyn way here?

I wonder why neither Ben nor I have been running into it.  Could it
be because we are on Mac OS X and it doesn't build dynamic libraries
on that platform?

Weird, I thought we supported shared libraries on OS X? This from mk/config.mk.in suggests that 32-bit OS X has shared libraries, but 64-bit doesn't:

# Do we support shared libs?
SharedLibsPlatformList = i386-unknown-linux x86_64-unknown-linux \
        i386-unknown-freebsd x86_64-unknown-freebsd \
        i386-unknown-openbsd x86_64-unknown-openbsd \
        i386-unknown-mingw32 \
        i386-apple-darwin powerpc-apple-darwin


which is very strange, I'm sure it used to work.

Cheers,
        Simon



Manuel


Simon Marlow:
On 15/06/2011 10:06, Dimitrios Vytiniotis wrote:
raries/dph/dph-par/.    -optP-include -optPlibraries/dph/dph-par/dist-in        
                                                                                
                             stall/build/autogen/cabal_macros.h -package 
array-0.3.0.2 -package base-                                                    
                                                                 4.3.1.0 
-package dph-base-0.5 -package dph-prim-par-0.5 -package ghc-7.1                
                                                                                
                     .20110614 -package ghc-prim-0.2.0.0 -package 
random-1.0.0.3 -package tem                                                     
                                                                
plate-haskell-2.5.0.0  -Odph -funbox-strict-fields -fcpr-off -fdph-this         
                                                                                
                             -package-name dph-par -XHaskell98 -XTy
pe
Fa
milies -XGADTs -XRankNTypes -X                                                  
                                                                   BangPatterns 
-XMagicHash -XUnboxedTuples -XTypeOperators -O2 -O -dcore-l                     
                                                                                
                int -fno-warn-deprecated-flags -no-user-package-conf -rtsopts 
-Wwarn                                                                          
                                               -odir 
libraries/dph/dph-par/dist-install/build -hidir libraries/dph/dph-              
                                                                                
                       par/dist-install/build -stubdir 
libraries/dph/dph-par/dist-install/build                                        
                                                                              
-hisuf dyn_hi -osuf  dyn_o -hcsuf dyn_hc -c libraries/dph/dph-par/../dp
                                                                                
                        h-common/Data/Array/Parallel/Lifted/Unboxed.hs -o 
libraries/dph/dph-par/                                                          
                                                            
dist-install/build/Data/Array/Parallel/Lifted/Unboxed.dyn_o
"inplace/bin/ghc-stage2.exe" -fPIC -dynamic  -H32m -O -Wall -Werror -H64        
                                                                                          
                   m -O0    -package-name dph-par-0.5 -hide-all-packages -i 
-ilibraries/dph/dph-par/../dph-common -ilibraries/dph/dph-par/dist-install/build -ilibr   
                                                                                          
                        aries/dph/dph-par/dist-install/build/autogen 
-Ilibraries/dph/dph-par/dis                                                               
                                                      t-install/build 
-Ilibraries/dph/dph-par/dist-install/build/autogen -Ilib                                  
                                                                                   
raries/dph/dph-par/.    -optP-include -optPlibraries/dph/dph-par/dist-in
                             stall/build/autogen/cabal_macros.h -package 
array-0.3.0.2 -package base-                                                    
                                                                 4.3.1.0 
-package dph-base-0.5 -package dph-prim-par-0.5 -package ghc-7.1                
                                                                                
                     .20110614 -package ghc-prim-0.2.0.0 -package 
random-1.0.0.3 -package tem                                                     
                                                                
plate-haskell-2.5.0.0  -Odph -funbox-strict-fields -fcpr-off -fdph-this         
                                                                                
                             -package-name dph-par -XHaskell98 -XTypeFamilies 
-XGADTs -XRankNTypes -X                                                         
                                                            BangPatter
ns
-X
MagicHash -XUnboxedTuples -XTypeOperators -O2 -O -dcore-l                       
                                                                                
              int -fno-warn-deprecated-flags -no-user-package-conf -rtsopts 
-Wwarn                                                                          
                                               -odir 
libraries/dph/dph-par/dist-install/build -hidir libraries/dph/dph-              
                                                                                
                       par/dist-install/build -stubdir 
libraries/dph/dph-par/dist-install/build                                        
                                                                              
-hisuf dyn_hi -osuf  dyn_o -hcsuf dyn_hc -c libraries/dph/dph-par/../dp         
                                                                                
                            h-common/Data/Array/Parallel/PArray/PData.hs -o 
librar
ie
s/dp
h/dph-par/di                                                                    
                                                 
st-install/build/Data/Array/Parallel/PArray/PData.dyn_o
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package array-0.3.0.2 ... linking ... done.
Loading package containers-0.4.0.0 ... linking ... done.
Loading package bytestring-0.9.1.10 ... linking ... done.
Loading package Win32-2.2.0.1 ... linking ... done.
Loading package filepath-1.2.0.0 ... linking ... done.
Loading package old-locale-1.0.0.2 ... linking ... done.
Loading package old-time-1.0.0.6 ... linking ... done.
Loading package directory-1.1.0.0 ... linking ... done.
Loading package pretty-1.0.2.0 ... linking ... done.
Loading package process-1.0.1.4 ... linking ... done.
Loading package Cabal-1.11.0 ... linking ... done.
Loading package binary-0.5.0.2 ... linking ... done.
Loading package bin-package-db-0.0.0.0 ... linking ... done.
Loading package hoopl-3.8.7.0 ... linking ... done.
Loading package hpc-0.5.0.6 ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package ghc-7.1.20110614 ... linking ... done.
Loading package time-1.2.0.4 ... linking ... done.
Loading package random-1.0.0.3 ... linking ... done.
Loading package primitive-0.3.1 ... linking ... done.
Loading package vector-0.7.0.1 ... linking ... done.
Loading package dph-base-0.5 ... linking ... done.
Loading package dph-prim-interface-0.5 ... linking ... done.
Loading package dph-prim-seq-0.5 ... linking ... done.
Loading package dph-prim-par-0.5 ...<command line>: can't load .so/.DLL         
                                                                                      
                       for: HSdph-prim-par-0.5 (addDLL: could not load DLL)
ghc-stage2.exe: HSdph-prim-par-0.5: The specified module could not be fo        
                                                                                
                             und.
make[1]: *** [libraries/dph/dph-par/dist-install/build/Data/Array/Parall        
                                                                                
                             el/PArray/PData.dyn_o] Error 1
make[1]: *** Waiting for unfinished jobs..

I've also seen validate fail like this on Linux.  Presumably it's a missing 
dependency somewhere in the build system for DPH.  Ben, weren't you looking 
into this (or something like it) recently?

Cheers,
        Simon

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc





_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to