Failed to compile atomspace with python bindings #3089
Replies: 9 comments 3 replies
-
What is the output of |
Beta Was this translation helpful? Give feedback.
-
oh, hang on, I see a problem. Not sure why it affects only you, though. Debugging now |
Beta Was this translation helpful? Give feedback.
-
The file that you are missing, Can you apply the following patch run cmake, and attach what the printouts are?
For example, I get
|
Beta Was this translation helpful? Give feedback.
-
Also, this should be logged as a bug report, not discussion. I will try to recat now. |
Beta Was this translation helpful? Give feedback.
-
Hi Linas,
I get the following:
-- Heyyyyyy the src dir is
/home/naser/soft2/opencog_repos/atomspace/opencog/persist/api/cython
-- Heyyyyyy the bin dir is
/home/naser/soft2/opencog_repos/atomspace/build/opencog/persist/api/cython
Kind regards,
Abu
…On Fri, 17 Jan 2025 at 04:19, Linas Vepštas ***@***.***> wrote:
The file that you are missing, storage_types.pyx is autogenerated, and
should be in your build directory, at
${CMAKE_CURRENT_BINARY_DIR/../../storage/storage_types.pyx I assume its
there, somewhere, but the path to it is mangled, somehow.
Can you apply the following patch run cmake, and attach what the printouts
are?
--- a/opencog/persist/api/cython/CMakeLists.txt
+++ b/opencog/persist/api/cython/CMakeLists.txt
@@ -20,6 +20,8 @@ SET(CYTHON_FLAGS "-3" "-f" "-Wextra" "-I${CMAKE_CURRENT_SOURCE_DIR}/../../../cyt
# storage.pyx means that module name will be 'opencog.storage'. This will
# have an autogenerated PyInit_storage() in it, again, based on the module
# name.
+MESSAGE(STATUS "Heyyyyyy the src dir is ${CMAKE_CURRENT_SOURCE_DIR}")
+MESSAGE(STATUS "Heyyyyyy the bin dir is ${CMAKE_CURRENT_BINARY_DIR}")
CYTHON_ADD_MODULE_PYX(storage
"storage.pxd"
"../../storage/storage_types.pyx"
For example, I get
-- Heyyyyyy the src dir is /home/linas/src/novamente/src/atomspace-too/opencog/persist/api/cython
-- Heyyyyyy the bin dir is /home/linas/src/novamente/src/atomspace-too/build/opencog/persist/api/cython
—
Reply to this email directly, view it on GitHub
<#3089 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHOUKFMB62PYKFQRKLQMQI32LCAFRAVCNFSM6AAAAABVICETESVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCOBWGIZDSMY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Has it been fixed? Shall I clone and pull again?
…On Fri, 17 Jan 2025 at 04:37, Linas Vepštas ***@***.***> wrote:
Hah hah. There's a github bug,
community/community#2861 four years old now,
that still hasn't been fixed.
—
Reply to this email directly, view it on GitHub
<#3089 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHOUKFOHL2CL7SDNTJA3P7D2LCCJ5AVCNFSM6AAAAABVICETESVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCOBWGIZTQOI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi Linas,
The required files are generated in the following folder:
./build/opencog/persist/storage/storage_types.h
./build/opencog/persist/storage/storage_types.pyx
To get around it, I just manually copied
to atomspace/opencog/persist/storage/
Kind regards,
Abu
…On Sat, 18 Jan 2025 at 11:19, Abu Naser ***@***.***> wrote:
Has it been fixed? Shall I clone and pull again?
On Fri, 17 Jan 2025 at 04:37, Linas Vepštas ***@***.***>
wrote:
> Hah hah. There's a github bug,
> community/community#2861 four years old now,
> that still hasn't been fixed.
>
> —
> Reply to this email directly, view it on GitHub
> <#3089 (reply in thread)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AHOUKFOHL2CL7SDNTJA3P7D2LCCJ5AVCNFSM6AAAAABVICETESVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCOBWGIZTQOI>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
Beta Was this translation helpful? Give feedback.
-
Hi Linas,
Following your instructions, I have managed to compile atompaces with
python binding now.
I will try the examples now .
Kind regards,
Abu
…On Mon, 20 Jan 2025 at 00:50, Linas Vepštas ***@***.***> wrote:
Nothing is fixed, because I can't reproduce the problem, and you haven't
provided enough info to figure it out remotely. For example: what are you
actually typing at the command line? What is the output from cmake?
Clearly, something is different on your system, but I'm blind-guessing in
the dark.
The following should work:
cd /home/naser/soft2/opencog_repos/atomspace/
rm -rf build
git checkout master
git pull https://github.com:/opencog/atomspace
mkdir build
cd build
cmake ..
make
Is this what you're doing, or is it something else? I'd like to see what
cmake is printing, and at least the start of the make output.
Is it possible that you have python2 installed, or perhaps cython2? Its
possible that perhaps there's a conflict, there.
For example: I get this:
build$ cmake ..
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build type: Release
-- CogUtil version 2.0.3 found.
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.46") found components: system
-- Boost version 1.74.0 found.
-- Found PythonInterp: /usr/bin/python3 (found version "3.11.2")
-- CxxTest found.
-- Could NOT find Folly (missing: FOLLY_LIBRARIES FOLLY_INCLUDE_DIR)
-- Folly missing: provides more efficient std::set replacement.
-- Guile (3.0.8 >= 2.2.2) was found.
-- Looking for secure_getenv
-- Looking for secure_getenv - not found
-- Python 3.11.2 interpreter found.
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.11.so (found version "3.11.2")
-- Python 3.11.2 libraries found.
-- Found Cython: /usr/bin/cython3 (Required is at least version "0.24.0")
-- Cython ( 0.29.3 >= 0.24.0) found.
-- Python destination dir found: /usr/local/lib/python3.11/dist-packages
-- Python install dir: /usr/local/lib/python3.11/dist-packages/opencog
-- Using nosetests executable /usr/bin/nosetests3
-- Could NOT find OCaml. Please specify CMAKE_OCaml_EXECUTABLE. (missing: CMAKE_OCaml_VERSION CMAKE_OCaml_EXECUTABLE CMAKE_OCaml_FIND CMAKE_OCaml_LEX CMAKE_OCaml_YACC)
-- Stack was not found. Haskell bindings will not be built.
-- UnixODBC was not found; ODBC persistence subsystem will not be built.
To over-ride, make sure UnixODBC_LIBRARIES and UnixODBC_INCLUDE_DIRS are set.
-- Could NOT find PGSQL (missing: PGSQL_LIBRARY PGSQL_INCLUDE_DIR) (Required is at least version "9.5")
--
-- PostgresSQL was not found; PGSQL persistence subsystem will not be built.
To over-ride, make sure PGSQL_LIBRARIES and PGSQL_INCLUDE_DIRS are set.
-- Valgrind Prefix:
-- Could NOT find VALGRIND (missing: VALGRIND_INCLUDE_DIR VALGRIND_PROGRAM)
-- VALGRIND missing: needed for thread debugging.
-- Setting python RPATH to /usr/local/lib/python3.11/dist-packages/opencog
-- Found cython and nosetests, enabling python unit tests
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Doxygen not found, you won't be able to generate API documentation.
Building for Debian GNU/Linux 12 (bookworm)
The following components will be built:
-----------------------------------------------
Python bindings - Python (cython) bindings.
Python tests - Python bindings nose tests.
Scheme bindings - Scheme (guile) bindings.
Unit tests - Unit tests.
The following components WILL NOT be built:
-----------------------------------------------
Doxygen - Code documentation.
Haskell bindings - Haskell bindings.
OCaml bindings - OCaML bindings.
SQL ODBC bindings - Save/Restore of AtomSpace to database via ODBC.
Postgres StorageNode - Save/Restore of AtomSpace to Postgres database.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/linas/src/novamente/src/atomspace/build
Do yo get this, or something else?
When I type make, I get:
build$ make
[ 0%] Built target SCM_CONFIG
[ 0%] Generating C++ Atom Type bindings from atom_types.script
[ 0%] Generating Scheme Atom Type bindings from atom_types.script
[ 0%] Generating Python Atom Type bindings from atom_types.script
[ 0%] Built target opencog_atom_types
[ 2%] Building CXX object opencog/atoms/atom_types/CMakeFiles/atom_types.dir/atom_types_init.cc.o
...
[ 61%] Built target foreign
[ 61%] Generating C++ Atom Type bindings from storage_types.script
[ 61%] Generating Scheme Atom Type bindings from storage_types.script
[ 61%] Generating Python Atom Type bindings from storage_types.script
[ 61%] Built target storage_types
...
[ 77%] Built target PythonEval
[ 77%] Cythonizing type_constructors.pyx
/usr/lib/python3/dist-packages/pythran/tables.py:4530: FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
if not hasattr(numpy, method):
/usr/lib/python3/dist-packages/pythran/tables.py:4563: FutureWarning: In the future `np.bytes` will be defined as the corresponding NumPy scalar.
obj = getattr(themodule, elem)
[ 77%] Building CXX object opencog/cython/opencog/CMakeFiles/type_constructors.dir/type_constructors.cpp.o
[ 77%] Linking CXX shared library type_constructors.so
[ 77%] Built target type_constructors
[ 77%] Cythonizing utilities.pyx
/usr/lib/python3/dist-packages/pythran/tables.py:4530: FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
if not hasattr(numpy, method):
/usr/lib/python3/dist-packages/pythran/tables.py:4563: FutureWarning: In the future `np.bytes` will be defined as the corresponding NumPy scalar.
obj = getattr(themodule, elem)
[ 77%] Building CXX object opencog/cython/opencog/CMakeFiles/utilities_cython.dir/Utilities.cc.o
[ 80%] Building CXX object opencog/cython/opencog/CMakeFiles/utilities_cython.dir/utilities.cpp.o
[ 80%] Linking CXX shared library utilities.so
[ 80%] Built target utilities_cython
[ 80%] Cythonizing storage.pyx
/usr/lib/python3/dist-packages/pythran/tables.py:4530: FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
if not hasattr(numpy, method):
/usr/lib/python3/dist-packages/pythran/tables.py:4563: FutureWarning: In the future `np.bytes` will be defined as the corresponding NumPy scalar.
obj = getattr(themodule, elem)
[ 80%] Building CXX object opencog/persist/api/cython/CMakeFiles/storage_cython.dir/PersistCython.cc.o
[ 83%] Building CXX object opencog/persist/api/cython/CMakeFiles/storage_cython.dir/storage.cpp.o
[ 83%] Linking CXX shared library storage.so
[ 83%] Built target storage_cython
...
The above is what I expect you to see.
—
Reply to this email directly, view it on GitHub
<#3089 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHOUKFIDPQWISW2YO7P225D2LRB4DAVCNFSM6AAAAABVICETESVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCOBYGUYTAOI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi Linas,
The required files were generated in the following folders:
/home/naser/soft2/opencog_repos/atomspace/build/opencog/persist/storage/storage_types.h
/home/naser/soft2/opencog_repos/atomspace/
build/opencog/persist/storage/storage_types.pyx
I just copied them to
/home/naser/soft2/opencog_repos/atomspace/opencog/persist/storage/
Kind regards,
Abu
…On Mon, 20 Jan 2025 at 21:24, Linas Vepštas ***@***.***> wrote:
what was the problem? The last step make can be replaced by make -j for
faster builds. Perhaps that caused the failure?
—
Reply to this email directly, view it on GitHub
<#3089 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHOUKFN54CZ4NHMQZA25JBD2LVSPTAVCNFSM6AAAAABVICETESVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCOBZGUZTIOI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi,
I cloned and pulled the code before trying to compile atomspace with python bindings. I am getting the following error message:
97%] Built target utilities_cython
make[2]: *** No rule to make target '../opencog/persist/api/cython/../../storage/storage_types.pyx', needed by 'opencog/persist/api/cython/storage.cpp'. Stop.
make[1]: *** [CMakeFiles/Makefile2:3292: opencog/persist/api/cython/CMakeFiles/storage_cython.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
Kind regards,
Abu
Beta Was this translation helpful? Give feedback.
All reactions