Giter Club home page Giter Club logo

Comments (10)

linas avatar linas commented on July 3, 2024

I don't understand the bug report. HAVE_CYTHON is set, if cython3 is detected. when you say cmake, it prints a log reporting what it finds. For me, it found:

-- Python 3.11.2 interpreter found.
-- Python 3.11.2 libraries found.
-- 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

The following components will be built:
-----------------------------------------------
   Python bindings       - Python (cython) bindings.
   Python tests          - Python bindings nose tests.

from atomspace.

linas avatar linas commented on July 3, 2024

Hmm, opencog/cython/opencog/CMakeLists.txt, lines 14-16, looks fine. It should be a semi-colon-sparated list of directories. the -D doesn't make sense. See

https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_RPATH.html
https://cmake.org/cmake/help/latest/prop_tgt/INSTALL_RPATH.html

At any rate, it looks like its sort of working, anyway. The runpath is set. You can check with objdump -x libPythonSCM.so |grep RUNPATH

from atomspace.

linas avatar linas commented on July 3, 2024

The third block of errors appear to happen because -DHAVE_CYTHON was never set in the compiler, and thus, there is no definition for PythonEval. By force-setting it in CMake, you've tricked it into a confusing situation. I will add an error message.

from atomspace.

linas avatar linas commented on July 3, 2024

I take back the earlier comment. opencog/cython/opencog/CMakeLists.txt, lines 14-16, looks fine. To debug, make this change:

--- a/opencog/cython/opencog/CMakeLists.txt
+++ b/opencog/cython/opencog/CMakeLists.txt
@@ -15,6 +15,8 @@ SET(CMAKE_INSTALL_RPATH
    "${CMAKE_INSTALL_PREFIX}/lib/opencog"
    "${PYTHON_DEST}")
 
+MESSAGE(STATUS "This is the RUNPATH for cython: ${CMAKE_INSTALL_RPATH}")
+
 INCLUDE_DIRECTORIES(
        ${PYTHON_INCLUDE_DIRS}
        ${CMAKE_CURRENT_SOURCE_DIR}

When I do this, running cmake prints, for me,

-- Setting python RPATH to /usr/local/lib/python3.11/dist-packages/opencog
-- This is the RUNPATH for cython: /usr/local/lib/opencog;/usr/local/lib/python3.11/dist-packages/opencog

I'm guessing its borken for you because either python3 or cython3 aren't installed. Note that python version 2 is not supported in opencog.

from atomspace.

gl-yziquel avatar gl-yziquel commented on July 3, 2024

Python3 and Cython3 are installed. I noticed they were not found. So I tried to force it with -DHAVE_CYTHON.

Will try to come back to this as soon as the need for python bindings is being felt again.

from atomspace.

linas avatar linas commented on July 3, 2024

The search is done by /usr/local/share/opencog/cmake/OpenCogFindPython.cmake which uses /usr/local/share/opencog/cmake/FindPython3Interp.cmake to do lower-level work.

from atomspace.

linas avatar linas commented on July 3, 2024

To debug, just edit the files by hand, and use

MESSAGE(STATUS "what happened of foo is ${FOO_BAR}")

to print out the variable FOO_BAR. This only prints when cmake is run. The original versions of these files are installed by cogutil, from here: https://github.com/opencog/cogutil/tree/master/cmake

from atomspace.

linas avatar linas commented on July 3, 2024

My best guess is that you have both python3 and python2 installed. Opencog searches for both, and might have gotten confused during the search. To avoid this confusion, I've removed the search for python2 here: opencog/cogutil#273

from atomspace.

gl-yziquel avatar gl-yziquel commented on July 3, 2024

Thank you. I'll attempt that as soon as I can.

from atomspace.

linas avatar linas commented on July 3, 2024

Closing, I'm guessing this is resolved.

from atomspace.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.