#7472 closed bug (wontfix)
Build on FreeBSD fails with ncurses
Reported by: | nematoder | Owned by: | pgj |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Build System (make) | Version: | 7.6.1 |
Keywords: | ncurses, freebsd | Cc: | pgj@… |
Operating System: | FreeBSD | Architecture: | Unknown/Multiple |
Type of failure: | Building GHC failed | Test Case: | |
Blocked By: | Blocking: | ||
Related Tickets: | Differential Rev(s): | ||
Wiki Page: |
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)
Change History (8)
Changed 7 years ago by
Attachment: | errors.txt added |
---|
comment:1 Changed 7 years ago by
comment:3 Changed 7 years ago by
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: 5 Changed 7 years ago by
difficulty: | → Unknown |
---|---|
Resolution: | → wontfix |
Status: | new → 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 follow-up: 6 Changed 7 years ago by
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 Changed 7 years ago by
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.
comment:7 Changed 14 months ago by
Component: | Build System → Build System (make) |
---|
The new Hadrian build system has been merged. Relabeling the tickets concerning the legacy make
build system to prevent confusion.
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.