Ticket #5047 (closed bug: fixed)

Opened 2 years ago

Last modified 2 years ago

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 Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

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

Changed 2 years ago by igloo

  • owner set to igloo
  • milestone set to 7.2.1

Thanks for the report.

Changed 2 years ago by simonmar

  • priority changed from normal to high

easy to fix, let's not forget.

Changed 2 years ago by igloo

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

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.