Skip to content

"stack install libssh2-0.2.0.7" for lts-16.4 #57

Open
@oshyshko

Description

I'd like to use the library in my project that uses stack lts-16.4 (ghc-8.8.3).

Here's what I get when trying to install it (I am on macos 10.15.5):

$ brew install openssl libssh2
...
$ export PKG_CONFIG_PATH="/usr/local/opt/[email protected]/lib/pkgconfig"

$ stack install libssh2-0.2.0.7
libssh2> configure
libssh2> Configuring libssh2-0.2.0.7...
libssh2> build
libssh2> Preprocessing library for libssh2-0.2.0.7..
libssh2> Building library for libssh2-0.2.0.7..
libssh2> [1 of 5] Compiling Network.SSH.Client.LibSSH2.Types
libssh2> 
libssh2> /private/var/folders/qk/vw0nqkz90cz52plb04b416fh0000gn/T/stack-008b142a03477e0c/libssh2-0.2.0.7/src/Network/SSH/Client/LibSSH2/Types.chs:46:1: warning: [-Wunused-imports]
libssh2>     The import of ‘Foreign.C.Types’ is redundant
libssh2>       except perhaps to import instances from ‘Foreign.C.Types’
libssh2>     To import instances alone, use: import Foreign.C.Types()
libssh2>    |
libssh2> 46 | import Network.Socket
libssh2>    | ^^^^^^^^^^^^^^^^^^^^^^
libssh2> [2 of 5] Compiling Network.SSH.Client.LibSSH2.WaitSocket
libssh2> 
libssh2> /private/var/folders/qk/vw0nqkz90cz52plb04b416fh0000gn/T/stack-008b142a03477e0c/libssh2-0.2.0.7/src/Network/SSH/Client/LibSSH2/WaitSocket.hs:29:41: error:
libssh2>     • Couldn't match type ‘IO Foreign.C.Types.CInt’
libssh2>                      with ‘Foreign.C.Types.CInt’
libssh2>       Expected type: Socket -> Foreign.C.Types.CInt
libssh2>         Actual type: Socket -> IO Foreign.C.Types.CInt
libssh2>     • In the second argument of ‘(.)’, namely ‘fdSocket’
libssh2>       In the second argument of ‘(.)’, namely ‘Fd . fdSocket’
libssh2>       In the expression: threadWaitRead_ . Fd . fdSocket
libssh2>    |
libssh2> 29 | threadWaitRead = threadWaitRead_ . Fd . fdSocket
libssh2>    |                                         ^^^^^^^^
libssh2> 
libssh2> /private/var/folders/qk/vw0nqkz90cz52plb04b416fh0000gn/T/stack-008b142a03477e0c/libssh2-0.2.0.7/src/Network/SSH/Client/LibSSH2/WaitSocket.hs:32:43: error:
libssh2>     • Couldn't match type ‘IO Foreign.C.Types.CInt’
libssh2>                      with ‘Foreign.C.Types.CInt’
libssh2>       Expected type: Socket -> Foreign.C.Types.CInt
libssh2>         Actual type: Socket -> IO Foreign.C.Types.CInt
libssh2>     • In the second argument of ‘(.)’, namely ‘fdSocket’
libssh2>       In the second argument of ‘(.)’, namely ‘Fd . fdSocket’
libssh2>       In the expression: threadWaitWrite_ . Fd . fdSocket
libssh2>    |
libssh2> 32 | threadWaitWrite = threadWaitWrite_ . Fd . fdSocket
libssh2>    |                                           ^^^^^^^^

--  While building package libssh2-0.2.0.7 using:
      /Users/oshyshko/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_3.0.1.0_ghc-8.8.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-3.0.1.0 build --ghc-options ""
    Process exited with code: ExitFailure 1

How do I get it work?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions