biocom-uib / vpf-tools

Virus Protein Family tools
BSD 3-Clause "New" or "Revised" License
26 stars 7 forks source link

Process exited with code: ExitFailure 1 #20

Closed yannisun closed 2 years ago

yannisun commented 2 years ago

Hi, When I input "stack build", there is an error below. I don't know how to solve it? Can you help me?

Building all executables for `vpf-tools' once. After a successful build of all of them, only specified executables will be rebuilt. vpf-tools> configure (lib + exe) Configuring vpf-tools-0.1.0.0... vpf-tools> build (lib + exe) Preprocessing library for vpf-tools-0.1.0.0.. Building library for vpf-tools-0.1.0.0.. [ 1 of 36] Compiling Control.Distributed.SClosure

/content/vpf-tools/src/Control/Distributed/SClosure.hs:184:16: error: • Couldn't match type: Given (SDict c) with: SInstance c Expected: SDict c -> (SInstance c => a) -> a Actual: SDict c -> (Given (SDict c) => a) -> a • In the expression: give In an equation for ‘reflectSDict’: reflectSDict = give • Relevant bindings include reflectSDict :: SDict c -> (SInstance c => a) -> a (bound at src/Control/Distributed/SClosure.hs:184:1) | 184 | reflectSDict = give | ^^^^

-- While building package vpf-tools-0.1.0.0 (scroll up to its section to see the error) using: /root/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_3.4.1.0_ghc-9.0.2 --builddir=.stack-work/dist/x86_64-linux/Cabal-3.4.1.0 build lib:vpf-tools exe:pipes-test exe:vpf-class --ghc-options " -fdiagnostics-color=always" Process exited with code: ExitFailure 1

bielr commented 2 years ago

Hi,

Did you modify stack.yaml? It looks like you are trying to compile with GHC 9, while our stack.yaml specifies a Stackage snapshot using GHC 8.10.

yannisun commented 2 years ago

Hi,

Did you modify stack.yaml? It looks like you are trying to compile with GHC 9, while our stack.yaml specifies a Stackage snapshot using GHC 8.10.

I feel that I don't modify the stack.yaml.

bielr commented 2 years ago

Can you provide more details about what procedure are you following?

yannisun commented 2 years ago

Can you provide more details about what procedure are you following?

Thanks.

firstly, I run "! curl -sSL https://get.haskellstack.org/ | sh" The output is : `Stack has been installed to: /usr/local/bin/stack

WARNING: '/root/.local/bin' is not on your PATH. Stack will place the binaries it builds in '/root/.local/bin' so for best results, please add it to the beginning of PATH in your `

Then, I added the PATH, import os os.environ['PATH'] += ":/usr/local/bin/stack" ! echo $PATH

Thirdly, I run ! cd vpf-tools ! stack build

The result is : Writing implicit global project config file to: /root/.stack/global-project/stack.yaml Note: You can change the snapshot via the resolver field there. Using latest snapshot resolver: lts-19.11 Preparing to install GHC to an isolated location. This will not interfere with any system-level installation. Downloaded ghc-9.0.2. gcc: error: unrecognized command line option '--target=x86_64-unknown-linux' Installed GHC. Error parsing targets: The specified targets matched no packages. Perhaps you need to run 'stack init'?

So, I run "stack init". the ghc version is 9.0.2

Finally, I run "stack build" again! And the error is like this: -- While building package vpf-tools-0.1.0.0 (scroll up to its section to see the error) using: /root/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_3.4.1.0_ghc-9.0.2 --builddir=.stack-work/dist/x86_64-linux/Cabal-3.4.1.0 build lib:vpf-tools exe:pipes-test exe:vpf-class --ghc-options " -fdiagnostics-color=always" Process exited with code: ExitFailure 1

Maybe I need to change the ghc version.

bielr commented 2 years ago

Why are you root? Are you running this inside a container?

yannisun commented 2 years ago

yes, I use the google colab to run the code

bielr commented 2 years ago

I haven't been able to test vpf-class there, sorry. I have two suggestions then:

yannisun commented 2 years ago

I haven't been able to test vpf-class there, sorry. I have two suggestions then:

  • You shouldn't have to run stack init. Please try again with a clean download of vpf-class and verify that all files are there (specially stack.yaml and package.yaml)
  • Alternatively, you may want to try our docker image (beware that it's still in testing)

Thank you very much for your reply. I have solved the problem.