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

error: ISO C++17 does not allow dynamic exception specifications #13

Open
Akansuam opened this issue Jun 6, 2022 · 3 comments
Open
Labels
bug Something isn't working

Comments

@Akansuam
Copy link

Akansuam commented Jun 6, 2022

Such error occurs when trying to install pysinsy. Should I then add a flag somewhere like "--std=c++14"?

Building wheels for collected packages: pysinsy
Building wheel for pysinsy (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for pysinsy (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [152 lines of output]
fatal: not a git repository (or any of the parent directories): .git
running bdist_wheel
running build
running build_py
-- Building version 0.0.4
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/pysinsy
copying pysinsy/version.py -> build/lib.linux-x86_64-3.8/pysinsy
copying pysinsy/init.py -> build/lib.linux-x86_64-3.8/pysinsy
creating build/lib.linux-x86_64-3.8/pysinsy/htsvoice
copying pysinsy/htsvoice/COPYING -> build/lib.linux-x86_64-3.8/pysinsy/htsvoice
copying pysinsy/htsvoice/nitech_jp_song070_f001.htsvoice -> build/lib.linux-x86_64-3.8/pysinsy/htsvoice
creating build/lib.linux-x86_64-3.8/pysinsy/_dic
copying pysinsy/_dic/japanese.euc_jp.table -> build/lib.linux-x86_64-3.8/pysinsy/_dic
copying pysinsy/_dic/japanese.macron -> build/lib.linux-x86_64-3.8/pysinsy/_dic
copying pysinsy/_dic/japanese.utf_8.table -> build/lib.linux-x86_64-3.8/pysinsy/_dic
copying pysinsy/_dic/japanese.shift_jis.table -> build/lib.linux-x86_64-3.8/pysinsy/_dic
copying pysinsy/_dic/COPYING -> build/lib.linux-x86_64-3.8/pysinsy/_dic
copying pysinsy/_dic/japanese.shift_jis.conf -> build/lib.linux-x86_64-3.8/pysinsy/_dic
copying pysinsy/_dic/japanese.euc_jp.conf -> build/lib.linux-x86_64-3.8/pysinsy/_dic
copying pysinsy/_dic/japanese.utf_8.conf -> build/lib.linux-x86_64-3.8/pysinsy/_dic
running build_ext
skipping 'pysinsy/sinsy.cpp' Cython extension (up-to-date)
building 'pysinsy.sinsy' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/pysinsy
creating build/temp.linux-x86_64-3.8/lib
creating build/temp.linux-x86_64-3.8/lib/sinsy
creating build/temp.linux-x86_64-3.8/lib/sinsy/src
creating build/temp.linux-x86_64-3.8/lib/sinsy/src/lib
creating build/temp.linux-x86_64-3.8/lib/sinsy/src/lib/converter
creating build/temp.linux-x86_64-3.8/lib/sinsy/src/lib/japanese
creating build/temp.linux-x86_64-3.8/lib/sinsy/src/lib/label
creating build/temp.linux-x86_64-3.8/lib/sinsy/src/lib/score
creating build/temp.linux-x86_64-3.8/lib/sinsy/src/lib/temporary
creating build/temp.linux-x86_64-3.8/lib/sinsy/src/lib/util
creating build/temp.linux-x86_64-3.8/lib/sinsy/src/lib/xml
creating build/temp.linux-x86_64-3.8/lib/sinsy/src/lib/hts_engine_API
creating build/temp.linux-x86_64-3.8/lib/sinsy/src/lib/hts_engine_API/hts_engine
creating build/temp.linux-x86_64-3.8/lib/sinsy/src/lib/hts_engine_API/hts_engine/src
creating build/temp.linux-x86_64-3.8/lib/sinsy/src/lib/hts_engine_API/hts_engine/src/lib
x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/tmp/pip-build-env-h9gx3vey/overlay/lib/python3.8/site-packages/numpy/core/include -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/converter -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/japanese -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/label -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/score -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/temporary -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/xml -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/hts_engine_API -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/hts_engine_API/hts_engine/src/lib -Ilib/sinsy/src/include/sinsy -Ilib/sinsy/src/lib/hts_engine_API/hts_engine/src/include -I/home/lutxang/vv/include -I/usr/include/python3.8 -c pysinsy/sinsy.cpp -o build/temp.linux-x86_64-3.8/pysinsy/sinsy.o
In file included from /tmp/pip-build-env-h9gx3vey/overlay/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822,
from /tmp/pip-build-env-h9gx3vey/overlay/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
from /tmp/pip-build-env-h9gx3vey/overlay/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from pysinsy/sinsy.cpp:695:
/tmp/pip-build-env-h9gx3vey/overlay/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
17 | #warning "Using deprecated NumPy API, disable it with "
| ^~~~~~~
pysinsy/sinsy.cpp: In function ‘PyObject* __pyx_pf_7pysinsy_5sinsy_12LabelStrings_getData(__pyx_obj_7pysinsy_5sinsy_LabelStrings*)’:
pysinsy/sinsy.cpp:2078:33: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
2078 | for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
| ~~~~~~~~~~^~~~~~~~~~~
x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/tmp/pip-build-env-h9gx3vey/overlay/lib/python3.8/site-packages/numpy/core/include -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/converter -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/japanese -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/label -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/score -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/temporary -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/xml -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/hts_engine_API -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/hts_engine_API/hts_engine/src/lib -Ilib/sinsy/src/include/sinsy -Ilib/sinsy/src/lib/hts_engine_API/hts_engine/src/include -I/home/lutxang/vv/include -I/usr/include/python3.8 -c lib/sinsy/src/lib/Sinsy.cpp -o build/temp.linux-x86_64-3.8/lib/sinsy/src/lib/Sinsy.o
In file included from /tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/xml/XmlReader.h:50,
from lib/sinsy/src/lib/Sinsy.cpp:47:
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/xml/XmlParser.h:62:66: error: ISO C++17 does not allow dynamic exception specifications
62 | XmlData* read(IReadableStream& stream, std::string& encoding) throw (StreamException);
| ^~~~~
In file included from /tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/InputFile.h:47,
from lib/sinsy/src/lib/Sinsy.cpp:49:
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IReadableStream.h:64:51: error: ISO C++17 does not allow dynamic exception specifications
64 | virtual size_t read(void* buffer, size_t byte) throw (StreamException) = 0;
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IReadableStream.h:71:62: error: ISO C++17 does not allow dynamic exception specifications
71 | IReadableStream& fromStream(IReadableStream& stream, T& buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IReadableStream.h:88:72: error: ISO C++17 does not allow dynamic exception specifications
88 | inline IReadableStream& operator>>(IReadableStream& stream, char& buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IReadableStream.h:96:81: error: ISO C++17 does not allow dynamic exception specifications
96 | inline IReadableStream& operator>>(IReadableStream& stream, unsigned char& buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IReadableStream.h:104:73: error: ISO C++17 does not allow dynamic exception specifications
104 | inline IReadableStream& operator>>(IReadableStream& stream, INT16& buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IReadableStream.h:112:74: error: ISO C++17 does not allow dynamic exception specifications
112 | inline IReadableStream& operator>>(IReadableStream& stream, UINT16& buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IReadableStream.h:120:73: error: ISO C++17 does not allow dynamic exception specifications
120 | inline IReadableStream& operator>>(IReadableStream& stream, INT32& buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IReadableStream.h:128:74: error: ISO C++17 does not allow dynamic exception specifications
128 | inline IReadableStream& operator>>(IReadableStream& stream, UINT32& buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IReadableStream.h:136:73: error: ISO C++17 does not allow dynamic exception specifications
136 | inline IReadableStream& operator>>(IReadableStream& stream, INT64& buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IReadableStream.h:144:74: error: ISO C++17 does not allow dynamic exception specifications
144 | inline IReadableStream& operator>>(IReadableStream& stream, UINT64& buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IReadableStream.h:152:73: error: ISO C++17 does not allow dynamic exception specifications
152 | inline IReadableStream& operator>>(IReadableStream& stream, float& buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IReadableStream.h:160:74: error: ISO C++17 does not allow dynamic exception specifications
160 | inline IReadableStream& operator>>(IReadableStream& stream, double& buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IReadableStream.h:168:79: error: ISO C++17 does not allow dynamic exception specifications
168 | inline IReadableStream& operator>>(IReadableStream& stream, long double& buf) throw (StreamException)
| ^~~~~
In file included from lib/sinsy/src/lib/Sinsy.cpp:49:
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/InputFile.h:65:43: error: ISO C++17 does not allow dynamic exception specifications
65 | size_t read(void* buffer, size_t size) throw (StreamException);
| ^~~~~
In file included from /tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/OutputFile.h:47,
from lib/sinsy/src/lib/Sinsy.cpp:50:
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IWritableStream.h:63:58: error: ISO C++17 does not allow dynamic exception specifications
63 | virtual size_t write(const void* buffer, size_t byte) throw (StreamException) = 0;
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IWritableStream.h:87:71: error: ISO C++17 does not allow dynamic exception specifications
87 | inline IWritableStream& operator<<(IWritableStream& stream, char buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IWritableStream.h:95:80: error: ISO C++17 does not allow dynamic exception specifications
95 | inline IWritableStream& operator<<(IWritableStream& stream, unsigned char buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IWritableStream.h:103:72: error: ISO C++17 does not allow dynamic exception specifications
103 | inline IWritableStream& operator<<(IWritableStream& stream, INT16 buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IWritableStream.h:111:73: error: ISO C++17 does not allow dynamic exception specifications
111 | inline IWritableStream& operator<<(IWritableStream& stream, UINT16 buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IWritableStream.h:119:72: error: ISO C++17 does not allow dynamic exception specifications
119 | inline IWritableStream& operator<<(IWritableStream& stream, INT32 buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IWritableStream.h:127:73: error: ISO C++17 does not allow dynamic exception specifications
127 | inline IWritableStream& operator<<(IWritableStream& stream, UINT32 buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IWritableStream.h:135:72: error: ISO C++17 does not allow dynamic exception specifications
135 | inline IWritableStream& operator<<(IWritableStream& stream, INT64 buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IWritableStream.h:143:73: error: ISO C++17 does not allow dynamic exception specifications
143 | inline IWritableStream& operator<<(IWritableStream& stream, UINT64 buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IWritableStream.h:151:72: error: ISO C++17 does not allow dynamic exception specifications
151 | inline IWritableStream& operator<<(IWritableStream& stream, float buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IWritableStream.h:159:73: error: ISO C++17 does not allow dynamic exception specifications
159 | inline IWritableStream& operator<<(IWritableStream& stream, double buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IWritableStream.h:167:78: error: ISO C++17 does not allow dynamic exception specifications
167 | inline IWritableStream& operator<<(IWritableStream& stream, long double buf) throw (StreamException)
| ^~~~~
In file included from lib/sinsy/src/lib/Sinsy.cpp:50:
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/OutputFile.h:65:50: error: ISO C++17 does not allow dynamic exception specifications
65 | size_t write(const void* buffer, size_t size) throw (StreamException);
| ^~~~~
In file included from lib/sinsy/src/lib/Sinsy.cpp:51:
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/WritableStrStream.h:67:48: error: ISO C++17 does not allow dynamic exception specifications
67 | WritableStrStream& operator<<(const T& buf) throw (StreamException) {
| ^~~~~
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pysinsy
Failed to build pysinsy
ERROR: Could not build wheels for pysinsy, which is required to install pyproject.toml-based projects

@Akansuam
Copy link
Author

Akansuam commented Jun 6, 2022

I tried by simply removing the throw statement from the C code. The error seems to go away. But I believe this is not the best solution.

@Akansuam
Copy link
Author

Akansuam commented Jun 7, 2022

Solved for now using solution given in
nnsvs/nnsvs#86

@r9y9
Copy link
Owner

r9y9 commented Jun 9, 2022

I don't have a clear answer for this. Would be nice if you could make a PR.

@r9y9 r9y9 added the bug Something isn't working label Jun 9, 2022
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

2 participants