Opened 17 months ago

Closed 15 months ago

Last modified 12 months ago

#7472 closed bug (wontfix)

Build on FreeBSD fails with ncurses

Reported by: nematoder Owned by: pgj
Priority: normal Milestone:
Component: Build System Version: 7.6.1
Keywords: ncurses, freebsd Cc: pgj@…
Operating System: FreeBSD Architecture: Unknown/Multiple
Type of failure: Building GHC failed Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Building fails on FreeBSD 8.2-stable with current Ports with the error as documented in the attachment.

To fix this, I went to libraries/terminfo and executed there:

./configure --with-curses-includes=/usr/include --with-curses-libraries=/usr/lib

Then I deleted manually all .o, .a, .so files in this directory (make clean there does a global clean, which is a bug as well), ran make there and went back to the toplevel build directoy, where I entered the following command manually:

"inplace/bin/ghc-stage1" -o ghc/stage2/build/tmp/ghc-stage2 -H32m -O -I/usr/include -L/usr/lib -hide-all-packages -i -ighc/. -ighc/stage2/build -ighc/stage2/build/autogen -Ighc/stage2/build -Ighc/stage2/build/autogen -optP-DGHCI -optP-include -optPghc/stage2/build/autogen/cabal_macros.h -package array-0.4.0.0 -package base-4.5.0.0 -package bytestring-0.9.2.1 -package directory-1.1.0.2 -package filepath-1.3.0.0 -package ghc-7.4.1 -package haskeline-0.6.4.0 -package mtl-1.1.1.1 -package process-1.1.0.1 -package unix-2.5.1.0 -fno-warn-name-shadowing -Wall -XHaskell98 -XForeignFunctionInterface -XUnboxedTuples -XFlexibleInstances -XMagicHash -XNondecreasingIndentation -XCPP -XPatternGuards -O2 -threaded -no-user-package-conf -rtsopts -odir ghc/stage2/build -hidir ghc/stage2/build -stubdir ghc/stage2/build -hisuf hi -osuf o -hcsuf hc ghc/stage2/build/Main.o ghc/stage2/build/InteractiveUI.o ghc/stage2/build/GhciMonad.o ghc/stage2/build/GhciTags.o ghc/stage2/build/hschooks.o

(note the changed -L and -I parameters)

Then I ran make again and building continues successfully.

To fix someone should add some ncurses tweaks to the main configure script.

Attachments (1)

errors.txt (4.9 KB) - added by nematoder 17 months ago.

Download all attachments as: .zip

Change History (7)

Changed 17 months ago by nematoder

comment:1 in reply to: ↑ description Changed 17 months ago by nematoder

An addition: the underlying cause is that I've got 2 ncurses installed: one from ports and one from base. The ghc configure script finds the ports version in /usr/local/ which doesn't work for whatever reason. By supplying -L/usr/lib and -I/usr/include I told it to use ncurses lib in base. A newer base might not have this problem (I've built ghc on a 9.0 current without problems). However, a configure flag to tell the build which ncurses lib to use would be reasonable nevertheless.

comment:2 Changed 15 months ago by pgj

  • Cc pgj@… added
  • Owner set to pgj

Take.

comment:3 Changed 15 months ago by pgj

This problem apparently boils down to a build.mk configuration issue, and has been fixed in the FreeBSD Ports Collection recently [1]. In nutshell, you should ensure that the following is present in your mk/build.mk file before building the compiler:

SRC_HC_OPTS += -I${NCURSESINC} -L${NCURSESLIB} -I${LOCALBASE}/include -L${LOCALBASE}/lib"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes=${NCURSESINC} --configure-option=--with-curses-libraries=${NCURSESLIB}

where NCURSESINC is the include directory for ncurses and NCURSESLIB is the library directory, respectively.

[1] http://lists.freebsd.org/pipermail/svn-ports-all/2013-January/011462.html

comment:4 follow-up: Changed 15 months ago by simonmar

  • Difficulty set to Unknown
  • Resolution set to wontfix
  • Status changed from new to closed

Sounds like the ticket can be closed then. Would someone like to create a wiki page for FreeBSD under Building/Preparation and put this and any other FreeBSD-specific info there please?

comment:5 in reply to: ↑ 4 ; follow-up: Changed 15 months ago by pgj

Replying to simonmar:

Would someone like to create a wiki page for FreeBSD under Building/Preparation and put this and any other FreeBSD-specific info there please?

Yes, I volunteer for this.

comment:6 in reply to: ↑ 5 Changed 12 months ago by pgj

Replying to pgj:

Replying to simonmar:

Would someone like to create a wiki page for FreeBSD under Building/Preparation and put this and any other FreeBSD-specific info there please?

Yes, I volunteer for this.

Now the page is created.

Note: See TracTickets for help on using tickets.