Open ksurya opened 6 years ago
The error is your /opt/pgi/linux86-64/16.10/bin/pgcc
compiler doesn't know about listed unknown switches (pgcc-Error-Unknown switch: ...
lines).
If this is a *Ubuntu system, install packages build-essential
and/or gcc
after which gcc might become the default system compiler. 🤞
Trying to build this package for Nix (python3.7). C++ compilation fails. See reproducible build at https://github.com/NixOS/nixpkgs/pull/78868
Looks like this C++ file has gotten out of date with the underlying CPython libraries.
Error section of GCC message:
fastdtw/_fastdtw.cpp: In function ‘PyObject* __Pyx_PyCFunction_FastCall(PyObject*, PyObject**, Py_ssize_t)’:
fastdtw/_fastdtw.cpp:20258:69: error: too many arguments to function
20258 | return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
| ^
fastdtw/_fastdtw.cpp:20248:15: warning: unused variable ‘result’ [-Wunused-variable]
20248 | PyObject *result;
| ^~~~~~
fastdtw/_fastdtw.cpp:20249:9: warning: unused variable ‘flags’ [-Wunused-variable]
20249 | int flags;
| ^~~~~
fastdtw/_fastdtw.cpp: In function ‘void __Pyx__ExceptionSave(PyThreadState*, PyObject**, PyObject**, PyObject**)’:
fastdtw/_fastdtw.cpp:22266:21: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
22266 | *type = tstate->exc_type;
| ^~~~~~~~
| curexc_type
fastdtw/_fastdtw.cpp:22267:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
22267 | *value = tstate->exc_value;
| ^~~~~~~~~
| curexc_value
fastdtw/_fastdtw.cpp:22268:19: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
22268 | *tb = tstate->exc_traceback;
| ^~~~~~~~~~~~~
| curexc_traceback
fastdtw/_fastdtw.cpp: In function ‘void __Pyx__ExceptionReset(PyThreadState*, PyObject*, PyObject*, PyObject*)’:
fastdtw/_fastdtw.cpp:22275:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
22275 | tmp_type = tstate->exc_type;
| ^~~~~~~~
| curexc_type
fastdtw/_fastdtw.cpp:22276:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
22276 | tmp_value = tstate->exc_value;
| ^~~~~~~~~
| curexc_value
fastdtw/_fastdtw.cpp:22277:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
22277 | tmp_tb = tstate->exc_traceback;
| ^~~~~~~~~~~~~
| curexc_traceback
fastdtw/_fastdtw.cpp:22278:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
22278 | tstate->exc_type = type;
| ^~~~~~~~
| curexc_type
fastdtw/_fastdtw.cpp:22279:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
22279 | tstate->exc_value = value;
| ^~~~~~~~~
| curexc_value
fastdtw/_fastdtw.cpp:22280:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
22280 | tstate->exc_traceback = tb;
| ^~~~~~~~~~~~~
| curexc_traceback
fastdtw/_fastdtw.cpp: In function ‘int __Pyx__GetException(PyThreadState*, PyObject**, PyObject**, PyObject**)’:
fastdtw/_fastdtw.cpp:22335:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
22335 | tmp_type = tstate->exc_type;
| ^~~~~~~~
| curexc_type
fastdtw/_fastdtw.cpp:22336:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
22336 | tmp_value = tstate->exc_value;
| ^~~~~~~~~
| curexc_value
fastdtw/_fastdtw.cpp:22337:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
22337 | tmp_tb = tstate->exc_traceback;
| ^~~~~~~~~~~~~
| curexc_traceback
fastdtw/_fastdtw.cpp:22338:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
22338 | tstate->exc_type = local_type;
| ^~~~~~~~
| curexc_type
fastdtw/_fastdtw.cpp:22339:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
22339 | tstate->exc_value = local_value;
| ^~~~~~~~~
| curexc_value
fastdtw/_fastdtw.cpp:22340:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
22340 | tstate->exc_traceback = local_tb;
| ^~~~~~~~~~~~~
| curexc_traceback
fastdtw/_fastdtw.cpp: In function ‘void __Pyx__ExceptionSwap(PyThreadState*, PyObject**, PyObject**, PyObject**)’:
fastdtw/_fastdtw.cpp:22575:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
22575 | tmp_type = tstate->exc_type;
| ^~~~~~~~
| curexc_type
fastdtw/_fastdtw.cpp:22576:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
22576 | tmp_value = tstate->exc_value;
| ^~~~~~~~~
| curexc_value
fastdtw/_fastdtw.cpp:22577:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
22577 | tmp_tb = tstate->exc_traceback;
| ^~~~~~~~~~~~~
| curexc_traceback
fastdtw/_fastdtw.cpp:22578:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
22578 | tstate->exc_type = *type;
| ^~~~~~~~
| curexc_type
fastdtw/_fastdtw.cpp:22579:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
22579 | tstate->exc_value = *value;
| ^~~~~~~~~
| curexc_value
fastdtw/_fastdtw.cpp:22580:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
22580 | tstate->exc_traceback = *tb;
| ^~~~~~~~~~~~~
| curexc_traceback
NOTE: Fixed this issue by removing the .cpp file. Will submit a PR requesting that to be removed. Proper format is to cythonize the .pyx file at setup time, which guarantees that the .cpp file matches the CPython version.
This PR is still not merged. Meanwhile, just execute before build:
rm fastdtw/*.cpp
I am getting the following error while building the library. Would you mind looking into this?