stschiff / sequenceTools

Other
39 stars 10 forks source link

GHC/stack/SequenceTools issue -- can't install #28

Closed batelz closed 1 year ago

batelz commented 1 year ago

I'm trying to install SequenceTools

When following the instructions here, I've Downloaded and installed stack: stack --version Version 2.7.5, Git revision ba147e6f59b2da75b1beb98b1888cce97f7032b1 x86_64 hpack-0.34.4

Then, I run stack install sequenceTools --resolver nightly batelziv@DESKTOP-PGCKNUM:~$ stack install sequenceTools --resolver nightly

Selected resolver: nightly-2022-08-04
Stack has not been tested with GHC versions above 9.0, and using 9.2.4, this may fail
Preparing to install GHC (tinfo6) to an isolated location.
This will not interfere with any system-level installation.
Already downloaded.
ghc-pkg: Couldn't open database /home/batelziv/.stack/programs/x86_64-linux/ghc-tinfo6-9.2.4/lib/ghc-9.2.4/package.conf.d for modification: {handle: /home/batelziv/.stack/programs/x86_64-linux/ghc-tinfo6-9.2.4/lib/ghc-9.2.4/package.conf.d/package.cache.lock}: hLock: invalid argument (Invalid argument)
make[1]: *** [ghc.mk:989: install_packages] Error 1
make: *** [Makefile:51: install] Error 2
Received ExitFailure 2 when running
Raw command: /usr/bin/make install
Run from: /home/batelziv/.stack/programs/x86_64-linux/ghc-tinfo6-9.2.4.temp/ghc-9.2.4/

Error: Error encountered while installing GHC with
         make install
         run in /home/batelziv/.stack/programs/x86_64-linux/ghc-tinfo6-9.2.4.temp/ghc-9.2.4/

       The following directories may now contain files, but won't be used by stack:
         - /home/batelziv/.stack/programs/x86_64-linux/ghc-tinfo6-9.2.4.temp/
         - /home/batelziv/.stack/programs/x86_64-linux/ghc-tinfo6-9.2.4/

       For more information consider rerunning with --verbose flag

Installing GHC ...

When I check the chmod of the database mentioned in the errors above, I get ls -l /home/batelziv/.stack/programs/x86_64-linux/ghc-tinfo6-9.2.4/lib/ghc-9.2.4/package.conf.d

total 0
-rw-r--r-- 1 batelziv batelziv 0 Aug 11 12:17 package.cache.lock

I've also tried installing though source, then I get: batelziv@DESKTOP-PGCKNUM:~/sequenceTools$ stack install

Cabal file info not found for sequence-formats-1.6.3, updating
Selected mirror https://hackage.haskell.org/
Downloading root
Waiting to acquire cache lock on /home/batelziv/.stack/pantry/hackage/hackage-security-lock
fdLock: invalid argument (Invalid argument)

Is it a stack/ghc issue? Up until now, SequenceTools is the only application i've used it for...

Any ideas on where to start on solving this issue?

stschiff commented 1 year ago

Hmm... OK, could you try stack install sequenceTools --lts-17.0 please?

stschiff commented 1 year ago

I might have to change that in the README.

stschiff commented 1 year ago

You could also try the compiled versions I provide here if you can't compile it.

batelz commented 1 year ago

Hmm... OK, could you try stack install sequenceTools --lts-17.0 please?

This option is not valid. batelziv@DESKTOP-PGCKNUM:~$ stack install sequenceTools --lts-17.0

Invalid option `--lts-17.0'

Usage: stack install [TARGET] [--dry-run] [--pedantic] [--fast]
                     [--ghc-options OPTIONS] [--flag PACKAGE:[-]FLAG]
                     [--dependencies-only | --only-snapshot |
                       --only-dependencies | --only-locals]
                     [--file-watch | --file-watch-poll] [--watch-all]
                     [--exec COMMAND [ARGUMENT(S)]] [--only-configure] [--trace]
                     [--profile] [--no-strip] [--[no-]library-profiling]
                     [--[no-]executable-profiling] [--[no-]library-stripping]
                     [--[no-]executable-stripping] [--[no-]haddock]
                     [--haddock-arguments HADDOCK_ARGS] [--[no-]open]
                     [--[no-]haddock-deps] [--[no-]haddock-internal]
                     [--[no-]haddock-hyperlink-source] [--[no-]copy-bins]
                     [--[no-]copy-compiler-tool] [--[no-]prefetch]
                     [--[no-]keep-going] [--[no-]keep-tmp-files]
                     [--[no-]force-dirty] [--[no-]test] [--[no-]rerun-tests]
                     [--ta|--test-arguments TEST_ARGS] [--coverage]
                     [--no-run-tests] [--test-suite-timeout ARG] [--[no-]bench]
                     [--ba|--benchmark-arguments BENCH_ARGS]
                     [--no-run-benchmarks] [--[no-]reconfigure]
                     [--[no-]cabal-verbose] [--[no-]split-objs] [--skip ARG]
                     [--[no-]interleaved-output] [--ddump-dir ARG]
                     [--setup-info-yaml URL] [--snapshot-location-base URL]
                     [--help]
  Shortcut for 'build --copy-bins'
batelz commented 1 year ago

You could also try the compiled versions I provide here if you can't compile it.

Yes! This worked great.

Thank you.

stschiff commented 1 year ago

Sorry, I meant stack install sequenceTools --resolver lts-17.0

batelz commented 1 year ago

Sorry, I meant stack install sequenceTools --resolver lts-17.0

No, problem persists... batelziv@DESKTOP-PGCKNUM:~$ stack install sequenceTools --resolver lts-17.0

Preparing to install GHC (tinfo6) to an isolated location.
This will not interfere with any system-level installation.
Downloaded ghc-tinfo6-8.10.3.
ghc-pkg: Couldn't open database /home/batelziv/.stack/programs/x86_64-linux/ghc-tinfo6-8.10.3/lib/ghc-8.10.3/package.conf.d for modification: {handle: /home/batelziv/.stack/programs/x86_64-linux/ghc-tinfo6-8.10.3/lib/ghc-8.10.3/package.conf.d/package.cache.lock}: hLock: invalid argument (Invalid argument)
make[1]: *** [ghc.mk:973: install_packages] Error 1
make: *** [Makefile:51: install] Error 2
Received ExitFailure 2 when running
Raw command: /usr/bin/make install
Run from: /home/batelziv/.stack/programs/x86_64-linux/ghc-tinfo6-8.10.3.temp/ghc-8.10.3/

Error: Error encountered while installing GHC with
         make install
         run in /home/batelziv/.stack/programs/x86_64-linux/ghc-tinfo6-8.10.3.temp/ghc-8.10.3/

       The following directories may now contain files, but won't be used by stack:
         - /home/batelziv/.stack/programs/x86_64-linux/ghc-tinfo6-8.10.3.temp/
         - /home/batelziv/.stack/programs/x86_64-linux/ghc-tinfo6-8.10.3/

       For more information consider rerunning with --verbose flag

Installing GHC ...
stschiff commented 1 year ago

Hmm OK. Looks like the stack build tool faces issues in your case with installing GHC. I could probably get this running somehow, but I think supporting implementing a fully working Haskell build pipeline is a bit beyond the scope of this issue. I'll close this for now but will change the README to encourage people to use the precompiled executables.

stschiff commented 1 year ago

I have just updated the README with hopefully more useful installation instructions. I have also changed the way I recommend to install from source, by first cloning this repository and then running stack install within. That should be safer in my experience.