Bug 174703 - lang/ghc fails to install with devel/ncurses on the system
lang/ghc fails to install with devel/ncurses on the system
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-12-25 15:20 UTC by bash.org
Modified: 2012-12-28 20:22 UTC (History)
0 users

See Also:


Attachments
ghc-vs-ncurses.patch.txt (1.20 KB, text/plain; charset=US-ASCII)
2012-12-27 10:27 UTC, Gabor Pali
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description bash.org 2012-12-25 15:20:00 UTC
Compilation of lang/ghc fails with:

/usr/local/bin/ld: /usr/ports/lang/ghc/work/ghc-7.4.2/libraries/terminfo/dist-install/build/libHSterminfo-0.3.2.3.a(Base__103.o): undefined reference to symbol 't$
arm'
/usr/local/bin/ld: note: 'tparm' is defined in DSO //usr/local/lib/libtinfow.so.5.9 so try adding it to the linker command line
//usr/local/lib/libtinfow.so.5.9: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
gmake[1]: *** [ghc/stage2/build/tmp/ghc-stage2] Error 1


according to pkg_info -W, libtinfow is part of ncurses.

Seems related to this problem:
http://www.freebsd.org/cgi/query-pr.cgi?pr=164244

Fix: 

Delete devel/ncurses for the duration of the lang/ghc installation
How-To-Repeat: Try building lang/ghc while devel/ncurses is installed on the system.
Comment 1 Mark Linimon freebsd_committer 2012-12-26 03:27:53 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-ports-bugs

ports PR.
Comment 2 Edwin Groothuis freebsd_committer 2012-12-26 03:28:11 UTC
Responsible Changed
From-To: freebsd-ports-bugs->haskell

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 3 Gabor Pali freebsd_committer 2012-12-27 10:27:43 UTC
Hi,

Please find a patch attached for solving the problem.  Let me know if
this works for you.
Comment 4 dfilter freebsd_committer 2012-12-28 20:05:58 UTC
Author: pgj
Date: Fri Dec 28 20:05:44 2012
New Revision: 309584
URL: http://svnweb.freebsd.org/changeset/ports/309584

Log:
  - Make dependency on base-system ncurses explicit -- this fixes potential
    build errors when devel/ncurses is also installed
  
  PR:		ports/174703
  Reported by:	Finn <bash.org@gmail.com>
  Obtained from:	FreeBSD Haskell

Modified:
  head/devel/hs-terminfo/Makefile
  head/lang/ghc/Makefile

Modified: head/devel/hs-terminfo/Makefile
==============================================================================
--- head/devel/hs-terminfo/Makefile	Fri Dec 28 19:59:17 2012	(r309583)
+++ head/devel/hs-terminfo/Makefile	Fri Dec 28 20:05:44 2012	(r309584)
@@ -9,5 +9,8 @@ COMMENT=	Haskell bindings to the terminf
 
 LICENSE=	BSD
 
+CONFIGURE_ARGS+=	--configure-option=--with-curses-includes=/usr/include \
+			--configure-option=--with-curses-libraries=/usr/lib
+
 .include "${.CURDIR}/../../lang/ghc/bsd.cabal.mk"
 .include <bsd.port.mk>

Modified: head/lang/ghc/Makefile
==============================================================================
--- head/lang/ghc/Makefile	Fri Dec 28 19:59:17 2012	(r309583)
+++ head/lang/ghc/Makefile	Fri Dec 28 20:05:44 2012	(r309584)
@@ -201,12 +201,13 @@ post-extract:
 .else
 	@${ECHO} >> ${WRKSRC}/mk/build.mk "BSD_PATH_TO_HSC2HS = ${BOOT_HSC2HS}"
 .endif
-	@${ECHO} >> ${WRKSRC}/mk/build.mk "SRC_HC_OPTS += -I${LOCALBASE}/include -L${LOCALBASE}/lib"
+	@${ECHO} >> ${WRKSRC}/mk/build.mk "SRC_HC_OPTS += -I/usr/include -L/usr/lib -I${LOCALBASE}/include -L${LOCALBASE}/lib"
 	@${ECHO} >> ${WRKSRC}/mk/build.mk "SRC_CC_OPTS += ${CFLAGS}"
 	@${ECHO} >> ${WRKSRC}/mk/build.mk "EXTRA_HSC2HS_OPTS += -I${LOCALBASE}/include --lflag=-L${LOCALBASE}/lib"
 	@${ECHO} >> ${WRKSRC}/mk/build.mk "EXTRA_LD_OPTS += -L${LOCALBASE}/lib"
 	@${ECHO} >> ${WRKSRC}/mk/build.mk "EXTRA_CABAL_CONFIGURE_FLAGS += --extra-include-dirs=${LOCALBASE}/include"
 	@${ECHO} >> ${WRKSRC}/mk/build.mk "EXTRA_CABAL_CONFIGURE_FLAGS += --extra-lib-dirs=${LOCALBASE}/lib"
+	@${ECHO} >> ${WRKSRC}/mk/build.mk "libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes=/usr/include --configure-option=--with-curses-libraries=/usr/lib"
 #	@${ECHO} >> ${WRKSRC}/mk/build.mk "BIN_DIST_NAME = ghc-\$$(ProjectVersion)-boot"
 #	@${ECHO} >> ${WRKSRC}/mk/build.mk "BIN_DIST_TAR  = ghc-\$$(ProjectVersion)-amd64-ash0-freebsd8-boot.tar"
 
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 5 Gabor Pali freebsd_committer 2012-12-28 20:21:32 UTC
State Changed
From-To: open->closed

A fix committed to the ports tree.  Thanks for reporting the problem!