Stop! Tickets are now managed at GitHub.

Please enter new tickets, and find and edit existing tickets there:


Ticket #84 (closed defect: fixed)

Opened 5 years ago

Last modified 4 years ago

generic source hp does not build with generic linux binary ghc

Reported by: martin.k.tang@… Owned by: duncan
Priority: critical Milestone: 2010.2.0.0
Component: Generic source tarball Keywords:
Cc: tanimoto@…

Description

I downloaded the following:

The ghc generic linux binary comes with libraries that are also included in the haskell platform.

On make, the platform script will happily report that:

  Platform package x is already installed. Skipping...

On make install, the platform script will unhappily report that:

  Error:
  The x/Setup script does not exist or cannot be run
  make: *** [install] Error 2

I've worked around it by commenting out the part in build.sh that skips packages if they're already installed, but I assume that's not The Right Thing to do.

Change History

  Changed 5 years ago by tanimoto

  • cc tanimoto@… added

Martin,

I was having the exact same problem, on Ubuntu 9.04 64bit, GHC 6.10.4 from HQ. However, I had installed the alpha version of the platform before. After removing everything and reinstalling GHC, the install script worked.

I didn't investigate very closely, but my impression was that the build script was skipping same packages because they were already installed, but then the last step tried to install all packages in a list. Since the ones installed don't get built, it can't run Setup.

Thanks for reporting.

  Changed 5 years ago by dons

  • priority changed from major to critical
  • milestone set to 2009.4.0

follow-ups: ↓ 7 ↓ 8 ↓ 9   Changed 5 years ago by alecsk@…

A quick(-and-dirty) hot fix: -- code copied from build.sh

---
 scripts/install.sh |   18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

Index: haskell-platform-2009.2.0.2/scripts/install.sh
===================================================================
--- haskell-platform-2009.2.0.2.orig/scripts/install.sh
+++ haskell-platform-2009.2.0.2/scripts/install.sh
@@ -34,13 +34,23 @@ install_pkg () {
   fi
 }
 
+# Is this exact version of the package already installed?
+is_pkg_installed () {
+  PKG_VER=$1
+  grep " ${PKG_VER} " installed.packages > /dev/null 2>&1
+}
+
 # Actually do something!
 cd packages
 for pkg in `cat platform.packages`; do
-  cd "${pkg}" || die "The directory for the component ${PKG} is missing"
-  echo "Installing ${pkg}..."
-  install_pkg ${pkg}
-  cd ..
+  if is_pkg_installed "${pkg}"; then
+    echo "Platform package ${pkg} is already installed. Skipping..."
+  else
+    cd "${pkg}" || die "The directory for the component ${PKG} is missing"
+    echo "Installing ${pkg}..."
+    install_pkg ${pkg}
+    cd ..
+  fi
 done
 
 echo


  Changed 5 years ago by tanimoto

Alecs,

Thanks for the patch. I tested it here and it worked correctly as expected (i.e., it skipped what was already installed). Thank you!

$ sudo make install
scripts/install.sh
Platform package mtl-1.1.0.2 is already installed. Skipping...
Installing happy-1.18.4...
Installing executable(s) in /usr/local/bin
Package contains no library to register: happy-1.18.4...
Platform package HUnit-1.2.0.3 is already installed. Skipping...
Platform package OpenGL-2.2.1.1 is already installed. Skipping...
Platform package GLUT-2.1.1.2 is already installed. Skipping...
Platform package QuickCheck-1.2.0.0 is already installed. Skipping...
Installing alex-2.3.1...
Installing executable(s) in /usr/local/bin
Package contains no library to register: alex-2.3.1...
Platform package editline-0.2.1.0 is already installed. Skipping...
Platform package haskell-src-1.0.1.3 is already installed. Skipping...
Platform package html-1.0.1.2 is already installed. Skipping...
Platform package fgl-5.4.2.2 is already installed. Skipping...
Platform package parallel-1.1.0.1 is already installed. Skipping...
Platform package parsec-2.1.0.1 is already installed. Skipping...
Platform package network-2.2.1.4 is already installed. Skipping...
Platform package HTTP-4000.0.6 is already installed. Skipping...
Platform package regex-base-0.72.0.2 is already installed. Skipping...
Platform package regex-posix-0.72.0.3 is already installed. Skipping...
Platform package regex-compat-0.71.0.1 is already installed. Skipping...
Platform package stm-2.1.1.2 is already installed. Skipping...
Platform package time-1.1.2.4 is already installed. Skipping...
Platform package xhtml-3000.2.0.1 is already installed. Skipping...
Platform package cgi-3001.1.7.1 is already installed. Skipping...
Platform package zlib-0.5.0.0 is already installed. Skipping...
Installing cabal-install-0.6.2...
Installing executable(s) in /usr/local/bin
Package contains no library to register: cabal-install-0.6.2...
Platform package haskell-platform-2009.2.0.2 is already installed. Skipping...

**************************************************
* Installation completed successfully.            
*                                                 
* Programs installed into:                        
*   /usr/local/bin
*                                                 
* Now do "cabal update"                           
**************************************************

  Changed 5 years ago by anonymous

Just to confirm that the above fix works for Arch Linux, with only "pacman -S ghc" installed before running make / make install for the platform.

  Changed 5 years ago by matthijs

The above fix works on Debian Lenny with the GHC 6.10.4 binary tarball as well.

in reply to: ↑ 3   Changed 5 years ago by kevincantu

The patch worked for me, too, on Ubuntu 9.10 Karmic Koala.

in reply to: ↑ 3   Changed 5 years ago by roderick

Replying to alecsk@gmail.com: Thanks!! Patch works for me on openSuse 11.2 x64

in reply to: ↑ 3   Changed 5 years ago by deh

Patch worked for me on CentOS 5.2 using haskell-platform-2009.2.0.2. (Previous ghc install was ghc-6.10.4-i386-uknown-linux-n.

  Changed 4 years ago by dons

  • status changed from new to closed
  • resolution set to fixed

Patch applied:

Mon Aug 17 13:42:06 CEST 2009 Duncan Coutts <duncan@…>

  • Fix installing when we skipped building some already-installed packages Also do some refactoring. Fixes #84.

  Changed 4 years ago by refold

  • milestone changed from 2009.4.0 to 2010.2.0.0

Milestone 2009.4.0 deleted

Note: See TracTickets for help on using tickets.