Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Libtinfo "does not exist" when trying to install Haskell-stack #2

Open
eghere opened this issue Mar 30, 2022 · 6 comments
Open

Libtinfo "does not exist" when trying to install Haskell-stack #2

eghere opened this issue Mar 30, 2022 · 6 comments

Comments

@eghere
Copy link

eghere commented Mar 30, 2022

I am trying to install haskell-stack-git so that i can run stack to compile the program.

]$ yay -S haskell-stack-git
 -> Could not find all required packages:
	libtinfo (Wanted by: haskell-stack-git)
	libtinfo (Wanted by: haskell-stack-git -> haskell-stack-git)

When installing haskell, I get an error that says libtinfo is not installed. Upon doing ls -l /usr/lib | grep tlibinfo I get

-rwxr-xr-x   1 root root        24 Feb  3 14:16 libtinfo.so
lrwxrwxrwx   1 root root        24 Mar 30 11:10 libtinfo.so.5 -> /usr/lib/libncurses.so.5
lrwxrwxrwx   1 root root        16 Feb  3 14:16 libtinfo.so.6 -> libncursesw.so.6

libtinfo is clearly installed, but I think it's not being recognized on my machine. Libtinfo as an AUR repository seems to be nonexistent as well.

@eghere eghere changed the title Installation instructions are unclear Libtinfo "does not exist" when trying to install Haskell-stack Mar 30, 2022
@Rasie1
Copy link
Owner

Rasie1 commented Apr 1, 2022

I remember some problems with libtinfo/ncurses very long ago on AUR, but they are solvable.

On AUR, I think the needed package is named something like ncurses5-compat-libs, did you try it?

Might be something useful at the bottom of this thread commercialhaskell/stack#257

@eghere
Copy link
Author

eghere commented Apr 1, 2022

ncurses5-compat-libs is already installed.

Looking in the thread you linked, I just tried running sudo pacman -S stack which was able to install. But then running the command in the install returns this:

]$ stack build && stack exec shortcut-highlighter
Specified source-dir "test" does not exist
Building all executables for `shortcut-highlighter' once. After a successful build of all of them, only specified executables will be rebuilt.

Warning: Directory listed in shortcut-highlighter.cabal file does not exist: test
shortcut-highlighter> build (exe)
Preprocessing executable 'shortcut-highlighter' for shortcut-highlighter-0.1.0.0..
Building executable 'shortcut-highlighter' for shortcut-highlighter-0.1.0.0..
[ 1 of 11] Compiling Color

/home/eghere/Programs/shortcut-highlighter/src/Color.hs:6:1: error:
    Could not find module ‘Control.Monad.Trans.State’
    Perhaps you meant
      Control.Monad.State (from mtl-2.2.2)
      Control.Monad.Trans (from mtl-2.2.2)
    Use -v to see a list of the files searched for.
  |
6 | import Control.Monad.Trans.State
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


Warning: Directory listed in shortcut-highlighter.cabal file does not exist: test

--  While building package shortcut-highlighter-0.1.0.0 (scroll up to its section to see the error) using:
      /home/eghere/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-2.2.0.1 build exe:shortcut-highlighter --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1

@eghere
Copy link
Author

eghere commented Apr 1, 2022

I also don't know if this means anything important, but trying to run yay -S haskell-stack-git now returns only one libtinfo missing dependency instead of two (after running the previous commands):

]$ yay -S haskell-stack-git
 -> Could not find all required packages:
	libtinfo (Wanted by: haskell-stack-git)

@Rasie1
Copy link
Owner

Rasie1 commented Apr 1, 2022

My laptop with shortcut-highlighter doesn't have neither libtinfo nor ncurses packages, nor haskell-* packages. The only one is "stack". Maybe you'll try removing all of that, then installing stack and then running stack setup, stack install, etc? Because different distributions of stack from aur are conflicting and there should be only one as far as I remember

@eghere
Copy link
Author

eghere commented Apr 1, 2022

I ran yay -Rns ncurses5-compat-libs to remove the package. I ran stack setup and that seemed to run. I ran stack install in shortcut-highlighter and got the same output as before:

]$ stack install
Specified source-dir "test" does not exist
Building all executables for `shortcut-highlighter' once. After a successful build of all of them, only specified executables will be rebuilt.

Warning: Directory listed in shortcut-highlighter.cabal file does not exist: test
shortcut-highlighter> build (exe)
Preprocessing executable 'shortcut-highlighter' for shortcut-highlighter-0.1.0.0..
Building executable 'shortcut-highlighter' for shortcut-highlighter-0.1.0.0..
[ 1 of 11] Compiling Color

/home/eghere/Programs/shortcut-highlighter/src/Color.hs:6:1: error:
    Could not find module ‘Control.Monad.Trans.State’
    Perhaps you meant
      Control.Monad.State (from mtl-2.2.2)
      Control.Monad.Trans (from mtl-2.2.2)
    Use -v to see a list of the files searched for.
  |
6 | import Control.Monad.Trans.State
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


Warning: Directory listed in shortcut-highlighter.cabal file does not exist: test

--  While building package shortcut-highlighter-0.1.0.0 (scroll up to its section to see the error) using:
      /home/eghere/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-2.2.0.1 build exe:shortcut-highlighter --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1
[eghere@eg-blade shortcut-highlighter]$ 

It says a file called test doesn't exist. I don't know if this is a haskell-specific thing but could that shed any light on this issue?

@eghere
Copy link
Author

eghere commented Apr 1, 2022

Maybe you'll try removing all of that, then installing stack and then running stack setup, stack install, etc?

Another thing I should mention: I ran stack setup in the home folder and no problems arose. Running stack setup in shortcut-highlighter returns this:

 shortcut-highlighter]$ stack setup
Specified source-dir "test" does not exist
stack will use a sandboxed GHC it installed
For more information on paths, see 'stack path' and 'stack exec env'
To use this GHC and packages outside of a project, consider using:
stack ghc, stack ghci, stack runghc, or stack exec

Additionally, running stack exec shortcut-highlighter displays:

Specified source-dir "test" does not exist
Executable named Setup.hs not found on path:

followed by everything on my path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants