Reject relative paths for extra-lib/include-dirs #694

bos opened this Issue May 24, 2012 · 2 comments


None yet
5 participants

bos commented May 24, 2012

(Imported from Trac #702, reported by @dcoutts on 2010-06-14)

It makes no sense and causes problems later.

See ghc ticket

This applies to the paths in the .cabal file. For ones specified on the command line perhaps just making them absolute would be ok. Ones specified in the global config must be absolute. Ones in local config could possibly be relative.

@ttuegel ttuegel added this to the Cabal-1.24 milestone Apr 23, 2015

@ttuegel ttuegel changed the title from cabal should reject relative paths for extra-lib/include-dirs to Reject relative paths for extra-lib/include-dirs Apr 23, 2015

jakzale commented May 30, 2015

I'd like to tackle this bug during ZuriHac 2015.

I've looked into this bug with @kosmikus, and it appears that ghc-pkg checks if import-dirs, library-dirs, include-dirs, and framework-dirs is relative and if any of them is relative stops and reports an error.

Still, cabal seems to translate include-dirs to an absolute path, which then does not trigger a ghc-pkg error.

@23Skidoo 23Skidoo modified the milestones: Cabal 1.24, Cabal 1.26 Feb 21, 2016


ezyang commented Aug 15, 2016

Yes, this bug is not as simple as just rejecting all relative directories, because if you install-includes then the include will in fact be present at the absolute path Cabal translates it to.

@ezyang ezyang modified the milestones: Cabal 2.0, Sep 6, 2016

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