-
Notifications
You must be signed in to change notification settings - Fork 208
HIE build issues (macOS) #1664
Comments
MacOS Mojave 10.14.6.
Attempt to build HIE-8.8.2 fails: $ ./cabal-hie-install hie
. . . . .
# cabal (for hie-8.8.2)
# cabal (for hie-8.8.2)
Wrote tarball sdist to
/Users/ur20980/src/haskell-ide-engine/dist-newstyle/sdist/haskell-ide-engine-1.1.tar.gz
Wrote tarball sdist to
/Users/ur20980/src/haskell-ide-engine/dist-newstyle/sdist/hie-plugin-api-1.1.tar.gz
Wrote tarball sdist to
/Users/ur20980/src/haskell-ide-engine/dist-newstyle/sdist/cabal-helper-1.0.0.0.tar.gz
Resolving dependencies...
Build profile: -w ghc-8.8.2 -O1
In order, the following will be built (use -v for more details):
- haddock-api-2.23.0 (lib) (requires build)
- haskell-ide-engine-1.1 (lib) (requires build)
- haskell-ide-engine-1.1 (exe:hie) (requires build)
- haskell-ide-engine-1.1 (exe:hie-wrapper) (requires build)
Starting haddock-api-2.23.0 (lib)
Building haddock-api-2.23.0 (lib)
Failed to build haddock-api-2.23.0.
Build log ( /Users/ur20980/.cabal/logs/ghc-8.8.2/hddck-p-2.23.0-575f5d80.log
):
Configuring library for haddock-api-2.23.0..
Preprocessing library for haddock-api-2.23.0..
Building library for haddock-api-2.23.0..
[ 1 of 40] Compiling Haddock.Backends.HaddockDB ( src/Haddock/Backends/HaddockDB.hs, dist/build/Haddock/Backends/HaddockDB.o )
[ 2 of 40] Compiling Haddock.Backends.Hyperlinker.Types ( src/Haddock/Backends/Hyperlinker/Types.hs, dist/build/Haddock/Backends/Hyperlinker/Types.o )
[ 3 of 40] Compiling Haddock.Backends.Xhtml.Types ( src/Haddock/Backends/Xhtml/Types.hs, dist/build/Haddock/Backends/Xhtml/Types.o )
[ 4 of 40] Compiling Haddock.Syb ( src/Haddock/Syb.hs, dist/build/Haddock/Syb.o )
[ 5 of 40] Compiling Haddock.Types ( src/Haddock/Types.hs, dist/build/Haddock/Types.o )
[ 6 of 40] Compiling Haddock.Parser ( src/Haddock/Parser.hs, dist/build/Haddock/Parser.o )
[ 7 of 40] Compiling Haddock.ModuleTree ( src/Haddock/ModuleTree.hs, dist/build/Haddock/ModuleTree.o )
[ 8 of 40] Compiling Haddock.Interface.Specialize ( src/Haddock/Interface/Specialize.hs, dist/build/Haddock/Interface/Specialize.o )
[ 9 of 40] Compiling Haddock.Interface.ParseModuleHeader ( src/Haddock/Interface/ParseModuleHeader.hs, dist/build/Haddock/Interface/ParseModuleHeader.o )
[10 of 40] Compiling Haddock.Interface.LexParseRn ( src/Haddock/Interface/LexParseRn.hs, dist/build/Haddock/Interface/LexParseRn.o )
[11 of 40] Compiling Haddock.GhcUtils ( src/Haddock/GhcUtils.hs, dist/build/Haddock/GhcUtils.o )
[12 of 40] Compiling Haddock.Interface.Rename ( src/Haddock/Interface/Rename.hs, dist/build/Haddock/Interface/Rename.o )
[13 of 40] Compiling Haddock.Backends.Hyperlinker.Parser ( src/Haddock/Backends/Hyperlinker/Parser.hs, dist/build/Haddock/Backends/Hyperlinker/Parser.o )
[14 of 40] Compiling Haddock.Convert ( src/Haddock/Convert.hs, dist/build/Haddock/Convert.o )
src/Haddock/Convert.hs:621:39: error:
• Variable not in scope: injectiveVarsOfBinder :: TyConBinder -> FV
• Perhaps you meant ‘injectiveVarsOfType’ (imported from TyCoRep)
|
621 | mapUnionFV injectiveVarsOfBinder dropped_binders
| ^^^^^^^^^^^^^^^^^^^^^
cabal: Failed to build haddock-api-2.23.0 (which is required by exe:hie from
haskell-ide-engine-1.1 and exe:hie-wrapper from haskell-ide-engine-1.1). See
the build log above for details.
Error when running Shake build system:
at want, called at src/Development/Shake/Internal/Args.hs:83:69 in shk-0.18.5-2738c4ee:Development.Shake.Internal.Args
* Depends on: hie
at apply1, called at src/Development/Shake/Internal/Rules/Rerun.hs:41:5 in shk-0.18.5-2738c4ee:Development.Shake.Internal.Rules.Rerun
* Depends on: latest
at apply1, called at src/Development/Shake/Internal/Rules/Rerun.hs:41:5 in shk-0.18.5-2738c4ee:Development.Shake.Internal.Rules.Rerun
* Depends on: hie-8.8.2
at command, called at src/Cabal.hs:36:13 in hie-install-0.8.0.0-inplace:Cabal
* Raised the exception:
Development.Shake.command, system command failed
Command line: cabal v2-install -w /Users/ur20980/.ghcup/bin/ghc-8.8.2 --write-ghc-environment-files=never --installdir /Users/ur20980/.cabal/bin --max-backjumps=5000 exe:hie --overwrite-policy=always
Exit code: 1
Stderr:
cabal: Failed to build haddock-api-2.23.0 (which is required by exe:hie from
haskell-ide-engine-1.1 and exe:hie-wrapper from haskell-ide-engine-1.1). See
the build log above for details.
$ cabal --version
cabal-install version 3.0.0.0
compiled using version 3.0.0.0 of the Cabal library
$ stack --version
Version 2.1.3, Git revision 0fa51b9925decd937e4a993ad90cb686f88fa282 (7739 commits) x86_64 hpack-0.31.2
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.8.2
$ ghcup list
Available versions:
✗ ghc 7.10.3 7.10
✔ ghc 8.0.2 8.0
✗ ghc 8.2.2 8.2
✗ ghc 8.4.1
✗ ghc 8.4.2
✗ ghc 8.4.3
✗ ghc 8.4.4 8.4
✗ ghc 8.6.1 bad
✗ ghc 8.6.2
✔ ghc 8.6.3
✔ ghc 8.6.4
✔ ghc 8.6.5 recommended,8.6
✗ ghc 8.8.1
✔ ghc 8.8.2 latest,8.8
$ |
And making it more verbose:
|
As a start I would recommend using the same GHC as is installed by stack. So something like |
Is there a difference between I'm trying to avoid keeping extraneous copies of GHC if at all possible, as reach of them takes an insane amount of disk space. And I need to have GHC available to Cabal, in addition to Stack. Also, on a fresh install on a machine re-imaged to MacOS Catalina (again, GHC 8.6.5 and 8.8.2 were installed by |
Other option could be download GHC with stack and put them on $PATH to make them visible for cabal (i use that way in my windows systems) Anyway i am setting up a azure ci job using cabal and ghc on macos 10.14, installing them with homebrew, to see if i can reproduce the error. |
@alanz very same error. I've disabled using system-ghc, made stack download it's "own" GHC-8.8.2, and ran the build. Here's the complete log: $ stack setup 8.8.2
Stack has not been tested with GHC versions above 8.6, and using 8.8.2, this may fail
Stack has not been tested with Cabal versions above 2.4, but version 3.0.1.0 was found, this may fail
snapshot-doc-root: /Users/ur20980/.stack/snapshots/x86_64-osx/246bb9fac574ce1ead442c7e11579947b977f97509b57378dc8ed42c51f4a500/8.8.2/doc
local-doc-root: /Users/ur20980/src/haskell-ide-engine/.stack-work/install/x86_64-osx/246bb9fac574ce1ead442c7e11579947b977f97509b57378dc8ed42c51f4a500/8.8.2/doc
local-hoogle-root: /Users/ur20980/src/haskell-ide-engine/.stack-work/hoogle/x86_64-osx/246bb9fac574ce1ead442c7e11579947b977f97509b57378dc8ed42c51f4a500/8.8.2
Stack has not been tested with GHC versions above 8.6, and using 8.8.2, this may fail
Stack has not been tested with Cabal versions above 2.4, but version 3.0.1.0 was found, this may fail
stack-root: /Users/ur20980/.stack
project-root: /Users/ur20980/src/haskell-ide-engine
config-location: /Users/ur20980/src/haskell-ide-engine/stack.yaml
bin-path: /Users/ur20980/.stack/snapshots/x86_64-osx/7f95666aa519b44848684ceab2d179c9452d834c2ff221aaa6bed8c1d0a48355/8.8.2/bin:/Users/ur20980/.stack/compiler-tools/x86_64-osx/ghc-8.8.2/bin:/Users/ur20980/.stack/programs/x86_64-osx/ghc-8.8.2/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/Library/TeX/texbin:/usr/local/go/bin:/usr/local/MacGPG2/bin:/Library/OpenSC/bin:/opt/X11/bin:/Applications/Wireshark.app/Contents/MacOS:/Users/ur20980/.cargo/bin:/Users/ur20980/.cabal/bin:/Users/ur20980/.ghcup/bin:/Users/ur20980/.local/bin:/Users/ur20980/Library/Haskell/bin:/Users/ur20980/bin:/Library/Java/NSS/bin:/Users/ur20980/go/bin:/opt/jruby/bin:/opt/local/Library/Frameworks/Python.framework/Versions/3.7/bin:/Users/ur20980/Library/Python/3.7/bin:/opt/GNAT/2019/bin
programs: /Users/ur20980/.stack/programs/x86_64-osx
compiler-exe: /Users/ur20980/.stack/programs/x86_64-osx/ghc-8.8.2/bin/ghc-8.8.2
compiler-bin: /Users/ur20980/.stack/programs/x86_64-osx/ghc-8.8.2/bin
compiler-tools-bin: /Users/ur20980/.stack/compiler-tools/x86_64-osx/ghc-8.8.2/bin
local-bin: /Users/ur20980/.local/bin
extra-include-dirs: /opt/local/include, /usr/local/include
extra-library-dirs: /opt/local/lib/liconv, /opt/local/lib, /usr/local/lib
snapshot-pkg-db: /Users/ur20980/.stack/snapshots/x86_64-osx/7f95666aa519b44848684ceab2d179c9452d834c2ff221aaa6bed8c1d0a48355/8.8.2/pkgdb
local-pkg-db: /Users/ur20980/src/haskell-ide-engine/.stack-work/install/x86_64-osx/7f95666aa519b44848684ceab2d179c9452d834c2ff221aaa6bed8c1d0a48355/8.8.2/pkgdb
global-pkg-db: /Users/ur20980/.stack/programs/x86_64-osx/ghc-8.8.2/lib/ghc-8.8.2/package.conf.d
ghc-package-path: /Users/ur20980/src/haskell-ide-engine/.stack-work/install/x86_64-osx/7f95666aa519b44848684ceab2d179c9452d834c2ff221aaa6bed8c1d0a48355/8.8.2/pkgdb:/Users/ur20980/.stack/snapshots/x86_64-osx/7f95666aa519b44848684ceab2d179c9452d834c2ff221aaa6bed8c1d0a48355/8.8.2/pkgdb:/Users/ur20980/.stack/programs/x86_64-osx/ghc-8.8.2/lib/ghc-8.8.2/package.conf.d
snapshot-install-root: /Users/ur20980/.stack/snapshots/x86_64-osx/7f95666aa519b44848684ceab2d179c9452d834c2ff221aaa6bed8c1d0a48355/8.8.2
local-install-root: /Users/ur20980/src/haskell-ide-engine/.stack-work/install/x86_64-osx/7f95666aa519b44848684ceab2d179c9452d834c2ff221aaa6bed8c1d0a48355/8.8.2
dist-dir: .stack-work/dist/x86_64-osx/Cabal-3.0.1.0
local-hpc-root: /Users/ur20980/src/haskell-ide-engine/.stack-work/install/x86_64-osx/7f95666aa519b44848684ceab2d179c9452d834c2ff221aaa6bed8c1d0a48355/8.8.2/hpc
local-bin-path: /Users/ur20980/.local/bin
ghc-paths: /Users/ur20980/.stack/programs/x86_64-osx
$ stack clean --full
$ stack ./install.sh hie
-- While building package hie-install-0.8.0.0 using:
/Users/ur20980/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.5 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.4.0.1 build lib:hie-install --ghc-options ""
Process exited with code: ExitFailure 1
$ Notice that it refuses to use Cabal-3.0.1.0, but instead sticks to Cabal-2.4.0.1. UpdateTried to force this stack-installed GHC-8.8.2 on the PATH. Same result: $ stack clean --full
$ type ghc
ghc is /Users/ur20980/.stack/programs/x86_64-osx/ghc-8.8.2/bin/ghc
$ stack -v --resolver lts-15.0 ./install.hs hie
-- While building package hie-install-0.8.0.0 using:
/Users/ur20980/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_3.0.1.0_ghc-8.8.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-3.0.1.0 build lib:hie-install --ghc-options " -fdiagnostics-color=always"
Process exited with code: ExitFailure 1
$ stack -v ./install.hs hie
-- While building package hie-install-0.8.0.0 using:
/Users/ur20980/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.5 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.4.0.1 build lib:hie-install --ghc-options " -fdiagnostics-color=always"
Process exited with code: ExitFailure 1
$ |
Ok, the |
I'll have some projects using GHC-8.6.5, and some - using GCH-8.8.2. If I don't need two HIE builds to support them both - I'll happily use Changed everything to
|
Reverted to $ stack clean --full
The same package name is used in multiple local packages
haddock-api used in:
- PLImmutable (PLIHackage (PackageIdentifier {pkgName = PackageName "haddock-api", pkgVersion = mkVersion [2,23,0]}) 2c6e61928d369e603525a0fca2a2fc4a503dc64ebadc4d497f5e5d44f09801f8,5591 (TreeKey 9b08132118bb6a7334fe65b016815be1aac17dfc16f014922c636427006774a7,4453))
- PLImmutable (PLIRepo Git repo at https://github.com/haskell/haddock.git, commit be8b02c4e3cffe7d45b3dad0a0f071d35a274d65 in subdirectory haddock-api (PackageMetadata {pmIdent = PackageIdentifier {pkgName = PackageName "haddock-api", pkgVersion = mkVersion [2,23,0]}, pmTreeKey = TreeKey 5e3a0d31b28f2e1974146a390a0f1c8ce447c640dee96365305b7c03aa22bb33,5225, pmCabal = 2c6e61928d369e603525a0fca2a2fc4a503dc64ebadc4d497f5e5d44f09801f8,5591}))
$ stack -v ./install.hs hie
-- While building package hie-install-0.8.0.0 using:
/Users/ur20980/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.5 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.4.0.1 build lib:hie-install --ghc-options " -fdiagnostics-color=always"
Process exited with code: ExitFailure 1
$ |
Mmm, ok, maybe building the script can give us more clues about the cause, |
I've hit your initial error in azure ci using cabal-hie-install :
With stack the error in your system is building the script itself (before it can start to build hie). |
To fix the installation with cabal, try add to
It would use a version of haddock-api fixed for ghc-8.8.2. It was not added cause it breaks the build for other ghc versions than 8.8.2 |
So,
That seemed to work OK, and installed a working HIE-8.8.2. Thank you! UpdateA question: I need to be able to rebuild (when updates arrive ;) HIE for 8.6.5 and 8.8.2 (until 8.6.5 becomes obsolete). To accomplish that, should I just enable/disable that addition to |
There is another way: you can copy the working |
@mouse07410 About the error building the script with stack, it seems you have somewhere some config option set to pass Anyway i am gonna correct the build script to remove the unuseds imports. |
I'm pretty sure I have
Thank you!! BTW, maybe you could offer some guidance and respond to this: #1650 (comment) |
@jneira do you know if there's a way to have several |
Afaik there is no an automatic way built in cabal (and neither hie cause it follows cabal here). Cabal looks for |
:-(
Thank you!! P.S. I examined all of my global config files, and noticed that one of them had |
@awave1 hi! i have not access to a macos machine but i've changed all macos azure jobs to use macos-10.15 (instead the default 10.14) and they are all green:
|
@jneira that's cool, thanks! I'll try configuring it again over the weekend and will update with the results |
Sounds good, the |
Duplicate imports in the install script has been removed by #1665 |
Hi,
I'm getting some build errors (again) on macOS 10.15.3 (19D76).
Here's my log output for
stack ./install.hs hie-8.6.5 --verbose
:I tried re-building
hie
usingstack clean --full
and thenstack ./install.hs hie-8.6.5
, but still get the same error.It seems the build fails because of this:
I installed
argp-stanalone
and added-largp
toLDFLAGS
, unfortunately that did not help.Also, note that building a simple project with stack works fine, e.g.
Any ideas why it would be failing?
The text was updated successfully, but these errors were encountered: