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

Compilation Failed #13

Open
ksurya opened this issue Aug 21, 2017 · 4 comments
Open

Compilation Failed #13

ksurya opened this issue Aug 21, 2017 · 4 comments

Comments

@ksurya
Copy link

ksurya commented Aug 21, 2017

I am getting the following error while building the library. Would you mind looking into this?

screen shot 2017-08-21 at 6 07 15 pm

@ksurya ksurya changed the title PGCC Compilation Failed Compilation Failed Aug 22, 2017
@kernc
Copy link

kernc commented Aug 23, 2017

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. 🤞

@drewrisinger
Copy link

Trying to build this package for Nix (python3.7). C++ compilation fails. See reproducible build at NixOS/nixpkgs#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

@drewrisinger
Copy link

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.

drewrisinger pushed a commit to drewrisinger/fastdtw that referenced this issue Feb 24, 2020
See slaypni#13. Issue is that the cythonized .pyx file can stop matching
CPython APIs across Python versions, and that the .cpp file is
automatically used if it exists. This causes the Cython build to fail.

The gitignore change prevents .cpp files from being added in future
and adds a note about why not.
@lpryszcz
Copy link

lpryszcz commented Oct 21, 2020

This PR is still not merged. Meanwhile, just execute before build:

rm fastdtw/*.cpp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants