Skip to content

testsuite fails on alpine linux with ghc 8.10.7

Summary

Testsuite fails with ghc 8.10.7 on alpine

Steps to reproduce

On Alpine linux edge x86_64 build ghc with something like:

        apk add build-base ghc-bootstrap cpio binutils-gold ncurses-dev xz-coreutils grep linux-headers musl-dev zlib-dev gmp-dev binutils-dev python3
        cp mk/build.mk.sample mk/build.mk                                                                                                                                                        
                                                                                                                                                                                                 
        cat >> mk/build.mk <<-EOF                                                                                                                                                                
                BuildFlavour         = perf-llvm                                                                                                                                                 
                INTEGER_LIBRARY      = integer-gmp                                                                                                                                               
                BeConservative       = YES                                                                                                                                                       
                GhcStage3HcOpts     += -O3                                                                                                                                                       
                SplitSections        = YES                                                                                                                                                       
        EOF

                                                                                                                                                                                      
        # NOTE: ghc build system requires host == build, and it ends up                                                                                                                          
        # compiling the cross-compiler (stage1) and cross-compiling with                                                                                                                         
        # that the native compiler (stage2)                                                                                                                                                      
        ./configure \                                                                                                                                                                            
                --build=x86_64-alpine-linux-musl \                                                                                                                                                                
                --host=x86_64-alpine-linux-musl \                                                                                                                                                                 
                --target=x86_64-alpine-linux-musl \                                                                                                                                                              
                --prefix=/usr \                                                                                                                                                                  
                --without-system-libffi \                                                                                                                                                        
                --disable-ld-override \                                                                                                                                                          
                LD=ld.gold
        make

        cd testsuite                                                                                                                                           

        # workaround
        make -C timeout all
        
        # run the tests
        make fast SKIP_PERF_TESTS=YES TEST_HC=ghc THREADS=$(nproc)

Output:

SUMMARY for test run started at Fri Sep 10 12:55:55 2021                                                                                                                                         
0:08:16.722767 spent to go through                                                                                                                                                               
    7361 total tests, which gave rise to                                                                                                                                                         
   28679 test cases, of which                                                                                                                                                                    
   19305 were skipped                                                                                                                                                                            
                                                                                                                                                                                                 
      29 had missing libraries
    5802 expected passes
     171 expected failures

      13 caused framework failures
       0 caused framework warnings
       1 unexpected passes
    1254 unexpected failures
       0 unexpected stat failures
      11 fragile tests

Unexpected passes:
   pmcheck/should_compile/T17207b.run  T17207b [unexpected] (normal)

Unexpected failures:
   typecheck/should_compile/abstract_refinement_hole_fits.run            abstract_refinement_hole_fits [stderr mismatch] (normal)
   ado/ado008.run                                                        ado008 [exit code non-0] (normal)
   ghc-api/annotations/annotations.run                                   annotations [bad stdout] (normal)
   annotations/should_compile/th/annth_compunits.run                     annth_compunits [bad stderr] (normal)
   annotations/should_compile/th/annth_make.run                          annth_make [bad stderr] (normal)
   ghc-api/apirecomp001/apirecomp001.run                                 apirecomp001 [bad stderr] (normal)
   typecheck/should_fail/AssocTyDef02.run                                AssocTyDef02 [stderr mismatch] (normal)
   module/base01/base01.run                                              base01 [bad stderr] (normal)
...
   warnings/should_fail/WerrorFail.run                                   WerrorFail [stderr mismatch] (normal)     
   warnings/should_fail/WerrorFail2.run                                  WerrorFail2 [stderr mismatch] (normal)      
   partial-sigs/should_fail/WildcardInstantiations.run                   WildcardInstantiations [stderr mismatch] (normal)          
   driver/withRtsOpts.run                                                withRtsOpts [bad stderr] (normal)            
   driver/write_interface_make.run                                       write_interface_make [bad stderr] (normal)   
   driver/write_interface_oneshot.run                                    write_interface_oneshot [bad stderr] (normal)   
                                                                                                                                                                                                 
Framework failures:                                                                                                                                                                              
   plugins/plugins01.run          plugins01 [pre_cmd failed: 2] (dyn)                                                                                                                            
   plugins/plugins08.run          plugins08 [pre_cmd failed: 2] (dyn)                                                                                                                            
   plugins/plugins09.run          plugins09 [pre_cmd failed: 2] (dyn)                                                                                                                            
   plugins/plugins10.run          plugins10 [pre_cmd failed: 2] (dyn)                                                                                                                            
   plugins/plugins11.run          plugins11 [pre_cmd failed: 2] (dyn)                                                                                                                            
   plugins/plugins12.run          plugins12 [pre_cmd failed: 2] (dyn)                                                                                                                            
   plugins/plugins13.run          plugins13 [pre_cmd failed: 2] (dyn)                                                                                                                            
   plugins/plugins14.run          plugins14 [pre_cmd failed: 2] (dyn)                                                                                                                            
   plugins/plugins15.run          plugins15 [pre_cmd failed: 2] (dyn)                                                                                                                            
   plugins/T12567a.run            T12567a [pre_cmd failed: 2] (dyn)                                                                                                                              
   plugins/T16260.run             T16260 [pre_cmd failed: 2] (normal)                                                                                                                            
   plugins/test-hole-plugin.run   test-hole-plugin [pre_cmd failed: 2] (normal)                                                                                                                  
   plugins/test-hooks-plugin.run  test-hooks-plugin [pre_cmd failed: 2] (normal)                                                                                                                 
                                                                                                                                                                                                 
Fragile test passes:                                                                                                                                                                             
   libraries/base/tests/CPUTime001.run  CPUTime001 [fragile] (normal)                                                                                                                            
   ghci/scripts/ghci056.run             ghci056 [fragile] (ghci)                                                                                                                                 
   concurrent/should_run/T5611.run      T5611 [fragile] (normal)                                                                                                                                 
   concurrent/should_run/T5611a.run     T5611a [fragile] (normal)                                                                                                                                
                                                                                                                                                                                                 
Fragile test failures:                                                                                                                                                                           
   profiling/should_run/heapprof001.run  heapprof001 [fragile] (ghci-ext-prof)                                                                                                                   
   profiling/should_run/heapprof001.run  heapprof001 [fragile] (prof)                                                                                                                            
   runghc/T-signals-child.run            T-signals-child [fragile] (threaded1)                                                                                                                   
   profiling/should_run/T15897.run       T15897 [fragile] (profasm)                                                                                                                              
   ghci/should_run/T3171.run             T3171 [fragile] (normal)                                                                                                                                
   profiling/should_run/T5559.run        T5559 [fragile] (ghci-ext-prof)                                                                                                                         
   profiling/should_run/T5559.run        T5559 [fragile] (prof)                                                                                                                                  
                                                                                                                                                                                                 
make[2]: *** [../mk/test.mk:356: test] Error 1                                                                                                                                                   
make[2]: Leaving directory '/home/ncopa/aports/community/ghc/src/ghc-8.10.7/testsuite/tests'                                                                                                     
make[1]: *** [../mk/test.mk:372: fast] Error 2                                                                                                                                                   
make[1]: Leaving directory '/home/ncopa/aports/community/ghc/src/ghc-8.10.7/testsuite/tests'                                                                                                     
make: *** [Makefile:32: fast] Error 2                                                                           

Expected behavior

0 unexpected failures

Environment

  • GHC version used: ghc 8.10.7

Optional:

  • Operating System: Alpine linux edge
  • System Architecture: x86_64

Downstream merge request: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/6640

Note that I have removed the system libffi and added a make -C timeout all work around. We want build alpine with bundled libffi statically linked due to #20051 (closed)

Edited by Natanael Copa
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information