[atomspace] Difficile à compiler!(résolu)

Applications multimedia / jeux
Freedomsha
Hankyu
Messages : 15
Inscription : dim. 03 juin 2012, 19:51

[atomspace] Difficile à compiler!(résolu)

Message par Freedomsha »

Suite à des messages de ce type avec la commande make:

Code : Tout sélectionner

[ 53%] Linking CXX shared library atomspace.so
[ 53%] Built target atomspace_cython
Scanning dependencies of target PythonEval
[ 53%] Building CXX object opencog/cython/CMakeFiles/PythonEval.dir/PythonEval.cc.o
$home/src/atomspace-master/opencog/cython/PythonEval.cc: Dans la fonction ‘bool try_to_load_modules(const char**)’:
$home/src/atomspace-master/opencog/cython/PythonEval.cc:227:73: erreur: ‘PyString_AsString’ was not declared in this scope
             const char* sysPathCString = PyString_AsString(pySysPathLine);
                                                                         ^
$home/src/atomspace-master/opencog/cython/PythonEval.cc: Dans la fonction ‘void opencog::global_python_initialize()’:
$home/src/atomspace-master/opencog/cython/PythonEval.cc:302:42: erreur: cannot convert ‘char**’ to ‘wchar_t**’ for argument ‘2’ to ‘void PySys_SetArgv(int, wchar_t**)’
         PySys_SetArgv(1, (char **) &argv0);
                                          ^
$home/src/atomspace-master/opencog/cython/PythonEval.cc: Dans la fonction membre ‘void opencog::PythonEval::build_python_error_message(const char*, std::__cxx11::string&)’:
$home/src/atomspace-master/opencog/cython/PythonEval.cc:570:66: erreur: ‘PyString_AsString’ was not declared in this scope
         char* pythonErrorString = PyString_AsString(pyErrorString);
                                                                  ^
$home/src/atomspace-master/opencog/cython/PythonEval.cc: Dans la fonction membre ‘void opencog::PythonEval::execute_string(const char*)’:
$home/src/atomspace-master/opencog/cython/PythonEval.cc:607:18: erreur: ‘Py_FlushLine’ was not declared in this scope
     Py_FlushLine();
                  ^
$home/src/atomspace-master/opencog/cython/PythonEval.cc: Dans la fonction membre ‘int opencog::PythonEval::argument_count(PyObject*)’:
$home/src/atomspace-master/opencog/cython/PythonEval.cc:621:57: erreur: ‘PyInt_AsLong’ was not declared in this scope
             argumentCount = PyInt_AsLong(pyArgumentCount);
                                                         ^
opencog/cython/CMakeFiles/PythonEval.dir/build.make:62 : la recette pour la cible « opencog/cython/CMakeFiles/PythonEval.dir/PythonEval.cc.o » a échouée
make[2]: *** [opencog/cython/CMakeFiles/PythonEval.dir/PythonEval.cc.o] Erreur 1
CMakeFiles/Makefile2:1434 : la recette pour la cible « opencog/cython/CMakeFiles/PythonEval.dir/all » a échouée
make[1]: *** [opencog/cython/CMakeFiles/PythonEval.dir/all] Erreur 2
Makefile:149 : la recette pour la cible « all » a échouée
make: *** [all] Erreur 2
ou

Code : Tout sélectionner

[ 61%] Building CXX object opencog/query/CMakeFiles/query.dir/InitiateSearchCB.cc.o
$home/src/atomspace-master/opencog/persist/zmq/atomspace/ZMQPersistSCM.cc Dans la fonction membre ‘void opencog::ZMQPersistSCM::do_open(const string&)’:
$home/src/atomspace-master/opencog/persist/zmq/atomspace/ZMQPersistSCM.cc:168:13: attention : unused variable ‘as’ [-Wunused-variable]
  AtomSpace *as = _as;
             ^
$home/src/atomspace-master/opencog/persist/zmq/atomspace/ZMQPersistSCM.cc Dans la fonction membre ‘void opencog::ZMQPersistSCM::do_close()’:
$home/src/atomspace-master/opencog/persist/zmq/atomspace/ZMQPersistSCM.cc:182:13: attention : unused variable ‘as’ [-Wunused-variable]
  AtomSpace *as = _as;
             ^
Scanning dependencies of target persist-sql
[ 62%] Building CXX object opencog/persist/sql/CMakeFiles/persist-sql.dir/odbcxx.cc.o
[ 64%] Linking CXX shared library libzmqatoms.so
/usr/bin/ld: ne peut trouver -lsmob
collect2: erreur: ld a retourné 1 code d'état d'exécution
opencog/persist/zmq/atomspace/CMakeFiles/zmqatoms.dir/build.make:183 : la recette pour la cible « opencog/persist/zmq/atomspace/libzmqatoms.so » a échouée
make[2]: *** [opencog/persist/zmq/atomspace/libzmqatoms.so] Erreur 1
CMakeFiles/Makefile2:1320 : la recette pour la cible « opencog/persist/zmq/atomspace/CMakeFiles/zmqatoms.dir/all » a échouée
make[1]: *** [opencog/persist/zmq/atomspace/CMakeFiles/zmqatoms.dir/all] Erreur 2
make[1]: *** Attente des tâches non terminées....
[ 64%] Building CXX object opencog/query/CMakeFiles/query.dir/PatternMatch.cc.o
[ 64%] Building CXX object opencog/persist/sql/CMakeFiles/persist-sql.dir/AtomStorage.cc.o
[ 66%] Building CXX object opencog/query/CMakeFiles/query.dir/PatternMatchEngine.cc.o
[ 66%] Building CXX object opencog/query/CMakeFiles/query.dir/PatternSCM.cc.o
[ 68%] Building CXX object opencog/persist/sql/CMakeFiles/persist-sql.dir/SQLPersistSCM.cc.o
$home/src/atomspace-master/opencog/query/PatternSCM.cc: Dans la fonction membre ‘opencog::Handle opencog::PatternSCM::find_approximate_match(opencog::Handle)’:
$home/src/atomspace-master/opencog/query/PatternSCM.cc:32:18: erreur: ‘SchemeSmob’ has not been declared
  AtomSpace *as = SchemeSmob::ss_get_env_as("cog-fuzzy-match");
                  ^
$home/src/atomspace-master/opencog/query/PatternSCM.cc: Dans la fonction membre ‘virtual void opencog::PatternSCM::init()’:
$home/src/atomspace-master/opencog/query/PatternSCM.cc:96:53: erreur: ‘define_scheme_primitive’ was not declared in this scope
   &PatternSCM::find_approximate_match, this, "query");
                                                     ^
opencog/query/CMakeFiles/query.dir/build.make:206 : la recette pour la cible « opencog/query/CMakeFiles/query.dir/PatternSCM.cc.o » a échouée
make[2]: *** [opencog/query/CMakeFiles/query.dir/PatternSCM.cc.o] Erreur 1
make[2]: *** Attente des tâches non terminées....
[ 68%] Linking CXX shared library libpersist-sql.so
[ 68%] Built target persist-sql
CMakeFiles/Makefile2:1115 : la recette pour la cible « opencog/query/CMakeFiles/query.dir/all » a échouée
make[1]: *** [opencog/query/CMakeFiles/query.dir/all] Erreur 2
Makefile:149 : la recette pour la cible « all » a échouée
make: *** [all] Erreur 2
j'ai essayé de régler la problème.
après installation de quelques paquets qui paraissaient manquer avec cmake:guile, stack, boost, gearman, sigar, valgrind, zeromq,...
Finalement, il fallait utiliser la librairie de python2 au lieu de python(version 3).
Et donner précisement le chemin de guile car mon installeur ne le trouvait pas !

du coup, ceci a permi d'obtenir une compilation complète de atomspace:

Code : Tout sélectionner

cmake -D PYTHON_EXECUTABLE=/usr/bin/python2 -D PYTHON_INCLUDE_DIR=/usr/include/python2.7 -D PYTHON_LIBRARY=/usr/lib64/libpython2.7.so -D GUILE_INCLUDE_DIR=/usr/include/guile/2.0 -D GUILE_LIBRARY=/usr/lib/libguile-2.0.so -D CYTHON_EXECUTABLE=/usr/bin/cython2 -Wno-dev ..
make -j3
Répondre