Skip to content

Can't run hello-world #1

@fily1212

Description

@fily1212

Hello,
I'm trying to compile sml_python, to write a program that simulate an environment in python.
I used this instruction: https://soar.eecs.umich.edu/articles/articles/building-soar/81-building-on-linux
and tried to compile with these commands as read in readme:

python scons/scons.py sml_python
python2 scons/scons.py sml_python --python=/usr/bin/python3

But I can't compile it.
With the first command I obtain:

scons: Reading SConscript files ...
================================================================================
Building Soar 9.6.0                       * will be built if no target specified
Targets available:
   Core:              kernel* cli* scripts*
   Testing:           performance_tests tests
   SWIG:              sml_python sml_tcl sml_java*
   Extras:            debugger* headers* tclsoarlib
Custom Settings available:                                              *default
   Build Type:        --dbg, --opt*, --static
   Custom Paths:      --out, --build, --tcl
   Compilation time:  --no-svs, --scu*, --no-scu, --no-scu-kernel, --no-scu-cli
   Customizations:    --cc, --cxx, --cflags, --lnflags, --no-default-flags, --verbose,
================================================================================
Building intermediates to build
Installing targets to /media/Dati/Università/SOAR_Projects/soar_src/Soar/out
Checking for C library GL... (cached) no
Checking for C library GLU... (cached) no
Checking for glXGetProcAddressARB("") in C library GL... (cached) no
Checking for glXGetProcAddress("") in C library GL... (cached) no
Checking for glXGetProcAddressEXT("") in C library GL... (cached) no
Cannot find GL, GLU, not building svs_viewer
Tcl headers and libraries not found at /opt/ActiveTcl-8.6, not building Tcl SML wrappers.
C# compiler not found, not building C# SML wrappers
Tcl headers and libraries not found at /opt/ActiveTcl-8.6, not building TclSoarLib.
scons: done reading SConscript files.
scons: Building targets ...
Making build/Core/SoarKernel/src/debug_code/debug.os
In file included from Core/SoarKernel/src/soar_representation/agent.h:27,
                 from Core/SoarKernel/src/debug_code/debug.cpp:16:
Core/SoarKernel/src/shared/memory_manager.h:134:58: error: ‘string’ in namespace ‘std’ does not name a type
  134 |         bool add_block_to_memory_pool_by_name(const std::string& pool_name, int blocks);
      |                                                          ^~~~~~
Core/SoarKernel/src/shared/memory_manager.h:39:1: note: ‘std::string’ is defined in header ‘<string>’; did you forget to ‘#include <string>’?
   38 | #include <stdlib.h> // malloc
  +++ |+#include <string>
   39 | #endif // !_WIN32
scons: *** [build/Core/SoarKernel/src/debug_code/debug.os] Error 1
scons: building terminated because of errors.

with the second one I obtain:

$ python2 scons/scons.py sml_python --python=/usr/bin/python3
scons: *** SCons version 4.1.0 does not run under Python version 2.7.18.
Python >= 3.5 is required.

With built SoarSuite I have

$ python3 hello-world.py 
Traceback (most recent call last):
  File "hello-world.py", line 12, in <module>
    import Python_sml_ClientInterface as sml
  File "/media/Dati/Università/SOAR_Projects/SOAR2/SoarSuite_9.6.0-Multiplatform_64bit/bin/Python_sml_ClientInterface.py", line 28, in <module>
    _Python_sml_ClientInterface = swig_import_helper()
  File "/media/Dati/Università/SOAR_Projects/SOAR2/SoarSuite_9.6.0-Multiplatform_64bit/bin/Python_sml_ClientInterface.py", line 24, in swig_import_helper
    _mod = imp.load_module('_Python_sml_ClientInterface', fp, pathname, description)
  File "/usr/lib/python3.8/imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "/usr/lib/python3.8/imp.py", line 342, in load_dynamic
    return _load(spec)
ImportError: dynamic module does not define module export function (PyInit__Python_sml_ClientInterface)

can you help me? thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions