Open amadoui opened 1 month ago
This https://github.com/neonbjb/tortoise-tts/issues/816#issuecomment-2352250712 fixed it for me.
@kleethesama tried your suggestion but i got the same issue when compiling "tokenizers-0.13.4rc3", i suspect the rustc compiler is not suitable for this task but cannot figure out how to deal with it
Compiling tokenizers v0.13.4 (C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\tokenizers-lib)
Running `rustc --crate-name tokenizers --edition=2018 tokenizers-lib\src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg "feature=\"cached-path\"" --cfg "feature=\"clap\"" --cfg "feature=\"cli\"" --cfg "feature=\"default\"" --cfg "feature=\"dirs\"" --cfg "feature=\"esaxx_fast\"" --cfg "feature=\"http\"" --cfg "feature=\"indicatif\"" --cfg "feature=\"onig\"" --cfg "feature=\"progressbar\"" --cfg "feature=\"reqwest\"" -C metadata=571339cac8db871d -C extra-filename=-571339cac8db871d --out-dir C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps -L dependency=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps --extern aho_corasick=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libaho_corasick-6e1ceb2730930a08.rmeta --extern cached_path=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libcached_path-b7c63fc96b7b8a96.rmeta --extern clap=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libclap-84048ff9c95fb4cc.rmeta --extern derive_builder=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libderive_builder-2b0b7bf261866a03.rmeta --extern dirs=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libdirs-49d8e5d94e87fa5e.rmeta --extern esaxx_rs=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libesaxx_rs-48bffd32ccaeb3f5.rmeta --extern getrandom=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libgetrandom-0d5f94c7c56cebb1.rmeta --extern indicatif=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libindicatif-90913102d1e1fe0f.rmeta --extern itertools=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libitertools-a824d246a521d621.rmeta --extern lazy_static=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\liblazy_static-90ac5ec4ca579963.rmeta --extern log=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\liblog-e72785d52d978e26.rmeta --extern macro_rules_attribute=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libmacro_rules_attribute-c5ccec30f814a496.rmeta --extern monostate=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libmonostate-f82384f188902be6.rmeta --extern onig=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libonig-0a91cd76d2a7fb72.rmeta --extern paste=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\paste-0469fbd59fc2e04c.dll --extern rand=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\librand-bbef81b04dff903c.rmeta --extern rayon=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\librayon-0692a0d06ad1db6b.rmeta --extern rayon_cond=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\librayon_cond-7ec684bc4c5c804d.rmeta --extern regex=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libregex-5553ea54d73d96cc.rmeta --extern regex_syntax=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libregex_syntax-7f4550e60d4205c7.rmeta --extern reqwest=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libreqwest-721a7e7c36e12898.rmeta --extern serde=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libserde-21a5e9db8ed00d2f.rmeta --extern serde_json=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libserde_json-8457fa567cc6f19d.rmeta --extern spm_precompiled=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libspm_precompiled-2071f0bb46ce086f.rmeta --extern thiserror=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libthiserror-1ea9a51dd83679bd.rmeta --extern unicode_normalization_alignments=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libunicode_normalization_alignments-e02e49ff2fe58290.rmeta --extern unicode_segmentation=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libunicode_segmentation-10977e716c0679c6.rmeta --extern unicode_categories=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libunicode_categories-a7fb754aa5a4a1a4.rmeta -L native=C:\Users\user\.cargo\registry\src\index.crates.io-6f17d22bba15001f\windows_x86_64_msvc-0.52.6\lib -L native=C:\Users\user\.cargo\registry\src\index.crates.io-6f17d22bba15001f\windows_x86_64_msvc-0.48.5\lib -L "native=C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.41.34120\atlmfc\lib\x64" -L native=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\build\bzip2-sys-d909296b23c64ab5\out\lib -L "native=C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.41.34120\atlmfc\lib\x64" -L native=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\build\zstd-sys-ca9050e4fbf40534\out -L "native=C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.41.34120\atlmfc\lib\x64" -L native=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\build\esaxx-rs-d8450fba8101abff\out -L "native=C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.41.34120\atlmfc\lib\x64" -L native=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\build\onig_sys-84a28246dad559a1\out`
Running `rustc --crate-name ndarray --edition=2018 C:\Users\user\.cargo\registry\src\index.crates.io-6f17d22bba15001f\ndarray-0.13.1\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C metadata=0a691bf027808050 -C extra-filename=-0a691bf027808050 --out-dir C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps -L dependency=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps --extern matrixmultiply=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libmatrixmultiply-05b30d9aee34739d.rmeta --extern num_complex=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libnum_complex-5aefd29d72e65d50.rmeta --extern num_integer=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libnum_integer-da28bd3984fda6f1.rmeta --extern num_traits=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libnum_traits-d946bd1460732915.rmeta --extern rawpointer=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\librawpointer-5e716fe4b452057e.rmeta --cap-lints allow`
error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
--> tokenizers-lib\src\models\bpe\trainer.rs:541:47
|
537 | let w = &words[*i] as *const _ as *mut _;
| -------------------------------- casting happend here
...
541 | let word: &mut Word = &mut (*w);
| ^^^^^^^^^
|
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
= note: `#[deny(invalid_reference_casting)]` on by default
error: could not compile `tokenizers` (lib) due to previous error
Caused by:
process didn't exit successfully: `rustc --crate-name tokenizers --edition=2018 tokenizers-lib\src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg "feature=\"cached-path\"" --cfg "feature=\"clap\"" --cfg "feature=\"cli\"" --cfg "feature=\"default\"" --cfg "feature=\"dirs\"" --cfg "feature=\"esaxx_fast\"" --cfg "feature=\"http\"" --cfg "feature=\"indicatif\"" --cfg "feature=\"onig\"" --cfg "feature=\"progressbar\"" --cfg "feature=\"reqwest\"" -C metadata=571339cac8db871d -C extra-filename=-571339cac8db871d --out-dir C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps -L dependency=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps --extern aho_corasick=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libaho_corasick-6e1ceb2730930a08.rmeta --extern cached_path=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libcached_path-b7c63fc96b7b8a96.rmeta --extern clap=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libclap-84048ff9c95fb4cc.rmeta --extern derive_builder=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libderive_builder-2b0b7bf261866a03.rmeta --extern dirs=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libdirs-49d8e5d94e87fa5e.rmeta --extern esaxx_rs=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libesaxx_rs-48bffd32ccaeb3f5.rmeta --extern getrandom=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libgetrandom-0d5f94c7c56cebb1.rmeta --extern indicatif=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libindicatif-90913102d1e1fe0f.rmeta --extern itertools=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libitertools-a824d246a521d621.rmeta --extern lazy_static=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\liblazy_static-90ac5ec4ca579963.rmeta --extern log=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\liblog-e72785d52d978e26.rmeta --extern macro_rules_attribute=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libmacro_rules_attribute-c5ccec30f814a496.rmeta --extern monostate=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libmonostate-f82384f188902be6.rmeta --extern onig=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libonig-0a91cd76d2a7fb72.rmeta --extern paste=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\paste-0469fbd59fc2e04c.dll --extern rand=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\librand-bbef81b04dff903c.rmeta --extern rayon=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\librayon-0692a0d06ad1db6b.rmeta --extern rayon_cond=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\librayon_cond-7ec684bc4c5c804d.rmeta --extern regex=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libregex-5553ea54d73d96cc.rmeta --extern regex_syntax=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libregex_syntax-7f4550e60d4205c7.rmeta --extern reqwest=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libreqwest-721a7e7c36e12898.rmeta --extern serde=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libserde-21a5e9db8ed00d2f.rmeta --extern serde_json=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libserde_json-8457fa567cc6f19d.rmeta --extern spm_precompiled=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libspm_precompiled-2071f0bb46ce086f.rmeta --extern thiserror=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libthiserror-1ea9a51dd83679bd.rmeta --extern unicode_normalization_alignments=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libunicode_normalization_alignments-e02e49ff2fe58290.rmeta --extern unicode_segmentation=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libunicode_segmentation-10977e716c0679c6.rmeta --extern unicode_categories=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\deps\libunicode_categories-a7fb754aa5a4a1a4.rmeta -L native=C:\Users\user\.cargo\registry\src\index.crates.io-6f17d22bba15001f\windows_x86_64_msvc-0.52.6\lib -L native=C:\Users\user\.cargo\registry\src\index.crates.io-6f17d22bba15001f\windows_x86_64_msvc-0.48.5\lib -L "native=C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.41.34120\atlmfc\lib\x64" -L native=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\build\bzip2-sys-d909296b23c64ab5\out\lib -L "native=C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.41.34120\atlmfc\lib\x64" -L native=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\build\zstd-sys-ca9050e4fbf40534\out -L "native=C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.41.34120\atlmfc\lib\x64" -L native=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\build\esaxx-rs-d8450fba8101abff\out -L "native=C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.41.34120\atlmfc\lib\x64" -L native=C:\Users\user\AppData\Local\Temp\pip-install-xemg5ck0\tokenizers_9ae7aa5a45ab44feb7b7128d84e551dc\target\release\build\onig_sys-84a28246dad559a1\out` (exit code: 1)
warning: build failed, waiting for other jobs to finish...
error: `cargo rustc --lib --message-format=json-render-diagnostics --manifest-path Cargo.toml --release -v --features pyo3/extension-module --crate-type cdylib --` failed with code 101
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for tokenizers
Successfully built tortoise-tts
Failed to build tokenizers
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (tokenizers)
@kleethesama tried your suggestion but i got the same issue when compiling "tokenizers-0.13.4rc3", i suspect the rustc compiler is not suitable for this task but cannot figure out how to deal with it
remember to pip uninstall tokenizers and transformers :) you may also face an issue currently with numpy - I manually set the requirements to the current values (facing same thing in Mac):
I got a problem whith tokenizers-0.13.4rc3 compiling I am trying on compile following the guide with miniconda on Windows 10 Environment 22H2 (OS Build 19045.4894) I have the following version installed in miniconda venv:
Any ideas about how to compile tokenizers-0.13.4rc3 succefully on Windows 10?