Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symbol not found in namespace _distance #18

Open
msschwartz21 opened this issue Jan 24, 2025 · 0 comments
Open

Symbol not found in namespace _distance #18

msschwartz21 opened this issue Jan 24, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@msschwartz21
Copy link
Contributor

So far I have only been able to reproduce this error on my laptop (M4). All the other non-M4 macs that I've tried have been fine. The github testing action with the mac os is also fine, but I don't know what hardware the runners use.

_________________________________________ test_read_write_consistency[True-edge_attr_dtypes0-node_attr_dtypes1-int8] __________________________________________

node_dtype = 'int8', node_attr_dtypes = {'position': 'int[4]'}, edge_attr_dtypes = {'color': 'uint8', 'score': 'float64'}, directed = True

    @pytest.mark.parametrize("node_dtype", node_dtypes)
    @pytest.mark.parametrize("node_attr_dtypes", node_attr_dtypes)
    @pytest.mark.parametrize("edge_attr_dtypes", edge_attr_dtypes)
    @pytest.mark.parametrize("directed", [True, False])
    def test_read_write_consistency(
        node_dtype, node_attr_dtypes, edge_attr_dtypes, directed
    ):
>       graph = sg.SpatialGraph(
            ndims=4,
            node_dtype=node_dtype,
            node_attr_dtypes=node_attr_dtypes,
            edge_attr_dtypes=edge_attr_dtypes,
            position_attr="position",
            directed=directed,
        )

tests/test_basics.py:25: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.venv/lib/python3.11/site-packages/spatial_graph/spatial_graph.py:28: in __init__
    self._edge_rtree = LineRTree(f"{node_dtype}[2]", self.coord_dtype, ndims)
.venv/lib/python3.11/site-packages/spatial_graph/rtree/rtree.py:96: in __new__
    wrapper = witty.compile_module(
.venv/lib/python3.11/site-packages/witty/compile_module.py:132: in compile_module
    return _load_dynamic(module_name, module_lib)
.venv/lib/python3.11/site-packages/witty/compile_module.py:140: in _load_dynamic
    module = importlib.util.module_from_spec(spec)
<frozen importlib._bootstrap>:573: in module_from_spec
    ???
<frozen importlib._bootstrap_external>:1233: in create_module
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

f = <built-in function create_dynamic>
args = (ModuleSpec(name='_witty_module_38af6c65bd9fa4f1cd7f5ca7392c504f', loader=<_frozen_importlib_external.ExtensionFileLoa.../Users/schwartzm10/Library/Caches/cython/witty/_witty_module_38af6c65bd9fa4f1cd7f5ca7392c504f.cpython-311-darwin.so'),)
kwds = {}

>   ???
E   ImportError: dlopen(/Users/schwartzm10/Library/Caches/cython/witty/_witty_module_38af6c65bd9fa4f1cd7f5ca7392c504f.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace '_distance'

<frozen importlib._bootstrap>:241: ImportError
-------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------
In file included from /Users/schwartzm10/Library/Caches/cython/witty/_witty_module_0bf98348c8851a781ceea65a6ed8127a.cpp:1274:
/Users/schwartzm10/Code/geff/.venv/lib/python3.11/site-packages/spatial_graph/graph/src/graph_lite.h:1270:25: warning: unused variable 'num_tgt_removed' [-Wunused-variable]
 1270 |                     int num_tgt_removed = detail::container::erase_all(get_in_neighbors(tgt_pos), src_full);
      |                         ^~~~~~~~~~~~~~~
1 warning generated.
In file included from /Users/schwartzm10/Library/Caches/cython/witty/_witty_module_cec1ddff06f9700f2bd7d033f8d900ac.c:1262:
/Users/schwartzm10/Code/geff/.venv/lib/python3.11/site-packages/spatial_graph/rtree/src/rtree.c:300:13: warning: unused function 'rect_contains_point' [-Wunused-function]
  300 | static bool rect_contains_point(const struct rect *rect, const coord_t point[]) {
      |             ^~~~~~~~~~~~~~~~~~~
1 warning generated.
In file included from /Users/schwartzm10/Library/Caches/cython/witty/_witty_module_38af6c65bd9fa4f1cd7f5ca7392c504f.c:1271:
/Users/schwartzm10/Code/geff/.venv/lib/python3.11/site-packages/spatial_graph/rtree/src/rtree.c:300:13: warning: unused function 'rect_contains_point' [-Wunused-function]
  300 | static bool rect_contains_point(const struct rect *rect, const coord_t point[]) {
      |             ^~~~~~~~~~~~~~~~~~~
1 warning generated.
@msschwartz21 msschwartz21 added the bug Something isn't working label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant