[GHC] #15564: Plugin recompilation check panics with inline-java

#15564: Plugin recompilation check panics with inline-java -------------------------------------+------------------------------------- Reporter: | Owner: (none) facundo.dominguez | Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.6.1-beta1 Keywords: plugins, | Operating System: Unknown/Multiple plugin recompilation | Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: #15475 Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- When building https://github.com/tweag/inline-java with the beta release of ghc 8.6.1, I'm getting a panic like the one in #15475. {{{ stack --nix --no-terminal build --test --bench --no-run-tests --no-run- benchmarks ... Log files have been written to: /home/centos/inline-java/.stack-work/logs/ -- While building custom Setup.hs for package inline-java-0.8.4 using: /home/centos/.stack/setup-exe-cache/x86_64-linux-nix/Cabal- simple_mPHDZzAJ_2.4.0.0_ghc-8.6.0.20180810 --builddir=.stack- work/dist/x86_64-linux-nix/Cabal-2.4.0.0 build lib:inline-java test:spec --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always" Process exited with code: ExitFailure 1 Logs have been written to: /home/centos/inline-java/.stack-work/logs /inline-java-0.8.4.log Configuring inline-java-0.8.4... Preprocessing library for inline-java-0.8.4.. Building library for inline-java-0.8.4.. [4 of 4] Compiling Language.Java.Inline.Plugin ( src/Language/Java/Inline/Plugin.hs, .stack-work/dist/x86_64-linux- nix/Cabal-2.4.0.0/build/Language/Java/Inline/Plugin.o ) Preprocessing test suite 'spec' for inline-java-0.8.4.. Building test suite 'spec' for inline-java-0.8.4.. [1 of 3] Compiling Language.Java.InlineSpec ( tests/Language/Java/InlineSpec.hs, .stack-work/dist/x86_64-linux- nix/Cabal-2.4.0.0/build/spec/spec-tmp/Language/Java/InlineSpec.o ) ghc: panic! (the 'impossible' happened) (GHC version 8.6.0.20180810 for x86_64-unknown-linux): mkPluginUsage: file not found Language.Java.Inline.Plugin /nix/store /5zgi3snmw1iq704jjaildk7x333s10cw-gradle-4.9/lib/libHSinline-java-0.8.4 -JByd5xgK6QcDkJNlDDk6Qy-ghc8.6.0.20180810.so Call stack: CallStack (from HasCallStack): callStackDoc, called at compiler/utils/Outputable.hs:1164:37 in ghc:Outputable pprPanic, called at compiler/deSugar/DsUsage.hs:215:15 in ghc:DsUsage Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug [centos@ip-172-31-4-204 inline-java]$ stack --nix --no-terminal exec -- env | grep LD_LIBRARY_PATH LD_LIBRARY_PATH=/nix/store/d5xr4h3bhl8iiyds5b59njawq3pnr4xr-openjdk- 8u181b13/lib/openjdk/jre/lib/amd64/server/lib:/nix/store /rc9ksilfsx1pqya4lj8barzzywnvlncl-git-2.18.0/lib:/nix/store /d5xr4h3bhl8iiyds5b59njawq3pnr4xr-openjdk-8u181b13/lib:/nix/store /5zgi3snmw1iq704jjaildk7x333s10cw-gradle-4.9/lib }}} The fact that ghc tries to locate a library in {{/nix/store /5zgi3snmw1iq704jjaildk7x333s10cw-gradle-4.9/lib}} to check for recompilation makes me think that this is an actual bug in GHC. But I would be happy to get some assistance to confirm this. I tried disabling recompilation checking by defining the plugin as: {{{ plugin :: Plugin plugin = defaultPlugin { installCoreToDos = install , pluginRecompile = purePlugin } }}} but the error persists. This is what my dependencies look like in stack.yaml: {{{ packages: - . - jni - jvm - jvm-batching - jvm-streaming - examples/classpath - location: singletons extra-dep: true - location: criterion extra-dep: true - location: polyparse-1.12 extra-dep: true extra-deps: - distributed-closure-0.3.5 - git: https://github.com/haskell/cabal # commit: ac461b381104a39a349d7416ecf1399805c6d000 commit: fe10982db1f2fa7d828fc5f8ddaa5beedceaddec subdirs: - Cabal # - git: https://github.com/goldfirere/singletons.git # commit: 5f867ace69ab12fc98fa71df1cdf7985afa3cb91 - git: https://github.com/haskell/stm.git commit: 4a1deb98fc95e55d8a6762a7dfec1a7dfa8b49b2 - git: https://github.com/goldfirere/th-desugar commit: 0f0a45f7b1f290a6005e6d9d849247f8c3d35429 - git: https://github.com/simonmar/async.git commit: 725ba4bb9679c5d9c7fe0e2d45fda4f470851d40 - git: https://github.com/erikd/vector-algorithms.git commit: 89e87b374d94e8a0c90fc58079ea1343c3ffa7c9 - cpphs-1.20.8 }}} I'll see to share my modifications to singletons, criterion and polyparse, if necessary. I just fixed some dependency bounds and added MonadFail instances. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15564 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15564: Plugin recompilation check panics with inline-java -------------------------------------+------------------------------------- Reporter: | Owner: (none) facundo.dominguez | Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.6.1-beta1 Resolution: | Keywords: plugins, | plugin recompilation Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #15475 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by mpickering): This is fixed on the branch I think. If you are using nix can you confirm using the version of beta1 I built which also includes the patch D5048 (https://phabricator.haskell.org/D5048)? {{{ cachix use mpickering nix-shell -I nixpkgs=https://github.com/mpickering/head.hackage/archive/master.tar.gz -p haskellPackages.ghc }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15564#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15564: Plugin recompilation check panics with inline-java -------------------------------------+------------------------------------- Reporter: | Owner: (none) facundo.dominguez | Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.6.1-beta1 Resolution: | Keywords: plugins, | plugin recompilation Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #15475 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by facundo.dominguez): I'm checking it. It is likely that your assessment is correct. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15564#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15564: Plugin recompilation check panics with inline-java -------------------------------------+------------------------------------- Reporter: | Owner: (none) facundo.dominguez | Type: bug | Status: closed Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.6.1-beta1 Resolution: duplicate | Keywords: plugins, | plugin recompilation Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #15475 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by facundo.dominguez): * status: new => closed * resolution: => duplicate Comment: Using the ghc with the fixes worked, indeed. Thanks for the heads up. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15564#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC