Due to recent ncurses udpate, ghc build has been broken.
See: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244556
Details
- Reviewers
github_evilham.com - Commits
- rP528190: lang/ghc: Fix build on CURRENT.
Built a new version of devel/elm-format with this ghc under poudriere targetting both 12-RELEASE and 13-CURRENT.
Only tested execution and proper functioning of devel/elm-format on 13-CURRENT, but I think if the port built properly in poudriere, that's a good sign that this revision doesn't break things there.
Diff Detail
- Repository
- rP FreeBSD ports repository
- Lint
No Lint Coverage - Unit
No Test Coverage - Build Status
Buildable 29870 Build 27692: arc lint + arc unit
Event Timeline
I suspect, BUILD_DEPENDS is sufficient - this ncurses library is used by bootstrap compiler. Can you test it?
Isn't BUILD_DEPENDS for executables?
https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-depend.html#makefile-build_depends
I am getting:
=======================<phase: build-depends >============================ ===> ghc-8.6.5_5 depends on executable: libncursesw.so.8 - not found ===> Installing existing package /packages/All/compat12x-amd64-12.1.1201000.20200220.txz [130Ramd64-default-job-01] Installing compat12x-amd64-12.1.1201000.20200220... [130Ramd64-default-job-01] Extracting compat12x-amd64-12.1.1201000.20200220: ......... done ===> ghc-8.6.5_5 depends on executable: libncursesw.so.8 - not found *** Error code 1
with
BUILD_DEPENDS= libncursesw.so.8:misc/compat12x
Am I doing it wrong? Also, for learning: why would BUILD_DEPENDS be better?
\o/ I think I understood it. Please correct me if wrong:
LIB_DEPENDS introduces a dependency on the current12x package, which may not be necessary.
BUILD_DEPENDS only uses it at build time and contrary to the description in the porters handbook, there are instances of it referring to libraries in the ports tree.
I also found LOCALBASE to be defined and used in Mk/Uses for similar things in a similar way.
So, it's building now in 13-CURRENT, which is a good sign, can't vouch for its correctness (yet) but would appreciate testing.
All *_DEPENDS variables accept either executable (in form executable:category/port) or package (packagename==ver:category/port or >0 in simplest case). Oh and absolute path too, just like you did it.
The LIB_DEPENDS is special, as it accepts library name (a string that usually gets passed into -l flag of C/C++ compiler, or, which is the same, the output of ldconfig -r).
And regarding BUILD_DEPENDS - you're right, it pulls in a dependency only for building, but it will not end up in the dependency list of final package. In this aspect, LIB_DEPENDS works just like RUN_DEPENDS.
Hey @arrowd, the wrong BUILD_DEPENDS was commited.
This is the output:
=======================<phase: build-depends >============================ ===> ghc-8.6.5_5 depends on executable: libncursesw.so.8 - not found ===> Installing existing package /packages/All/compat12x-amd64-12.1.1201000.20200220.txz [130Ramd64-default-job-01] Installing compat12x-amd64-12.1.1201000.20200220... [130Ramd64-default-job-01] Extracting compat12x-amd64-12.1.1201000.20200220: ......... done ===> ghc-8.6.5_5 depends on executable: libncursesw.so.8 - not found *** Error code 1 Stop. make: stopped in /usr/ports/lang/ghc =>> Cleaning up wrkdir ===> Cleaning for ghc-8.6.5_5 build of lang/ghc | ghc-8.6.5_5 ended at Tue Mar 10 19:52:10 CET 2020 build time: 00:00:13 !!! build failure encountered !!
And this is the diff between last patch and what was committed: https://reviews.freebsd.org/D24014?vs=69359&id=69368#toc