opencog / atomspace

The OpenCog (hyper-)graph database and graph rewriting system
https://wiki.opencog.org/w/AtomSpace
Other
801 stars 225 forks source link

haskell errors during install #83

Closed linas closed 9 years ago

linas commented 9 years ago

make install seems to work, but ends with a warning:

Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal update' to download it.
cabal: Could not resolve dependencies:
trying: opencog-atomspace-0.1.0.0

the cmakefiles should not attempt to build haskell unless it is full installed.

MarcosPividori commented 9 years ago

Hi, This happen probably because the user have never executed:

    cabal update

So Cabal never downloaded the list of packages available. It needs this list to resolve the dependencies for opencog-atomspace. (opencog-atomspaces needs the packages "transformers" and "data-default" to be installed) One quick fix would be to run "cabal update" before "cabal install", but I think we should remove all of this from the CMake automatically installation and make this optional to the user that wants to use Haskell Bindings. The same happen if the user wants to install this package globally or locally, etc. If you agree, we can remove the automatically installation. So, users interested in haskell bindings, go to the haskell folder and run:

  cabal update
  cabal install

If they want other options, for example to install the package globally, they can run:

  cabal install --global

@ngeiswei Would you agree?

linas commented 9 years ago

Well, ideally, it should all be automated and automatic. Opencog is already too hard to build, install, and asking the user to do more manual steps, such as 'cabal update' etc is just too much. Recall that most users will not know what haskell is, they just want to be able to say "cmake; make; make install" and have everything "just plain work" without getting errors, and without reading special instructions or how-tos.

MarcosPividori commented 9 years ago

Hi Linas, ok! I have modified the code to avoid this problem. I have sent a pull request!