Opened 9 years ago

Closed 9 years ago

#5047 closed bug (fixed)

ghc fails to build if HOME is not seth

Reported by: nomeata Owned by: igloo
Priority: high Milestone: 7.2.1
Component: Compiler Version: 7.0.2
Keywords: Cc: pkg-haskell-maintainers@…
Operating System: Linux Architecture: Unknown/Multiple
Type of failure: Building GHC failed Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

Hi,

some Debian build daemons do not set $HOME, to ensure that package builds do not modify that. ghc 7.0.2 fails to build in that case:

Here is an example build log: https://buildd.debian.org/fetch.cgi?pkg=ghc&arch=powerpc&ver=7.0.2-5&stamp=1300976974&file=log&as=raw ending with

"inplace/bin/ghc-cabal" configure --with-ghc="/usr/bin/ghc" --with-ghc-pkg="/usr/bin/ghc-pkg" --with-gcc="/usr/bin/gcc" --configure-option=--with-cc="/usr/bin/gcc" --package-db=/build/buildd-ghc_7.0.2-5-powerpc-bRWe6q/ghc-7.0.2/libraries bootstrapping.conf --enable-library-profiling --enable-library-or-ghci --configure-option=CFLAGS=" -fno-stack-protector  " --configure-option=LDFLAGS="   " --configure-option=CPPFLAGS="   " --constraint "Cabal == 1.10.1.0" --constraint "hpc == 0.5.0.6" --constraint "extensible-exceptions == 0.1.1.2" --constraint "ghc-binary == 0.5.0.2" --constraint "bin-package-db == 0.0.0.0" -- dist-boot libraries/Cabal
ghc-cabal: HOME: does not exist
make[2]: *** [libraries/Cabal/dist-boot/package-data.mk] Error 1

The bug might be in the cabal-install code.

Thanks, Joachim

Change History (3)

comment:1 Changed 9 years ago by igloo

Milestone: 7.2.1
Owner: set to igloo

Thanks for the report.

comment:2 Changed 9 years ago by simonmar

Priority: normalhigh

easy to fix, let's not forget.

comment:3 Changed 9 years ago by igloo

Resolution: fixed
Status: newclosed

Fixed in Cabal:

Sun Apr 17 16:41:35 BST 2011  Ian Lynagh <igloo@earth.li>
  * Refactor to avoid problems when $HOME is not set
  We now avoid calling getWindowsProgramFilesDir and
  getAppUserDataDirectory when we don't need to know their results.
  This means that a GHC build goes through when $HOME is unset
  (GHC trac #5047).
Note: See TracTickets for help on using tickets.