Bug 225834 - [PATCH] lang/ghc: fails to build with ncurses from ports
Summary: [PATCH] lang/ghc: fails to build with ncurses from ports
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-haskell (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2018-02-11 21:25 UTC by Pawel Pekala
Modified: 2018-05-26 08:12 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (haskell)


Attachments
ports ncurses build fix (424 bytes, patch)
2018-02-11 21:25 UTC, Pawel Pekala
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pawel Pekala freebsd_committer freebsd_triage 2018-02-11 21:25:03 UTC
Created attachment 190521 [details]
ports ncurses build fix

After switch to clang for build, ghc fails to build with ncurses from ports:

configure: error: in `/usr/local/ports/lang/ghc/work/ghc-8.0.2/libraries/terminfo':
configure: error: curses headers could not be found, so this package cannot be built
See `config.log' for more details

NCURSESINC points to NCURSESBASE/include/ncurses while ncurses.h includes files with path relative to include directory:

In file included from conftest.c:52:
/usr/local/include/ncurses/ncurses.h:60:10: fatal error: 'ncurses/ncurses_dll.h' file not found
#include <ncurses/ncurses_dll.h>
         ^~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Proposed patch fixes build by altering NCURSESINC. Was tested with ncurses from base and ports on all supported releases.
Comment 1 Gleb Popov freebsd_committer freebsd_triage 2018-02-13 18:40:45 UTC
I poked around it a bit and concluded that this looks like a bug in ncurses.mk. I don't see how ncurses from ports can be usable when setting NCURSESINC to /usr/local/include/ncurses
Comment 2 Gleb Popov freebsd_committer freebsd_triage 2018-03-05 09:23:55 UTC
For the time being, I think this can be commited as a sensible workaround. When I find spare time I'll go over the ports tree to fix NCURSESINC usage.
Comment 3 Gleb Popov freebsd_committer freebsd_triage 2018-05-26 08:12:42 UTC
I've included your patch in the last GHC update. Sorry for not giving you credits in the commit message, there was too much changes :<