Skip to content

happy-1.19.9/HappyTemplate-arrays-coerce: openFile: does not exist (No such file or directory) #5867

@agander

Description

@agander

I am building ghc using nix with:
nix-shell ./ghc.nix/ --run 'hadrian/build.sh -c -j --flavour=devel2 --build-root=_build test'
and have the following error:
| Run Happy: compiler/cmm/CmmParse.y => _build/stage0/compiler/build/CmmParse.hs
happy: /home/gander/.cabal/share/x86_64-linux-ghc-8.4.3/happy-1.19.9/HappyTemplate-arrays-coerce: openFile: does not exist (No such file or directory)
shakeArgsWith 0.000s 0%
Function shake 0.008s 0%
Database read 0.029s 0%
With database 0.002s 0%
Running rules 10.197s 99% =========================
Total 10.236s 100%
Error when running Shake build system:
at src/Main.hs:58:30-42:

  • Depends on: test
    at src/Hadrian/Builder.hs:70:5-23:
  • Depends on: _build/stage1/bin/ghc
    at src/Development/Shake/Internal/Rules/Oracle.hs:157:43-68:
  • Depends on: OracleQ (ContextDataKey (Context {stage = Stage1, package = Package {pkgType = Library, pkgName = "array", pkgPath = "libraries/array"}, way = v}))
    at src/Hadrian/Haskell/Cabal/Parse.hs:202:5-36:
  • Depends on: _build/stage1/libraries/array/setup-config
    at src/Hadrian/Haskell/Cabal/Parse.hs:120:5-14:
  • Depends on: _build/stage1/lib/package.conf.d/base-4.12.0.0.conf
    at src/Development/Shake/Internal/Rules/Oracle.hs:157:43-68:
  • Depends on: OracleQ (ContextDataKey (Context {stage = Stage1, package = Package {pkgType = Library, pkgName = "base", pkgPath = "libraries/base"}, way = v}))
    at src/Hadrian/Haskell/Cabal/Parse.hs:202:5-36:
  • Depends on: _build/stage1/libraries/base/setup-config
    at src/Hadrian/Haskell/Cabal/Parse.hs:120:5-14:
  • Depends on: _build/stage1/lib/package.conf.d/rts-1.0.conf
    at src/Development/Shake/Internal/Rules/Oracle.hs:157:43-68:
  • Depends on: OracleQ (ContextDataKey (Context {stage = Stage1, package = Package {pkgType = Library, pkgName = "rts", pkgPath = "rts"}, way = v}))
    at src/Hadrian/Haskell/Cabal/Parse.hs:202:5-36:
  • Depends on: _build/stage1/rts/setup-config
    at src/Hadrian/Builder.hs:70:5-23:
  • Depends on: _build/stage0/bin/ghc
    at src/Utilities.hs:71:18-22:
  • Depends on: _build/stage0/compiler/build/libHSghc-8.7.a
    at src/Rules/Library.hs:118:5-30:
  • Depends on: _build/stage0/compiler/build/RtClosureInspect.o
    at src/Development/Shake/Internal/Rules/Oracle.hs:157:43-68:
  • Depends on: OracleQ (KeyValues ("_build/stage0/compiler/.dependencies","_build/stage0/compiler/build/RtClosureInspect.o"))
    at src/Hadrian/Oracles/TextFile.hs:96:9-20:
  • Depends on: _build/stage0/compiler/.dependencies
    at src/Development/Shake/Internal/Derived.hs:118:15-23:
  • Depends on: _build/stage0/compiler/.dependencies.mk
    at src/Rules/Dependencies.hs:25:9-18:
  • Depends on: _build/stage0/compiler/build/CmmParse.hs
  • Raised the exception:
    user error (Development.Shake.cmd, system command failed
    Command: /home/gander/PROJ/haskell/ghc/hadrian/dist-newstyle/build/x86_64-linux/ghc-8.4.3/happy-1.19.9/build/happy/happy -agc --strict compiler/cmm/CmmParse.y -o _build/stage0/compiler/build/CmmParse.hs
    Exit code: 1
    Stderr:
    happy: /home/gander/.cabal/share/x86_64-linux-ghc-8.4.3/happy-1.19.9/HappyTemplate-arrays-coerce: openFile: does not exist (No such file or directory)
    )

I am logging this here because I found mention of the same error here:
https://github.com/haskell/cabal/pull/5132#issuecomment-364333256

nix-shell ./ghc.nix/ --run 'which happy; happy --version'
Entering a GHC development shell with CFLAGS, CPPFLAGS, LDFLAGS and
LD_LIBRARY_PATH correctly set, to be picked up by ./configure.

CC              = /nix/store/lzh9rcw3rjvbaj7n3z4nzsvcz85k2p2m-gcc-wrapper-7.3.0/bin/cc
CC_STAGE0       = /nix/store/lzh9rcw3rjvbaj7n3z4nzsvcz85k2p2m-gcc-wrapper-7.3.0/bin/cc
CFLAGS          = -I/nix/store/c7f4wxaa1a5x1zq1x7w6q2nqmxacvfpi-ghc-build-environment/include
CPPFLAGS        = -I/nix/store/c7f4wxaa1a5x1zq1x7w6q2nqmxacvfpi-ghc-build-environment/include
LDFLAGS         = -L/nix/store/c7f4wxaa1a5x1zq1x7w6q2nqmxacvfpi-ghc-build-environment/lib
LD_LIBRARY_PATH = /nix/store/c7f4wxaa1a5x1zq1x7w6q2nqmxacvfpi-ghc-build-environment/lib
LLVM            = NO
libdw           = YES
numa            = YES
configure flags = --enable-dwarf-unwind

Please report bugs, problems or contributions to
https://github.com/alpmestan/ghc.nix
/nix/store/c7f4wxaa1a5x1zq1x7w6q2nqmxacvfpi-ghc-build-environment/bin/happy
Happy Version 1.19.9 Copyright (c) 1993-1996 Andy Gill, Simon Marlow (c) 1997-2005 Simon Marlow

Happy is a Yacc for Haskell, and comes with ABSOLUTELY NO WARRANTY.
This program is free software; you can redistribute it and/or modify
it under the terms given in the file 'LICENSE' distributed with
the Happy sources.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions