Bug 168761 - [PATCH] lang/ghc: Fix recursive failure on tinderbox/poudriere
[PATCH] lang/ghc: Fix recursive failure on tinderbox/poudriere
Status: Closed FIXED
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s)
Latest
Any Any
: Normal Affects Only Me
Assigned To: haskell
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-06 17:40 UTC by namor
Modified: 2012-06-08 17:24 UTC (History)
0 users

See Also:


Attachments
file.diff (366 bytes, patch)
2012-06-06 17:40 UTC, namor
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description namor 2012-06-06 17:40:08 UTC
Currently, neither tinderbox nor poudriere can build packages of lang/ghc-7.4.1.
A build log with the error from pointyhead can be found here: http://pointyhat-west.isc.freebsd.org/errorlogs/i386-errorlogs/e.9-pkgng.20120603215437.pointyhat-west/ghc-7.4.1.log

Note this error does not occur if you "make install" lang/ghc without poudriere or tinderbox. It does not occur either if you run "make install" in a jail - with or without pkgng enabled.
I have not found build logs of ghc-7.4.1 without pkgng, so i do not know if tinderbox/poudriere can or cannot build lang/ghc without pkgng currently.

Fix: The problem can be fixed by reverting a commit from upstream made in December 2011. The commit can be found here: http://hackage.haskell.org/trac/ghc/changeset/1c400aa990481efea39e438a8a9884d3179da244

The patch to revert the commit is attached to this problem report, it should be placed in lang/ghc/files/

Details:

The affected section of ghc.mk has a comment explaining what it does:
# Catch make if it runs away into an infinite loop

The section implements an error condition to abort on infinite recursive make calls. Before the commit in question, up to two recursive make calls were tolerated. The commit removed the exception of two recursive make calls, stating in the commit message:
"MAKE_RESTARTS should never be higher than 1"

When building with tinderbox/poudriere, MAKE_RESTARTS becomes 2 (for reasons i dont know) and the build fails.

Since the purpose, according to the comment, of the affected section is to abort on _infinite_ recursive make calls, the patch should not be able to break anything.

I could only test the patch on my local machine running poudriere, so i cannot confirm that it fixes the tinderbox build as well (but i suppose it does).

NOTE: I added .txt to the patch; the pr submission web interface complained..

Patch attached with submission follows:
How-To-Repeat: Install poudriere, create portstree and a jail in poudriere.
# echo "lang/ghc" > buildlist.txt
# poudriere bulk -f buildlist.txt
Comment 1 Edwin Groothuis freebsd_committer 2012-06-06 23:15:14 UTC
Responsible Changed
From-To: freebsd-ports-bugs->haskell

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter freebsd_committer 2012-06-08 17:12:02 UTC
pgj         2012-06-08 16:11:47 UTC

  FreeBSD ports repository

  Modified files:
    lang/ghc/files       patch-ghc.mk 
  Log:
  - Loosen make restart checks a bit to fix build on certain
    configurations (e.g. pointyhat)
  
  PR:             ports/168761
  Submitted by:   Roman Naumann <namor@hemio.de>
  
  Revision  Changes    Path
  1.2       +16 -8     ports/lang/ghc/files/patch-ghc.mk
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Gabor Pali freebsd_committer 2012-06-08 17:23:58 UTC
State Changed
From-To: open->closed

Committed, thanks!