Closed lucasjinreal closed 4 months ago
I encountered the same error:
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniconda/base/envs/GPTSoVits/include -arch arm64 -I/opt/homebrew/Caskroom/miniconda/base/envs/GPTSoVits/include -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniconda/base/envs/GPTSoVits/include -arch arm64 -I/opt/homebrew/opt/llvm/include -DHAVE_CONFIG_H -DDIC_VERSION=102 -DMECAB_DEFAULT_RC=\"dummy\" -DPACKAGE=\"open_jtalk\" -DVERSION=\"1.10\" -DCHARSET_UTF_8 -I/private/var/folders/1k/6jlpdls54y95nbx73r3753h00000gn/T/pip-build-env-4a_60psr/overlay/lib/python3.9/site-packages/numpy/core/include -I/private/var/folders/1k/6jlpdls54y95nbx73r3753h00000gn/T/pip-install-29pent9o/pyopenjtalk_55d7b7b9ee9e4b33a6e6fc2edeec9d2d/lib/open_jtalk/src/jpcommon -I/private/var/folders/1k/6jlpdls54y95nbx73r3753h00000gn/T/pip-install-29pent9o/pyopenjtalk_55d7b7b9ee9e4b33a6e6fc2edeec9d2d/lib/open_jtalk/src/mecab/src -I/private/var/folders/1k/6jlpdls54y95nbx73r3753h00000gn/T/pip-install-29pent9o/pyopenjtalk_55d7b7b9ee9e4b33a6e6fc2edeec9d2d/lib/open_jtalk/src/mecab2njd -I/private/var/folders/1k/6jlpdls54y95nbx73r3753h00000gn/T/pip-install-29pent9o/pyopenjtalk_55d7b7b9ee9e4b33a6e6fc2edeec9d2d/lib/open_jtalk/src/njd -I/private/var/folders/1k/6jlpdls54y95nbx73r3753h00000gn/T/pip-install-29pent9o/pyopenjtalk_55d7b7b9ee9e4b33a6e6fc2edeec9d2d/lib/open_jtalk/src/njd2jpcommon -I/private/var/folders/1k/6jlpdls54y95nbx73r3753h00000gn/T/pip-install-29pent9o/pyopenjtalk_55d7b7b9ee9e4b33a6e6fc2edeec9d2d/lib/open_jtalk/src/njd_set_accent_phrase -I/private/var/folders/1k/6jlpdls54y95nbx73r3753h00000gn/T/pip-install-29pent9o/pyopenjtalk_55d7b7b9ee9e4b33a6e6fc2edeec9d2d/lib/open_jtalk/src/njd_set_accent_type -I/private/var/folders/1k/6jlpdls54y95nbx73r3753h00000gn/T/pip-install-29pent9o/pyopenjtalk_55d7b7b9ee9e4b33a6e6fc2edeec9d2d/lib/open_jtalk/src/njd_set_digit -I/private/var/folders/1k/6jlpdls54y95nbx73r3753h00000gn/T/pip-install-29pent9o/pyopenjtalk_55d7b7b9ee9e4b33a6e6fc2edeec9d2d/lib/open_jtalk/src/njd_set_long_vowel -I/private/var/folders/1k/6jlpdls54y95nbx73r3753h00000gn/T/pip-install-29pent9o/pyopenjtalk_55d7b7b9ee9e4b33a6e6fc2edeec9d2d/lib/open_jtalk/src/njd_set_pronunciation -I/private/var/folders/1k/6jlpdls54y95nbx73r3753h00000gn/T/pip-install-29pent9o/pyopenjtalk_55d7b7b9ee9e4b33a6e6fc2edeec9d2d/lib/open_jtalk/src/njd_set_unvoiced_vowel -I/private/var/folders/1k/6jlpdls54y95nbx73r3753h00000gn/T/pip-install-29pent9o/pyopenjtalk_55d7b7b9ee9e4b33a6e6fc2edeec9d2d/lib/open_jtalk/src/text2mecab -I/opt/homebrew/Caskroom/miniconda/base/envs/GPTSoVits/include/python3.9 -c lib/open_jtalk/src/mecab/src/char_property.cpp -o build/temp.macosx-11.1-arm64-3.9/lib/open_jtalk/src/mecab/src/char_property.o
In file included from lib/open_jtalk/src/mecab/src/char_property.cpp:11:
In file included from lib/open_jtalk/src/mecab/src/char_property.h:8:
In file included from lib/open_jtalk/src/mecab/src/mmap.h:51:
lib/open_jtalk/src/mecab/src/utils.h:47:8: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
47 | std::sprintf(s, "%-16f", val);
| ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/stdio.h:180:1: note: 'sprintf' has been explicitly marked deprecated here
180 | __deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
| ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
215 | #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
| ^
In file included from lib/open_jtalk/src/mecab/src/char_property.cpp:11:
lib/open_jtalk/src/mecab/src/char_property.h:40:5: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
40 | register const char *p = begin;
| ^~~~~~~~
1 warning and 1 error generated.
error: command '/opt/homebrew/opt/llvm/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pyopenjtalk
Failed to build pyopenjtalk
ERROR: Could not build wheels for pyopenjtalk, which is required to install pyproject.toml-based projects
After some investigations, I think this is related to https://github.com/r9y9/open_jtalk/pull/9
Before this PR is merged, I ended up working around this by compiling pyopenjtalk from the source, then patched the fix to the source code of open_jtalk.
fixed by new release https://github.com/r9y9/pyopenjtalk/releases/tag/v0.3.4
yopenjtalk_ecf56914d5064c4b8528200fb4984bda/lib/open_jtalk/src/mecab/src/char_property.h:40:5: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister] register const char *p = begin; ^
~~~~ 1 warning and 1 error generated.