Stop! Tickets are now managed at GitHub.

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


Ticket #98 (closed defect: wontfix)

Opened 5 years ago

Last modified 5 years ago

./configure doesn't fully respect --prefix

Reported by: zooko Owned by:
Priority: major Milestone:
Component: (none-specified) Keywords: packaging
Cc:

Description

I tried to follow these instructions to install the Haskell platform on my Linux system. I have a policy that packages do not get to run an installer with sudo power -- instead I use GNU stow to symlink a package into the system after it has installed itself into a specific --prefix which is just for that one package.

The unix src bundle seems to be not fully prespecting the --prefix option to ./configure:

wget http://hackage.haskell.org/platform/2009.2.0.2/haskell-platform-2009.2.0.2.tar.gz
tar -xzf haskell-platform-2009.2.0.2.tar.gz
cd haskell-platform-2009.2.0.2
./configure --prefix=/usr/local/stow/haskell-platform-2009.2.0.2
make
sudo mkdir -p /usr/local/stow/haskell-platform-2009.2.0.2
sudo chown `whoami` /usr/local/stow/haskell-platform-2009.2.0.2
make install

This fails with:

scripts/install.sh
Installing mtl-1.1.0.2...
Installing library in
/usr/local/stow/haskell-platform-2009.2.0.2/lib/mtl-1.1.0.2/ghc-6.10.4
Writing package registration file: mtl-1.1.0.2.conf for mtl-1.1.0.2...
Reading package info from "mtl-1.1.0.2.conf" ... done.
Writing new package config file... ghc-pkg: /var/lib/ghc-6.10.4/./package.conf: you don't have permission to modify this file

Error:
Registering the package mtl-1.1.0.2 failed
make: *** [install] Error 2

Is there a different ./configure option I could use to tell it to use a different location of package.conf? In any case, it seems like the location of that file, like all files, should be controlled by --prefix.

Thanks!

Change History

Changed 5 years ago by zooko

When I said "I tried to follow these instructions", I forgot to include the link to the instructions:

http://davidsiegel.org/haskell-platform-in-karmic-koala/

Changed 5 years ago by zooko

It looks like this is a problem that the haskell platform install script inherits because it invokes the cabal install script:

http://hackage.haskell.org/trac/hackage/ticket/601

Changed 5 years ago by duncan

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

The problem is that we must register the packages you install with ghc. That is done by modifying a package database. This file does not generally live under the prefix you specify. Therefore we cannot fully respect the prefix you specify (at least if we want it to work).

There are two standard package databases. One is the global one. This is the default one that the ./configure script will use. The other one is the per-user package database. The ./configure script will use this one if you specify --enable-user-install.

The ./configure script usually auto-detects if it should use the global or user package db by checking if the prefix you're using is under $HOME/. However that simple test obviously does not work for your use case.

You will either have to register the package only in the per-user package db, or you will need to do the install step as root so that the global package db can be modified.

Note: See TracTickets for help on using tickets.