23Skidoo/ghc-parmake — Issue #1: ghc-parmake: ghc: runInteractiveProcess: resource exhausted (Resource temporarily unavailable)
Author: spockz
Created: 2012-02-26 10:18:05+00:00
State: open

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:

``` bash
#/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 -j9 $*
else
/usr/bin/ghc $*
fi
```

```
make INCLUDE_DERIVED_MK=yes EHC_VARIANT=`echo install/101/bin/ehc | sed -n -e 's+install/\([0-9_]*\)/bin/ehc.*+\1+p'` ehc-variant
mkdir -p /tmp/ehc/install-for-build
cd build/libutil/ && \
./setup configure --ghc --with-compiler=/Users/alessandro/bin/ghc --prefix=/tmp/ehc/install-for-build/ --user && \
./setup build && \
./setup install && \
echo /tmp/ehc/install-for-build/ins-flg-EH-Util > /tmp/ehc/install-for-build/ins-flg-EH-Util
Configuring EH-Util-1.1...
Preprocessing library EH-Util-1.1...
Building EH-Util-1.1...
ghc-parmake: ghc: runInteractiveProcess: resource exhausted (Resource temporarily unavailable)
make \
\
ehc-variant-dflt
mkdir -p /tmp/ehc/install-for-build
cd build/libutil/ && \
./setup configure --ghc --with-compiler=/Users/alessandro/bin/ghc --prefix=/tmp/ehc/install-for-build/ --user && \
./setup build && \
./setup install && \
echo /tmp/ehc/install-for-build/ins-flg-EH-Util > /tmp/ehc/install-for-build/ins-flg-EH-Util
Configuring EH-Util-1.1...
Preprocessing library EH-Util-1.1...
Building EH-Util-1.1...
/Users/alessandro/bin/ghc: fork: Resource temporarily unavailable
```

I've added this code in a file named `ghc` to my path and it is being found. When compiling packages with `cabal build` I get this error. A similar error happens on the ghc-parmake package as well:

```
➔ cabal build (11:14:29 26-02)
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...
/Users/alessandro/bin/ghc: fork: Resource temporarily unavailable
```