Bug 187532 - lang/ghc: ghc-7.6.3_3 does not install
Summary: lang/ghc: ghc-7.6.3_3 does not install
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-haskell (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-13 14:20 UTC by rjk
Modified: 2015-08-20 15:45 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rjk 2014-03-13 14:20:00 UTC
: moran#/usr/ports/lang/ghc; make install
===>  Staging for ghc-7.6.3_3
===>   ghc-7.6.3_3 depends on executable: gcc48 - found
===>   ghc-7.6.3_3 depends on shared library: gmp.10 - found
===>   ghc-7.6.3_3 depends on shared library: ffi.6 - found
===>   Generating temporary packing list
gmake[2]: Entering directory `/usr/ports/lang/ghc/work/ghc-7.6.3'
===--- building phase 0
gmake -r --no-print-directory -f ghc.mk phase=0 phase_0_builds
gmake[3]: Nothing to be done for `phase_0_builds'.
===--- building phase 1
gmake -r --no-print-directory -f ghc.mk phase=1 phase_1_builds
gmake[3]: *** No rule to make target `/usr/local/lib/ghc-7.6.3/base-4.6.0.1/Prelude.hi', needed by `utils/hsc2hs/dist/build/Main.o'.  Stop.
gmake[2]: *** [install] Error 2
gmake[2]: Leaving directory `/usr/ports/lang/ghc/work/ghc-7.6.3'
*** Error code 2

Stop.
make[1]: stopped in /usr/ports/lang/ghc
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/ghc

How-To-Repeat: Run 'make install' after building.
Comment 1 rjk 2014-03-13 14:21:35 UTC
fat-fingered my email address. It should be 'rjk@wintek.com'.

-- 
Richard Kuhns <rjk@wintek.com>     Main Number:      765-742-8428
Wintek Corporation                 Direct:           765-269-8541
427 N 6th Street                   Internet Support: 765-269-8503
Lafayette, IN 47901-2211           Consulting:       765-269-8504
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2014-03-14 03:42:14 UTC
Responsible Changed
From-To: freebsd-ports-bugs->haskell

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 3 Gabor Pali freebsd_committer freebsd_triage 2014-03-23 10:14:38 UTC
Hi Richard,

Sorry, but I could not reproduce your problem.  Does this still persist?
Comment 4 Gabor Pali freebsd_committer freebsd_triage 2014-03-24 15:55:56 UTC
State Changed
From-To: open->feedback

Awaiting feedback from the reporter.
Comment 5 rjk 2014-03-24 20:13:40 UTC
Hello,

I just tried again, this time turning off the "Use installed GHC for
bootstrapping", and it worked.

Just for fun I'll try again (probably tomorrow) with it turned back on, and see
if that makes the difference.

Thanks!

On 03/23/14 06:14, Gabor Pali wrote:
> Hi Richard,
> 
> Sorry, but I could not reproduce your problem.  Does this still persist?
> 


-- 
Richard Kuhns <rjk@wintek.com>     Main Number:      765-742-8428
Wintek Corporation                 Direct:           765-269-8541
427 N 6th Street                   Internet Support: 765-269-8503
Lafayette, IN 47901-2211           Consulting:       765-269-8504
Comment 6 rjk 2014-03-26 16:56:41 UTC
I just tried again as follows:

ghc-7.6.3_3 was installed.

In /usr/ports/lang/ghc, I did

make clean
make config
  and checked the box to use the installed GHC to bootstrap.
make build

pkg delete ghc

make install

and received the same error:

gmake[3]: *** No rule to make target
`/usr/local/lib/ghc-7.6.3/base-4.6.0.1/Prelude.hi', needed by
`utils/hsc2hs/dist/build/Main.o'. Stop


So it appears that as long as I don't use the installed GHC to bootstrap, it works.
-- 
Richard Kuhns <rjk@wintek.com>     Main Number:      765-742-8428
Wintek Corporation                 Direct:           765-269-8541
427 N 6th Street                   Internet Support: 765-269-8503
Lafayette, IN 47901-2211           Consulting:       765-269-8504
Comment 7 Gabor Pali freebsd_committer freebsd_triage 2015-02-15 19:08:18 UTC
All right, I have checked this again, now that GHC 7.8.3 is in the tree.  It turns out that the installation sequence of GHC requires the bootstrap compiler to be present during the installation process.  That is, one cannot remove the bootstrap compiler until GHC is installed.

In the past, this could has been a serious problem, but thanks to the recent changes in the ports framework, the introduction of "stage directories" helps to alleviate it.  That is, in order to make the use of the compiler bootstrapping work with the version already present on the system, you should now use the "stage" target instead of "build".

So the reported sequence of commands should be changed as follows:

# make config
<check the box to use the installed GHC to bootstrap>
# make stage
# pkg delete ghc
# make install clean

Please check if this proposal solves your problem.
Comment 8 Gabor Pali freebsd_committer freebsd_triage 2015-08-20 15:45:09 UTC
No reply in the last six months, so I consider this problem solved.  Please re-open the ticket if it still persists for you.