Skip to content

Cabal install ignores --extra-lib-dirs and --extra-include-dirs #2705

Closed

Description

@aemixdp

I'm trying to install a package which requires some headers and static libraries (curl).
Here's the problem:

$ cabal install curl --extra-include-dirs=C:\libraries\curl-7.40.0-devel-mingw64\include --extra-lib-dirs=C:\libraries\curl-7.40.0-devel-mingw64\lib64
Resolving dependencies...
Notice: installing into a sandbox located at C:\hs\...\.cabal-sandbox
Configuring curl-1.3.8...
Failed to install curl-1.3.8
Build log ( C:\hs\...\.cabal-sandbox\logs\curl-1.3.8.log ):
Configuring curl-1.3.8...
checking for gcc... gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
configure: error: curl libraries not found, so curl package cannot be built
See `config.log' for more details.
cabal.exe: Error: some packages failed to install:
curl-1.3.8 failed during the configure step. The exception was:
ExitFailure 1

However, if I set some environment variables simple cabal install goes well:

C_INCLUDE_PATH=C:\libraries\curl-7.40.0-devel-mingw64\include
LIBRARY_PATH=C:\libraries\curl-7.40.0-devel-mingw64\lib64

System info:

$ gwmi win32_operatingsystem | select caption
Microsoft Windows 7 Ultimate

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.10.1

$ cabal --version
cabal-install version 1.22.6.0
using version 1.22.4.0 of the Cabal library

Activity

  1. osa1 commented on Jul 6, 2015

    @osa1

    Related #2481.

  2. osa1 commented on Jul 6, 2015

    @osa1

    I think you need to use --lib-dirs and --include-dirs.

  3. jneira commented on Apr 1, 2022

    @jneira
    Member

    Re: #7096, where v2-install on windows also ignores both settings
    Not sure if both are due the same cause but bu they share the symptoms so i am gonna close this one adding anote in #7096
    Thanks for the bug report!

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions