alpmestan / ghc.nix

Nix (shell) expression for working on GHC
https://haskell.org/ghc/
BSD 3-Clause "New" or "Revised" License
143 stars 51 forks source link

./validate problems #10

Open alpmestan opened 6 years ago

alpmestan commented 6 years ago

Using ghc commit 93220d46fc, ./validate --fast gives me:

==== STAGE 1 TESTS ==== 

SUMMARY for test run started at Mon Jun 11 16:00:32 2018 CEST
 0:00:01 spent to go through
       2 total tests, which gave rise to
       6 test cases, of which
       4 were skipped

       0 had missing libraries
       2 expected passes
       0 expected failures

       0 caused framework failures
       0 caused framework warnings
       0 unexpected passes
       0 unexpected failures
       0 unexpected stat failures

==== STAGE 2 TESTS ==== 

Unexpected results from:
TEST="T14999 process001 process002"

SUMMARY for test run started at Mon Jun 11 15:48:26 2018 CEST
 0:12:06 spent to go through
    6414 total tests, which gave rise to
   19781 test cases, of which
   13461 were skipped

      28 had missing libraries
    6137 expected passes
     152 expected failures

       0 caused framework failures
       0 caused framework warnings
       0 unexpected passes
       3 unexpected failures
       0 unexpected stat failures

Unexpected failures:
   /run/user/1001/ghctest-b8ebz91k/test   spaces/./codeGen/should_compile/T14999.run           T14999 [bad stdout] (normal)
   /run/user/1001/ghctest-b8ebz91k/test   spaces/../../libraries/process/tests/process001.run  process001 [bad exit code] (normal)
   /run/user/1001/ghctest-b8ebz91k/test   spaces/../../libraries/process/tests/process002.run  process002 [bad exit code] (normal)

./validate --slow had many more last time I tried (several weeks ago).

int-index commented 6 years ago

For process001 and process002, the workaround I use is to copy the ls binary to /bin.

alpmestan commented 6 years ago

Would it be that bad for other systems if the test was changed to just invoke ls assuming it's in the PATH? I'd expect this to work on most systems I've laid my hands on, but that's not a whole lot :-)

int-index commented 6 years ago

Would it be that bad for other systems if the test was changed to just invoke ls assuming it's in the PATH?

I guess an easy way to check whether it breaks on supported systems is to make a Diff and see whether CI passes. And for systems that are not checked by CI, there are probably far more failures we're not aware of anyway.

bgamari commented 6 years ago

Yes, I think that just running ls would be much preferred. Afterall, POSIX doesn't guarantee that ls will be in /bin AFAIK. It would be great to have this fixed; I've been ignoring this issue ever since I switched to NixOS.

alpmestan commented 6 years ago

Put together a PR for those process tests at https://github.com/haskell/process/pull/133

int-index commented 6 years ago

When running make, building stage2 produces a lot of warnings like this one:

"inplace/bin/ghc-stage1" -optc-fno-stack-protector -optc-Wall -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-Wundef -optc-Iincludes -optc-Iincludes/dist -optc-Iincludes/dist-derivedconstants/header -optc-Iincludes/dist-ghcconstants/header -optc-Irts -optc-Irts/dist/build -optc-DCOMPILING_RTS -optc-DFS_NAMESPACE=rts -optc-fno-strict-aliasing -optc-fno-common -optc-Irts/dist/build/./autogen -optc-Werror=unused-but-set-variable -optc-Wno-error=inline -optc-O2 -optc-fomit-frame-pointer -optc-g -optc-fno-omit-frame-pointer -optc-g -optc-O0 -optc-DRtsWay=\"rts_thr_debug\" -static -optc-DTHREADED_RTS -optc-DDEBUG -eventlog  -O0 -H64m -Wall   -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -DFS_NAMESPACE=rts -this-unit-id rts -dcmm-lint      -i -irts -irts/dist/build -Irts/dist/build -irts/dist/build/./autogen -Irts/dist/build/./autogen            -O2 -Wcpp-undef -O0    -Wnoncanonical-monad-instances  -c rts/fs.c -o rts/dist/build/fs.thr_debug_o

In file included from /nix/store/xz3pnhwaanqq18nk47zmr8fr6yc7qpjf-glibc-2.27-dev/include/bits/libc-header-start.h:33:0: error:
    0,
                     from /nix/store/xz3pnhwaanqq18nk47zmr8fr6yc7qpjf-glibc-2.27-dev/include/stdio.h:27,
                     from rts/fs.h:14,
                     from rts/fs.c:11:

/nix/store/xz3pnhwaanqq18nk47zmr8fr6yc7qpjf-glibc-2.27-dev/include/features.h:381:4: error:
     warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
     #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
        ^~~~~~~
    |
381 | #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
    |    ^

When running ./validate, these warnings become errors.