[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Cabal vs. ghci vs. powerpc vs. PATH



Hi,

I’m trying to debug shake’s build failure on powerpc:
https://buildd.debian.org/status/fetch.php?pkg=haskell-shake&arch=powerpc&ver=0.15.2%2Bdfsg-1&stamp=1434397026

I boiled it down to this:

# directory with a minimal foo.cabal, right out of "cabal init"
~/foo $ runhaskell Setup.hs configure -v3
Configuring foo-0.1.0.0...
creating dist
Searching for ghc in path.
Found ghc at /usr/bin/ghc
("/usr/bin/ghc",["--numeric-version"])
/usr/bin/ghc is version 7.8.4
looking for tool ghc-pkg near compiler in /usr/bin
found ghc-pkg in /usr/bin/ghc-pkg
("/usr/bin/ghc-pkg",["--version"])
/usr/bin/ghc-pkg is version 7.8.4
("/usr/bin/ghc",["--supported-languages"])
("/usr/bin/ghc",["--info"])
Reading installed packages...
("/usr/bin/ghc-pkg",["dump","--global","-v0"])
("/usr/bin/ghc",["--print-libdir"])
[..]
Found ld at /usr/bin/ld
Environment: [("PATH","")]
("/usr/bin/ghc",["-c","/tmp/13656.c","-o","/tmp/13656.o"])
gcc: error trying to exec 'as': execvp: No such file or directory
/usr/bin/ghc returned ExitFailure 1
Setup.hs: /tmp/13656.o: does not exist

but

~/foo $ ghc --make Setup.hs 
[1 of 1] Compiling Main             ( Setup.hs, Setup.o )
Linking Setup ...
~/foo $ ./Setup configure -v3
Configuring foo-0.1.0.0...
creating dist
Searching for ghc in path.
Found ghc at /usr/bin/ghc
("/usr/bin/ghc",["--numeric-version"])
/usr/bin/ghc is version 7.8.4
looking for tool ghc-pkg near compiler in /usr/bin
found ghc-pkg in /usr/bin/ghc-pkg
("/usr/bin/ghc-pkg",["--version"])
/usr/bin/ghc-pkg is version 7.8.4
("/usr/bin/ghc",["--supported-languages"])
("/usr/bin/ghc",["--info"])
Reading installed packages...
("/usr/bin/ghc-pkg",["dump","--global","-v0"])
("/usr/bin/ghc",["--print-libdir"])
[..]
Environment: [("CVS_RSH","ssh"),("DEBEMAIL","nomeata@debian.org"),("DEBFULLNAME","Joachim Breitner"),("EDITOR","vim"),...("EMAIL","mail@joachim-breitner.de"),("HOME","/home/nomeata"),("INPUTRC","/home/nomeata/.inputrc"),("LANG","de_DE.UTF-8"),("LESS","-M -X -F"),("LOGNAME","nomeata"),("OLDPWD","/home/nomeata"),("PATH","/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"),("PS1","\\e[32m[\\u@\\h(sid_powerpc-dchroot):\\l]\\e[34m\\e[1m \\D{%a, der %d.%m.%Y um %k:%M Uhr}\\e[1m$(\n\t  if ret $?\n\t  then echo \"\\e[33m Keep Smiling :-)\";\n\t  else echo \"\\e[31m Don't Panic! ($?)\"\n\t  fi\n\t)\\e[0m\\n\\w $ "),("PWD","/home/nomeata/foo"),("RESET","\\e[0m"),("ROT","\\e[31m"),("SCHROOT_ALIAS_NAME","sid"),("SCHROOT_CHROOT_NAME","sid_powerpc-dchroot"),("SCHROOT_COMMAND","-bash"),("SCHROOT_GID","800"),("SCHROOT_GROUP","Debian"),("SCHROOT_SESSION_ID","shake"),("SCHROOT_UID","2634"),("SCHROOT_USER","nomeata"),("SHELL","/bin/bash"),("SHLVL","1"),("SUDO_PROMPT","%u@%h: "),("TERM","xterm-256color"),("USER","nomeata"),("_","./Setup")]
("/usr/bin/ghc",["-c","/tmp/14367.c","-o","/tmp/14367.o"])
[..]
("/usr/bin/gcc",["/tmp/14367.c","-o","/tmp/14367","-D__GLASGOW_HASKELL__=708","-Dlinux_BUILD_OS=1","-Dpowerpc_BUILD_ARCH=1","-Dlinux_HOST_OS=1","-Idist/build/autogen","-I.","-I/usr/lib/ghc/base-4.7.0.2/include","-I/usr/lib/ghc/integer-gmp-0.5.1.0/include","-I/usr/lib/ghc/include","-L/usr/lib/ghc/base-4.7.0.2","-L/usr/lib/ghc/integer-gmp-0.5.1.0","-L/usr/lib/ghc/ghc-prim-0.3.1.0","-L/usr/lib/ghc/rts-1.0"])
~/foo $

So for some reason, under ghci Cabal forgets about the environment. Is
someone interested in picking up the debugging from here? Colin maybe?

Greetings,
Joachim



-- 
Joachim "nomeata" Breitner
Debian Developer
  nomeata@debian.org | ICQ# 74513189 | GPG-Keyid: F0FBF51F
  JID: nomeata@joachim-breitner.de | http://people.debian.org/~nomeata

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: