haskell-numerics / random-fu

A suite of Haskell libraries for representing, manipulating, and sampling random variables
42 stars 21 forks source link

stateref-0.3 fails to build #28

Closed ocramz closed 9 years ago

ocramz commented 9 years ago

While installing random-fu; I had already moved .ghc and .cabal .

Preprocessing library stateref-0.3...

src/Data/Accessor.hs:4:4: error: invalid preprocessing directive

-}

Full log: $ sudo cabal install random-fu Password: Resolving dependencies... Downloading MonadPrompt-1.0.0.3... Downloading MonadRandom-0.3... Configuring MonadPrompt-1.0.0.3... Downloading erf-2.0.0.0... Configuring MonadRandom-0.3... Downloading mersenne-random-pure64-0.2.0.4... Configuring erf-2.0.0.0... Downloading monad-loops-0.4.2.1... Configuring mersenne-random-pure64-0.2.0.4... Downloading mwc-random-0.13.2.0... Downloading stateref-0.3... Downloading th-extras-0.0.0.2... Downloading vector-th-unbox-0.2.1.0... Building MonadPrompt-1.0.0.3... Building erf-2.0.0.0... Building mersenne-random-pure64-0.2.0.4... Building MonadRandom-0.3... Installed MonadPrompt-1.0.0.3 Configuring monad-loops-0.4.2.1... Configuring mwc-random-0.13.2.0... Installed erf-2.0.0.0 Building monad-loops-0.4.2.1... Configuring stateref-0.3... Building mwc-random-0.13.2.0... Installed mersenne-random-pure64-0.2.0.4 Building stateref-0.3... Configuring th-extras-0.0.0.2... Installed MonadRandom-0.3 Downloading random-shuffle-0.0.4... Configuring vector-th-unbox-0.2.1.0... Failed to install stateref-0.3 Build log ( /Users/ocramz/.cabal/logs/stateref-0.3.log ): Configuring stateref-0.3...

/tmp/17236.c:1:12: warning: control reaches end of non-void function [-Wreturn-type] int foo() {} ^ 1 warning generated. Building stateref-0.3... Preprocessing library stateref-0.3...

src/Data/Accessor.hs:4:4: error: invalid preprocessing directive

-}

   ^

1 error generated. Building th-extras-0.0.0.2... Building vector-th-unbox-0.2.1.0... Configuring random-shuffle-0.0.4... Installed monad-loops-0.4.2.1 Building random-shuffle-0.0.4... Installed th-extras-0.0.0.2 Downloading flexible-defaults-0.0.1.1... Configuring flexible-defaults-0.0.1.1... Installed vector-th-unbox-0.2.1.0 Downloading math-functions-0.1.5.2... Building flexible-defaults-0.0.1.1... Configuring math-functions-0.1.5.2... Installed random-shuffle-0.0.4 Building math-functions-0.1.5.2... Installed flexible-defaults-0.0.1.1 Installed math-functions-0.1.5.2 Installed mwc-random-0.13.2.0 cabal: Error: some packages failed to install: random-fu-0.2.6.0 depends on stateref-0.3 which failed to install. random-source-0.3.0.6 depends on stateref-0.3 which failed to install. rvar-0.2.0.1 depends on stateref-0.3 which failed to install. stateref-0.3 failed during the building phase. The exception was: ExitFailure 1

idontgetoutmuch commented 9 years ago

I can't reproduce. Can you try

 cabal install stateref

It seems to be a problem with that but why is a mystery. Which OS, ghc and cabal are you running? If it fails please attach the log

 /Users/ocramz/.cabal/logs/stateref-0.3.log
ocramz commented 9 years ago

it was a conflict between clang provided by xcode 5 and ghc 7.6 (which this patch couldn't fix: https://github.com/vlc/bin-files/blob/master/clang-xcode5-wrapper.hs).

However, installing the latest Haskell suite (ghc 7.8.3), fixed everything!