You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In file included from /Users/talley/Library/Caches/cython/witty/_witty_module_60cdc22c97a2c8c22d1fe4e1e910f7ac.cpp:1274:
/Users/talley/dev/self/spatial_graph/spatial_graph/graph/src/graph_lite.h:472:75: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
472 | static_cast<const EdgePropGraphBase*>(this)->template edge_prop(
| ^
/Users/talley/dev/self/spatial_graph/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 and 1 error generated.
In file included from /Users/talley/Library/Caches/cython/witty/_witty_module_60cdc22c97a2c8c22d1fe4e1e910f7ac.cpp:1274:
/Users/talley/dev/self/spatial_graph/spatial_graph/graph/src/graph_lite.h:472:75: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
472 | static_cast<const EdgePropGraphBase*>(this)->template edge_prop(
|^
/Users/talley/dev/self/spatial_graph/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 and 1 error generated.
---------------------------------------------------------------------------
CalledProcessError Traceback (most recent call last)
File ~/dev/self/spatial_graph/.venv/lib/python3.12/site-packages/setuptools/_distutils/spawn.py:70, in spawn(cmd, search_path, verbose, dry_run, env)
69try:
---> 70 subprocess.check_call(cmd, env=_inject_macos_ver(env))
71exceptOSErroras exc:
File ~/.local/share/uv/python/cpython-3.12.6-macos-aarch64-none/lib/python3.12/subprocess.py:413, in check_call(*popenargs, **kwargs)
412 cmd = popenargs[0]
--> 413 raise CalledProcessError(retcode, cmd)
414return0CalledProcessError: Command '['/opt/homebrew/opt/llvm/bin/clang++', '-fno-strict-overflow', '-Wsign-compare', '-Wunreachable-code', '-DNDEBUG', '-g', '-O3', '-Wall', '-arch', 'arm64', '-mmacosx-version-min=11.0', '-Wno-nullability-completeness', '-Wno-expansion-to-defined', '-Wno-undef-prefix', '-fPIC', '-Werror=unguarded-availability-new', '-I/Users/talley/dev/self/spatial_graph/spatial_graph/graph', '-I/Users/talley/dev/self/spatial_graph/.venv/include', '-I/Users/talley/.local/share/uv/python/cpython-3.12.6-macos-aarch64-none/include/python3.12', '-c', '/Users/talley/Library/Caches/cython/witty/_witty_module_60cdc22c97a2c8c22d1fe4e1e910f7ac.cpp', '-o', '/Users/talley/Library/Caches/cython/witty/Users/talley/Library/Caches/cython/witty/_witty_module_60cdc22c97a2c8c22d1fe4e1e910f7ac.o', '-O3', '-std=c++20']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
DistutilsExecError Traceback (most recent call last)
File ~/dev/self/spatial_graph/.venv/lib/python3.12/site-packages/setuptools/_distutils/unixccompiler.py:196, in UnixCCompiler._compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts)
195ifself.detect_language(src) =='c++':
--> 196 self.spawn(
197 compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs
198 )
199else:
File ~/dev/self/spatial_graph/.venv/lib/python3.12/site-packages/setuptools/_distutils/ccompiler.py:1045, in CCompiler.spawn(self, cmd, **kwargs)
1044 def spawn(self, cmd, **kwargs):
-> 1045 spawn(cmd, dry_run=self.dry_run, **kwargs)
File ~/dev/self/spatial_graph/.venv/lib/python3.12/site-packages/setuptools/_distutils/spawn.py:76, in spawn(cmd, search_path, verbose, dry_run, env)
75except subprocess.CalledProcessError as err:
---> 76 raise DistutilsExecError(
77f"command {_debug(cmd)!r} failed with exit code {err.returncode}"78 ) from err
DistutilsExecError: command '/opt/homebrew/opt/llvm/bin/clang++' failed with exit code 1
During handling of the above exception, another exception occurred:
CompileError Traceback (most recent call last)
Cell In[5], line 1
----> 1 graph = sg.SpatialGraph(
2 ndims=3,
3 node_dtype="uint64",
4 node_attr_dtypes={"position": "double[3]"},
5 edge_attr_dtypes={"score": "double"},
6 position_attr="position",
7 )
File ~/dev/self/spatial_graph/spatial_graph/graph/graph.py:41, in Graph.__new__(cls, node_dtype, node_attr_dtypes, edge_attr_dtypes, directed, *args, **kwargs)
38 wrapper_template.edge_attr_dtypes = edge_attr_dtypes
39 wrapper_template.directed = directed
---> 41 wrapper = witty.compile_module(
42str(wrapper_template),
43 source_files=[str(src_dir /"src"/"graph_lite.h")],
44 extra_compile_args=["-O3", "-std=c++20"],
45 include_dirs=[str(src_dir)],
46 language="c++",
47 quiet=True,
48 )
49 GraphType =type(cls.__name__, (cls, wrapper.Graph), {})
50return wrapper.Graph.__new__(GraphType)
File ~/dev/self/spatial_graph/.venv/lib/python3.12/site-packages/witty/compile_module.py:146, in compile_module(source_pyx, source_files, include_dirs, library_dirs, language, extra_compile_args, extra_link_args, name, force_rebuild, quiet)
144 build_extension.build_temp =str(module_dir)
145 build_extension.build_lib =str(module_dir)
--> 146 build_extension.run()
148return load_dynamic(module_name, module_lib)
File ~/dev/self/spatial_graph/.venv/lib/python3.12/site-packages/setuptools/_distutils/command/build_ext.py:359, in build_ext.run(self)
356self.compiler.set_link_objects(self.link_objects)
358# Now actually compile and link everything.
--> 359 self.build_extensions()
File ~/dev/self/spatial_graph/.venv/lib/python3.12/site-packages/setuptools/_distutils/command/build_ext.py:476, in build_ext.build_extensions(self)
474self._build_extensions_parallel()
475else:
--> 476 self._build_extensions_serial()
File ~/dev/self/spatial_graph/.venv/lib/python3.12/site-packages/setuptools/_distutils/command/build_ext.py:502, in build_ext._build_extensions_serial(self)
500for ext inself.extensions:
501withself._filter_build_errors(ext):
--> 502 self.build_extension(ext)
File ~/dev/self/spatial_graph/.venv/lib/python3.12/site-packages/setuptools/_distutils/command/build_ext.py:557, in build_ext.build_extension(self, ext)
554for undef in ext.undef_macros:
555 macros.append((undef,))
--> 557 objects = self.compiler.compile(
558 sources,
559 output_dir=self.build_temp,
560 macros=macros,
561 include_dirs=ext.include_dirs,
562 debug=self.debug,
563 extra_postargs=extra_args,
564 depends=ext.depends,
565 )
567#XXX outdated variable, kept here in case third-part code568# needs it.569self._built_objects = objects[:]
File ~/dev/self/spatial_graph/.venv/lib/python3.12/site-packages/setuptools/_distutils/ccompiler.py:606, in CCompiler.compile(self, sources, output_dir, macros, include_dirs, debug, extra_preargs, extra_postargs, depends)
604exceptKeyError:
605continue
--> 606 self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
608# Return *all* object filenames, not just the ones we just built.609return objects
File ~/dev/self/spatial_graph/.venv/lib/python3.12/site-packages/setuptools/_distutils/unixccompiler.py:202, in UnixCCompiler._compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts)
200self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs)
201except DistutilsExecError as msg:
--> 202 raise CompileError(msg)
CompileError: command '/opt/homebrew/opt/llvm/bin/clang++' failed with exit code 1
so, @funkey, it does unfortunately look like there might be some host-platform idiosyncrasies with the well-in-time compilation.
I think in this case, we can fix it just by explicitly passing the template arguments:
interestingly, this error does not occur on macos-latest CI (which is working in #7). so that also means that we may not be able to fully test target platforms on CI
I think in this case, we can fix it just by explicitly passing the template arguments: static_cast<const EdgePropGraphBase*>(this)->template edge_prop<U, V>(
yes, that fixes it for my local macos use case. That fix is included in #7
running creating a SpatialGraph instance failed for me locally after creating an environment and running:
so, @funkey, it does unfortunately look like there might be some host-platform idiosyncrasies with the well-in-time compilation.
I think in this case, we can fix it just by explicitly passing the template arguments:
and hopefully that's all this amounts to :)
The text was updated successfully, but these errors were encountered: