opencog / atomspace

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

Build fail: /bin/sh: 1: cabal: not found #102

Closed williampma closed 9 years ago

williampma commented 9 years ago
william@william-VirtualBox:~/atomspace/build$ make
[  2%] Built target json_spirit
[  2%] Built target opencog_atom_types
[  4%] Built target atomutils
[  6%] Built target atomcore
[ 13%] Built target lambda
[ 20%] Built target clearbox
[ 46%] Built target atomspace
[ 46%] Built target atomspaceutils
[ 48%] Built target atomspace_cython
[ 51%] Built target PythonEval
[ 60%] Built target smob
[ 69%] Built target query
[ 72%] Built target execution
[ 81%] Built target ruleengine
[ 81%] Built target atomspace_bm
[ 81%] Built target persist
[ 83%] Built target persist-sql
[ 83%] Built target sniff
[ 86%] Built target bindlink_cython
[ 88%] Built target logger_cython
[ 93%] Built target scheme_wrapper
[ 93%] Built target type_constructors
[ 97%] Built target utilities_cython
[100%] Built target haskell-atomspace
[100%] Installing: opencog-atomspace haskell library...
/bin/sh: 1: cabal: not found
make[2]: *** [opencog/haskell/dist] Error 127
make[1]: *** [opencog/haskell/CMakeFiles/haskell-atomspace-lib.dir/all] Error 2
make: *** [all] Error 2

Do I need to install cabal?

misgeatgit commented 9 years ago

Installing cabal followed by removing CMakeCache.txt and doing make clean before make worked for me.

williampma commented 9 years ago

I figured out that FindCabal.cmake isn't really working properly. It thinks cabal is found when it is not.

Changing the EXECUTE_PROCESS part to

    EXECUTE_PROCESS(
        COMMAND cabal list
        RESULT_VARIABLE res
        OUTPUT_QUIET
        ERROR_VARIABLE out
    )
    MESSAGE(STATUS "res: ${res}")

output res: No such file or directory. Not sure why FIND_PROGRAM found an non-existence cabal yet.

williampma commented 9 years ago

OK, CABAL_EXECUTABLE is defined, and it seems to be storing the string "CABAL_EXECUTABLE-NOTFOUND"... weird... CABAL_EXECUTABLE-NOTFOUND as a variable is not defined...

This is not how "find_program()" is described to work on the cmake doc... or it just words it badly. Does this mean all current usages of "find_program()" are wrong...?