sparcians / map

Modeling Architectural Platform
Apache License 2.0
168 stars 60 forks source link

argos.py NameError: name 'extract_value' is not defined #492

Closed jeffnye-gh closed 7 months ago

jeffnye-gh commented 7 months ago

Undefined symbol extract_value, I've tried a number of things, closest I can get is a core dump

Any help would be appreciated.

Ubuntu 22.04 map SHA 79241b6 (latest) conda 24.3.0 (also fails on older conda Miniconda3-py311_23.9.0-0-Linux-x86_64)

build/install map/sparta per map READ.me build/install helios per map READ.me in map/sparta/release make sparta_core_example in map/sparta/release/example/CoreModel

./sparta_core_example -i 1000 -z pipeout_
python3 ${MAP}/helios/pipeViewer/pipe_view/argos.py --database pipeout_ --layout-file cpu_layout.alf

Error:

(sparta) map/sparta/release/example/CoreModel$ python3 ${MAP}/helios/pipeViewer/pipe_view/argos.py --database pipeout_ --layout-file cpu_layout.alf
INFO: looking for  /nfshome/randy/miniconda3/envs/sparta/bin/transactionsearch
transaction search initialized: you will be able to use search.
Using: /nfshome/randy/miniconda3/envs/sparta/bin/transactionsearch
Traceback (most recent call last):
  File "/data/users/randy/condor/map/helios/pipeViewer/pipe_view/argos.py", line 45, in <module>
    from pipe_view.model.workspace import Workspace  # noqa: E402
  File "/nfshome/randy/miniconda3/envs/sparta/lib/python3.10/site-packages/pipe_view/model/workspace.py", line 15, in <module>
    from ..gui.layout_frame import Layout_Frame
  File "/nfshome/randy/miniconda3/envs/sparta/lib/python3.10/site-packages/pipe_view/gui/layout_frame.py", line 17, in <module>
    from .layout_canvas import Layout_Canvas
  File "/nfshome/randy/miniconda3/envs/sparta/lib/python3.10/site-packages/pipe_view/gui/layout_canvas.py", line 27, in <module>
    from .. import core
  File "pipe_view/core/src/core.pyx", line 11, in init pipe_view.core
NameError: name 'extract_value' is not defined

Modifying core.pyx to move extract_value from line 189 to before EXPR_NAMESPACE, rebuilding, hides the above error but results in a core dump with this command

cd map/sparta/release/example/CoreModel python3 ${MAP}/helios/pipeViewer/pipeview/argos.py --database pipeout --layout-file layouts/cpu_layout.alf

INFO: looking for  /nfshome/randy/miniconda3/envs/sparta/bin/transactionsearch
transaction search initialized: you will be able to use search.
Using: /nfshome/randy/miniconda3/envs/sparta/bin/transactionsearch
Gtk-Message: 11:43:26.163: Failed to load module "canberra-gtk-module"
Gtk-Message: 11:43:26.177: Failed to load module "canberra-gtk-module"
INFO:root:Constructing layout "layouts/cpu_layout.alf"
Constructing layout "layouts/cpu_layout.alf"
INFO:root:Layout loaded with 376 elements in 0.20339012145996094s
Layout loaded with 376 elements in 0.20339012145996094s
Segmentation fault (core dumped)

The Failed to load, can be solved by manually linkin, ./x86_64-linux-gnu/gtk-2.0/modules/libcanberra-gtk-module.so to /usr/lib I also modified LD_LIBRARY_PATH

This is where this ends up. It finds canberra, the extract_value symbol is not reported as undefined. but core dump

python3 ${MAP}/helios/pipeViewer/pipeview/argos.py --database pipeout --layout-file layouts/cpu_layout.alf INFO: looking for /nfshome/randy/miniconda3/envs/sparta/bin/transactionsearch transaction search initialized: you will be able to use search. Using: /nfshome/randy/miniconda3/envs/sparta/bin/transactionsearch INFO:root:Constructing layout "layouts/cpu_layout.alf" Constructing layout "layouts/cpu_layout.alf" INFO:root:Layout loaded with 376 elements in 0.20376920700073242s Layout loaded with 376 elements in 0.20376920700073242s Segmentation fault (core dumped)

klingaard commented 7 months ago

Yeah this has popped up a couple of times. Check out issue #465. In a nutshell the latest version of cython broke us.

jeffnye-gh commented 7 months ago

oops, I didn't search previously closed issues. Backing up the cython version works for us. I'll update our build scripts and README's

Thanks for your help.

klingaard commented 7 months ago

No worries. I'm actually someone else tried to solve this and got nowhere. Brett and I need to figure it out.

klingaard commented 7 months ago

Fixed in https://github.com/sparcians/map/pull/494