input-output-hk / plutus-pioneer-program

This repository hosts the lectures of the Plutus Pioneers Program. This program is a training course that the IOG Education Team provides to recruit and train software developers in Plutus, the native smart contract language for the Cardano ecosystem.
1.39k stars 987 forks source link

Haskell Language Server: GHC Runtime linker: fatal error #76

Closed TheMC47 closed 1 year ago

TheMC47 commented 2 years ago

Hello,

I'm on Archlinux and I tried setting up the environment variable, everything works except for HLS. There are some posts about the same issue in discord and on the stack exchange, none had an answer, so I'm opening an issue.

These are the steps:

  1. clone plutus-apps and checkout 4114992
  2. configure nix and run nix-shell
  3. clone plutus-pioneer-program.
  4. in plutus-pioneer-program/code/week01, run cabal update and then cabal build
  5. run haskell-language-server in the terminal. Error:
haskell-language-server version: 1.3.0.0 (GHC: 8.10.4.20210212) (PATH: /nix/store/1f5m9aq39by56hbky1pz7dd52f4ikam8-haskell-language-server-exe-haskell-language-server-1.3.0.0/bin/haskell-language-server)
 ghcide setup tester in /home/yecinem/plutus/plutus-pioneer-program/code/week01.
Report bugs at https://github.com/haskell/haskell-language-server/issues

Step 1/4: Finding files to test in /home/yecinem/plutus/plutus-pioneer-program/code/week01
Found 1 files

Step 2/4: Looking for hie.yaml files that control setup
Found 1 cradle
  (/home/yecinem/plutus/plutus-pioneer-program/code/week01/hie.yaml)

Step 3/4: Initializing the IDE

Step 4/4: Type checking the files
2022-01-13 14:35:44.202485745 [ThreadId 48] INFO hls:   Consulting the cradle for "src/Week01/EnglishAuction.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/yecinem/plutus/plutus-pioneer-program/code/week01", cradleOptsProg = CradleAction: Cabal}
> Build profile: -w ghc-8.10.4.20210212 -O1
> In order, the following will be built (use -v for more details):
>  - plutus-pioneer-program-week01-0.1.0.0 (lib) (first run)
> Preprocessing library for plutus-pioneer-program-week01-0.1.0.0..
2022-01-13 14:35:45.53779415 [ThreadId 48] INFO hls:    Using interface files cache dir: /home/yecinem/.cache/ghcide/plutus-pioneer-program-week01-0.1.0.0-inplace-1b9e41bb341ffe312c5f8953d9cf40856a287f15
2022-01-13 14:35:45.538071346 [ThreadId 48] INFO hls:   Making new HscEnv[plutus-pioneer-program-week01-0.1.0.0-inplace]
GHC runtime linker: fatal error: I found a duplicate definition for symbol
   sqlite3_fts3_may_be_corrupt
whilst processing object file
   /nix/store/jmhwwzn1yfjzlxavz16afkf1r4shmp8z-persistent-sqlite-lib-persistent-sqlite-2.13.0.3/lib/x86_64-linux-ghc-8.10.4.20210212/persistent-sqlite-2.13.0.3-8rnIaulr0SMFWDeiU7TZN4/HSpersistent-sqlite-2.13.0.3-8rnIaulr0SMFWDeiU7TZN4.o
The symbol was previously defined in
   /nix/store/si95pc9hb5hr1yiyj7b2s75hl4bkn9g2-direct-sqlite-lib-direct-sqlite-2.3.26/lib/x86_64-linux-ghc-8.10.4.20210212/direct-sqlite-2.3.26-Gg0YVBPVrMk3LDxZxB2Bzf/HSdirect-sqlite-2.3.26-Gg0YVBPVrMk3LDxZxB2Bzf.o
This could be caused by:
   * Loading two different object files which export the same symbol
   * Specifying the same object file twice on the GHCi command line
   * An incorrect `package.conf' entry, causing some object to be
     loaded twice.
2022-01-13 14:35:50.125538864 [ThreadId 165] INFO hls:  File:     /home/yecinem/plutus/plutus-pioneer-program/code/week01/src/Week01/EnglishAuction.hs
Hidden:   no
Range:    1:1-2:1
Source:   compiler
Severity: DsError
Message:
  loadObj
  "/nix/store/jmhwwzn1yfjzlxavz16afkf1r4shmp8z-persistent-sqlite-lib-persistent-sqlite-2.13.0.3/lib/x86_64-linux-ghc-8.10.4.20210212/persistent-sqlite-2.13.0.3-8rnIaulr0SMFWDeiU7TZN4/HSpersistent-sqlite-2.13.0.3-8rnIaulr0SMFWDeiU7TZN4.o":
  failed
2022-01-13 14:35:50.125780264 [ThreadId 182] INFO hls:  finish: User TypeCheck (took 4.56s)
2022-01-13 14:35:50.126128185 [ThreadId 186] INFO hls:  finish: GetHie (took 0.00s)
2022-01-13 14:35:50.126325983 [ThreadId 188] INFO hls:  finish: GenerateCore (took 0.00s)
Files that failed:
 * /home/yecinem/plutus/plutus-pioneer-program/code/week01/src/Week01/EnglishAuction.hs

Completed (0 files worked, 1 file failed)

Not sure if I also should file a bug somewhere else.

Thank you!

juliusfrost commented 2 years ago

I can confirm that this is still an issue in week01-week03

fyusuf-a commented 2 years ago

I have the same problem for week03. It prevents definitions on hover to load in neovim and this is a pain.

kozer commented 2 years ago

any news on that?

luisantonioig commented 1 year ago

Hi @TheMC47,

I hope this message finds you well.

I wanted to inform you that we have decided to close this issue as it pertains to an old branch of the course. Please note that these branches are not actively maintained and are kept for historical purposes.

We encourage you to utilize the branch that best suits your needs, whether it's the current version or any other relevant branch.

Please don't hesitate to reach out if you have any questions or require further assistance. We're here to help!

Thank you for your understanding and your valuable contributions.