Open spockz opened 12 years ago
Thanks, I'll look into this.
I think I know what happens here. Your ghc
wrapper calls ghc-parmake
, which in turn calls ghc
, which calls ghc-parmake
, and so on, ad infinitum. There should be a way to tell ghc-parmake what is the path to the "real" ghc on your system.
Indeed, I thought it had to be something like this. I could maybe check whether the PID of the current process is the PID of the root process? (Will have to write it to somewhere then though.
I've added a --ghc-path
option that lets you specify the path to the ghc
executable. Append --ghc-path=/usr/bin/ghc
to the line that invokes ghc-parmake
in your wrapper and check if the issue persists.
Okay, I've pulled your master head: If I leave the check for --make in I get the error below.
#/usr/bin/env bash
PAR=false;
for thing in "$@"
do
if [ $thing = "--make" ]
then
PAR=true
break
fi
done
if [ $PAR = true ]
then
ghc-parmake --ghc-path=/usr/bin/ghc -j9 $*
else
/usr/bin/ghc $*
fi
➔ cabal configure && cabal build (07:52:05 21-03)
Resolving dependencies...
Configuring ghc-parmake-0.1.1...
Preprocessing library ghc-parmake-0.1.1...
Preprocessing executables for ghc-parmake-0.1.1...
Preprocessing test suites for ghc-parmake-0.1.1...
Building ghc-parmake-0.1.1...
ghc: on the commandline: cannot use `-M' with `--make'
Usage: For basic information, try the `--help' option.
Otherwise when I just wrap ghc-parmake
I get this:
➔ cabal configure && cabal build (07:54:50 21-03)
Warning: cannot determine version of /Users/alessandro/bin/ghc :
""
cabal: The program ghc version >=6.4 is required but the version of
/Users/alessandro/bin/ghc could not be determined.
Aha! cabal configure
and cabal build
seem to work with the following code as the ghc
and ghc-parmake
wrapper. I can build the ghc-parmake package, as well as install it.
#!/usr/bin/env runhaskell
module Main where
import System
import System.Exit
import System.Process
import Data.List (intercalate)
main :: IO ()
main = do
args <- getArgs
if "--numeric-version" `elem` args then
system "/usr/bin/ghc --numeric-version" >>= exitWith
else
return ()
if "--make" `elem` args then
system (intercalate " " $ "/usr/bin/env ghc-parmake" : "-j 1" : "--ghc-path=/usr/bin/ghc" : filter (/="--make") args) >>= exitWith
else
rawSystem "/usr/bin/ghc" args >>= exitWith
When compiling the source of the UHC I'm getting the following error, regardless whether I use -j 1 or -j 1+:
EH101/EH/MainAG.hs:75:1:
Failed to load interface for `EH101.EH.MainAG_common':
Use -v to see a list of the files searched for.
When compiling the total of the files to parse is shown as 189
. When compiling with GHC the total amount of files to compile is 220. So there are missing quite some files.
You can checkout the source of the UHC. Compiling goes as follows:
autoconf
./configure
make -j4 101/ehc;make -j4 101/ehclib EHC_VARIANT_TARGET=js
That's interesting. Maybe the -hidir
and -odir
directories are not the same? This is not supported yet.
No, I cannot find any trace of that being the case. This is the command that's being issued:
cd build/101/lib-ehc/ && \
./setup configure --ghc --with-compiler=/Users/alessandro/bin/ghc --prefix=/Users/alessandro/Documents/Uni/xp/ehc/install-for-build/ --user && \
./setup build && \
./setup install && \
....
Okay, I'll need to look at this myself. I'll get back to you after I find out what causes this error.
Guess I need to update my GHC version:
[ 54 of 220] Compiling EH101.Pred.CommonCHR ( EH101/Pred/CommonCHR.hs, dist/build/EH101/Pred/CommonCHR.o )
ghc: panic! (the 'impossible' happened)
(GHC version 7.0.4 for i386-unknown-linux):
initC: srt_lbl
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
I am running ghc 7.0.3 on OS X. Which versions do you have of the uulib
and the uuagc
? I have 0.9.14 and 0.9.40.2, respectively.
$ cabal info uulib
[...]
Versions installed: 0.9.14
$ cabal info uuagc
[...]
Versions installed: 0.9.40.3
I tried with 0.9.40.3 on OS X and it worked as well. I don't know what to do next.
Maybe it's a Linux-only issue. I'll try with GHC 7.4.
Still happens with 7.0.4 and today's checkout. Don't have time to test with 7.4 right now, unfortunately.
I noticed that there are some modules with an _
in the name around where it goes awry. Could that have something to do with it? (BTW: The latest revision also builds with 7.4 now. So that should give you no problems.)
@23Skidoo Could you please send a bug report to uhc-developers@lists.science.uu.nl? It will then be picked up if all is well. :)
Filed a bug report here: http://code.google.com/p/uhc/issues/detail?id=51
@23Skidoo Did you try with GHC 7.4? It looks more like a bug with GHC than the UHC code.
@spockz I tried compiling the version from git master and got the same error. Don't want to migrate to GHC 7.4 yet.
@spockz Compilation proceeds without errors with GHC 7.4.2. Apparently it was a 7.0.4-specific problem. I'll try compiling with ghc-parmake when I have time.
I've made this wrapper for ghc-parmake that only routes --make commands to parmake. I cannot use ghc-parmake as drop-in for GHC as it doesn't report version numbers and such the way GHC does. Maybe there is a loop in this somewhere:
I've added this code in a file named
ghc
to my path and it is being found. When compiling packages withcabal build
I get this error also. Setting -j to 1 or 2 doesn't help. A similar error happens on the ghc-parmake package as well:GHC: 7.0.3 cabal: 1.10.1.0 ghc-parmake: hackage 0.1.1