Comments (6)
In the Fedora RPM package I see:
Error compiling Cython file:
------------------------------------------------------------
...
raise TypeError("object does not present buffer interface")
cdef Py_buffer* pybuf = &self.pybuf
PyObject_GetBuffer(data, pybuf, bufflags)
self.dtype = TypeDict[getformat(pybuf)]
self.items = pybuf.len / pybuf.itemsize
^
------------------------------------------------------------
pybuffer.pyx:63:31: Cannot assign type 'double' to 'Py_ssize_t'
Cython 3 assumes Python 3 /
semantics. This should be fixable by using //
. Let me have a look.
from music.
f007845 (committed 2 years ago)
from music.
And then I get:
pymusic.cpp: In function 'PyObject* __pyx_pf_7pymusic_5Setup_6config(__pyx_obj_7pymusic_Setup*, std::string)':
pymusic.cpp:13679:45: error: invalid cast from type 'std::string' {aka 'std::__cxx11::basic_string<char>'} to type 'PyObject*' {aka '_object*'}
13679 | __pyx_t_10 = __Pyx_PyObject_AsDouble(((PyObject *)__pyx_v_vs)); if (unlikely(__pyx_t_10 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 441, __pyx_L10_error)
| ^~~~~~~~~~~~~~~~~~~~~~
pymusic.cpp:1512:43: note: in definition of macro 'likely'
1512 | #define likely(x) __builtin_expect(!!(x), 1)
| ^
/usr/include/python3.12/object.h:194:28: note: in expansion of macro '_Py_CAST'
194 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op))
| ^~~~~~~~
/usr/include/python3.12/object.h:254:43: note: in expansion of macro '_PyObject_CAST'
254 | # define Py_IS_TYPE(ob, type) Py_IS_TYPE(_PyObject_CAST(ob), (type))
| ^~~~~~~~~~~~~~
/usr/include/python3.12/floatobject.h:17:32: note: in expansion of macro 'Py_IS_TYPE'
17 | #define PyFloat_CheckExact(op) Py_IS_TYPE((op), &PyFloat_Type)
| ^~~~~~~~~~
pymusic.cpp:2870:10: note: in expansion of macro 'PyFloat_CheckExact'
2870 | ((likely(PyFloat_CheckExact(obj))) ? PyFloat_AS_DOUBLE(obj) :\
| ^~~~~~~~~~~~~~~~~~
pymusic.cpp:13679:20: note: in expansion of macro '__Pyx_PyObject_AsDouble'
13679 | __pyx_t_10 = __Pyx_PyObject_AsDouble(((PyObject *)__pyx_v_vs)); if (unlikely(__pyx_t_10 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 441, __pyx_L10_error)
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/python3.12/Python.h:38,
from pymusic.cpp:34:
pymusic.cpp:13679:45: error: invalid cast from type 'std::string' {aka 'std::__cxx11::basic_string<char>'} to type 'PyObject*' {aka '_object*'}
13679 | __pyx_t_10 = __Pyx_PyObject_AsDouble(((PyObject *)__pyx_v_vs)); if (unlikely(__pyx_t_10 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 441, __pyx_L10_error)
| ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/python3.12/pyport.h:24:38: note: in definition of macro '_Py_CAST'
24 | #define _Py_CAST(type, expr) ((type)(expr))
| ^~~~
/usr/include/python3.12/cpython/floatobject.h:18:49: note: in expansion of macro '_PyObject_CAST'
18 | #define PyFloat_AS_DOUBLE(op) PyFloat_AS_DOUBLE(_PyObject_CAST(op))
| ^~~~~~~~~~~~~~
pymusic.cpp:2870:39: note: in expansion of macro 'PyFloat_AS_DOUBLE'
2870 | ((likely(PyFloat_CheckExact(obj))) ? PyFloat_AS_DOUBLE(obj) :\
| ^~~~~~~~~~~~~~~~~
pymusic.cpp:13679:20: note: in expansion of macro '__Pyx_PyObject_AsDouble'
13679 | __pyx_t_10 = __Pyx_PyObject_AsDouble(((PyObject *)__pyx_v_vs)); if (unlikely(__pyx_t_10 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 441, __pyx_L10_error)
| ^~~~~~~~~~~~~~~~~~~~~~~
pymusic.cpp:13679:45: error: invalid cast from type 'std::string' {aka 'std::__cxx11::basic_string<char>'} to type 'PyObject*' {aka '_object*'}
13679 | __pyx_t_10 = __Pyx_PyObject_AsDouble(((PyObject *)__pyx_v_vs)); if (unlikely(__pyx_t_10 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 441, __pyx_L10_error)
| ^~~~~~~~~~~~~~~~~~~~~~
pymusic.cpp:1512:43: note: in definition of macro 'likely'
1512 | #define likely(x) __builtin_expect(!!(x), 1)
| ^
/usr/include/python3.12/object.h:194:28: note: in expansion of macro '_Py_CAST'
194 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op))
| ^~~~~~~~
/usr/include/python3.12/object.h:254:43: note: in expansion of macro '_PyObject_CAST'
254 | # define Py_IS_TYPE(ob, type) Py_IS_TYPE(_PyObject_CAST(ob), (type))
| ^~~~~~~~~~~~~~
/usr/include/python3.12/longobject.h:14:31: note: in expansion of macro 'Py_IS_TYPE'
14 | #define PyLong_CheckExact(op) Py_IS_TYPE((op), &PyLong_Type)
| ^~~~~~~~~~
pymusic.cpp:2871:9: note: in expansion of macro 'PyLong_CheckExact'
2871 | likely(PyLong_CheckExact(obj)) ?\
| ^~~~~~~~~~~~~~~~~
pymusic.cpp:13679:20: note: in expansion of macro '__Pyx_PyObject_AsDouble'
13679 | __pyx_t_10 = __Pyx_PyObject_AsDouble(((PyObject *)__pyx_v_vs)); if (unlikely(__pyx_t_10 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 441, __pyx_L10_error)
| ^~~~~~~~~~~~~~~~~~~~~~~
pymusic.cpp:13679:45: error: invalid cast from type 'std::string' {aka 'std::__cxx11::basic_string<char>'} to type 'PyObject*' {aka '_object*'}
13679 | __pyx_t_10 = __Pyx_PyObject_AsDouble(((PyObject *)__pyx_v_vs)); if (unlikely(__pyx_t_10 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 441, __pyx_L10_error)
| ^~~~~~~~~~~~~~~~~~~~~~
pymusic.cpp:2872:18: note: in definition of macro '__Pyx_PyObject_AsDouble'
2872 | PyLong_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj))
| ^~~
pymusic.cpp:13679:45: error: invalid cast from type 'std::string' {aka 'std::__cxx11::basic_string<char>'} to type 'PyObject*' {aka '_object*'}
13679 | __pyx_t_10 = __Pyx_PyObject_AsDouble(((PyObject *)__pyx_v_vs)); if (unlikely(__pyx_t_10 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 441, __pyx_L10_error)
| ^~~~~~~~~~~~~~~~~~~~~~
pymusic.cpp:2872:50: note: in definition of macro '__Pyx_PyObject_AsDouble'
2872 | PyLong_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj))
| ^~~
pymusic.cpp: At global scope:
pymusic.cpp:25805:15: warning: 'double __Pyx__PyObject_AsDouble(PyObject*)' defined but not used [-Wunused-function]
25805 | static double __Pyx__PyObject_AsDouble(PyObject* obj) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
from music.
I belive this might be a regression in Cython, I've opened cython/cython#5818
from music.
With cython/cython@bbbe428 Cython 3 works here.
from music.
I've got a WIP spec here, waiting on Cython 3.0.6:
https://bugzilla.redhat.com/show_bug.cgi?id=2224366
from music.
Related Issues (20)
- Compiling PyMusic without MPI? HOT 4
- Send rudeconfig changes upstream HOT 4
- Link to manual is broken HOT 2
- autogen.sh is failed HOT 3
- make install failed HOT 2
- Debian/Ubuntu package update HOT 10
- configure ignore given PYTHON env var HOT 3
- Unable to determine process rank HOT 4
- make install throws the error: 'install-exec-hook' failed
- nest simulation does not receive events from a non-nest script HOT 9
- When I am trying to install MUSIC, with the command './configure', I encountered "-bash: ./configure: No such file or directory" HOT 5
- No module named 'music.pymusic'
- music.Setup() fails if nest is imported HOT 2
- Error during make: ‘MPI’ does not name a type HOT 5
- Is version 1.17 ready now? HOT 1
- In Python 3.12, the distutils package is removed HOT 2
- AttributeError: module 'music' has no attribute 'Setup' HOT 1
- music ignores installation path set with --prefix=..
- MUSIC on ARM HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from music.