tokenizers [building on windows] onig_sys/oniguruma two or more data types in declaration specifiers

sycxhyv7  于 9个月前  发布在  Windows
关注(0)|答案(2)|浏览(217)

我正在使用tokenizerscandle,我的一个Windows用户在尝试构建screenpipe时遇到了两个问题:

CPU only

  1. PS D:\AI\Screen\screen-pipe> cargo build --release
  2. Compiling rustls-webpki v0.102.6
  3. Compiling onig_sys v69.8.1
  4. Compiling symphonia-utils-xiph v0.5.4
  5. Compiling hyper-tls v0.5.0
  6. Compiling http-body v1.0.1
  7. Compiling spm_precompiled v0.1.4
  8. Compiling idna v0.5.0
  9. Compiling tokio v1.39.2
  10. Compiling indexmap v1.9.3
  11. Compiling macro_rules_attribute v0.2.0
  12. Compiling ntapi v0.4.1
  13. Compiling which v6.0.1
  14. Compiling windows v0.54.0
  15. Compiling digest v0.10.7
  16. Compiling rayon-cond v0.3.0
  17. Compiling parking_lot v0.12.3
  18. Compiling fancy-regex v0.13.0
  19. Compiling zune-jpeg v0.4.13
  20. Compiling candle-nn v0.6.0
  21. Compiling tiff v0.9.1
  22. Compiling regex v1.10.5
  23. Compiling crossbeam-utils v0.8.20
  24. Compiling derive_builder v0.20.0
  25. Compiling esaxx-rs v0.1.10
  26. Compiling futures v0.3.30
  27. Compiling tokio-stream v0.1.15
  28. Compiling serde_plain v1.0.2
  29. Compiling qoi v0.4.1
  30. Compiling schannel v0.1.23
  31. Compiling axum-core v0.3.4
  32. Compiling cexpr v0.6.0
  33. Compiling serde_json v1.0.121
  34. Compiling tracing-core v0.1.32
  35. Compiling native-tls v0.2.12
  36. Compiling unicode-normalization-alignments v0.1.12
  37. Compiling thiserror v1.0.63
  38. Compiling reqwest v0.11.27
  39. Compiling bitflags v2.6.0
  40. Compiling heck v0.5.0
  41. Compiling fastrand v2.1.0
  42. Compiling itoa v1.0.11
  43. Compiling unicode_categories v0.1.1
  44. Compiling log v0.4.22
  45. Compiling lazy_static v1.5.0
  46. Compiling shlex v1.3.0
  47. Compiling cpufeatures v0.2.12
  48. Compiling strsim v0.11.1
  49. Compiling clap_lex v0.7.2
  50. Compiling rustc-hash v1.1.0
  51. Compiling ryu v1.0.18
  52. Compiling crc-catalog v2.4.0
  53. Compiling lazycell v1.3.0
  54. Compiling crossbeam-queue v0.3.11
  55. Compiling url v2.5.2
  56. Compiling clap_derive v4.5.11
  57. Compiling sha2 v0.10.8
  58. The following warnings were emitted during compilation:
  59. warning: onig_sys@69.8.1: In file included from oniguruma\src/regenc.h:36,
  60. warning: onig_sys@69.8.1: from oniguruma\src/regint.h:103,
  61. warning: onig_sys@69.8.1: from oniguruma\src\regexec.c:36:
  62. warning: onig_sys@69.8.1: D:\AI\Screen\screen-pipe\target\release\build\onig_sys-308529629068d6af\out/config.h:32:15: error: two or more data types in declaration specifiers
  63. warning: onig_sys@69.8.1: 32 | #define uid_t int
  64. warning: onig_sys@69.8.1: | ^~~
  65. warning: onig_sys@69.8.1: D:\AI\Screen\screen-pipe\target\release\build\onig_sys-308529629068d6af\out/config.h:33:15: error: two or more data types in declaration specifiers
  66. warning: onig_sys@69.8.1: 33 | #define gid_t int
  67. warning: onig_sys@69.8.1: | ^~~
  68. error: failed to run custom build command for `onig_sys v69.8.1`
  69. Caused by:
  70. process didn't exit successfully: `D:\AI\Screen\screen-pipe\target\release\build\onig_sys-d764c792d708edb0\build-script-build` (exit code: 1)
  71. --- stdout
  72. cargo:rerun-if-env-changed=RUSTONIG_DYNAMIC_LIBONIG
  73. cargo:rerun-if-env-changed=RUSTONIG_STATIC_LIBONIG
  74. cargo:rerun-if-env-changed=RUSTONIG_SYSTEM_LIBONIG
  75. OUT_DIR = Some(D:\AI\Screen\screen-pipe\target\release\build\onig_sys-308529629068d6af\out)
  76. TARGET = Some(x86_64-pc-windows-gnu)
  77. OPT_LEVEL = Some(3)
  78. HOST = Some(x86_64-pc-windows-gnu)
  79. cargo:rerun-if-env-changed=CC_x86_64-pc-windows-gnu
  80. CC_x86_64-pc-windows-gnu = None
  81. cargo:rerun-if-env-changed=CC_x86_64_pc_windows_gnu
  82. CC_x86_64_pc_windows_gnu = None
  83. cargo:rerun-if-env-changed=HOST_CC
  84. HOST_CC = None
  85. cargo:rerun-if-env-changed=CC
  86. CC = None
  87. cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  88. RUSTC_WRAPPER = None
  89. cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  90. CRATE_CC_NO_DEFAULTS = None
  91. DEBUG = Some(false)
  92. CARGO_CFG_TARGET_FEATURE = Some(cmpxchg16b,fxsr,sse,sse2,sse3)
  93. cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-gnu
  94. CFLAGS_x86_64-pc-windows-gnu = None
  95. cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_gnu
  96. CFLAGS_x86_64_pc_windows_gnu = None
  97. cargo:rerun-if-env-changed=HOST_CFLAGS
  98. HOST_CFLAGS = None
  99. cargo:rerun-if-env-changed=CFLAGS
  100. CFLAGS = None
  101. cargo:warning=In file included from oniguruma\src/regenc.h:36,
  102. cargo:warning= from oniguruma\src/regint.h:103,
  103. cargo:warning= from oniguruma\src\regexec.c:36:
  104. cargo:warning=D:\AI\Screen\screen-pipe\target\release\build\onig_sys-308529629068d6af\out/config.h:32:15: error: two or more data types in declaration specifiers
  105. cargo:warning= 32 | #define uid_t int
  106. cargo:warning= | ^~~
  107. cargo:warning=D:\AI\Screen\screen-pipe\target\release\build\onig_sys-308529629068d6af\out/config.h:33:15: error: two or more data types in declaration specifiers
  108. cargo:warning= 33 | #define gid_t int
  109. cargo:warning= | ^~~
  110. --- stderr
  111. error occurred: Command "gcc.exe" "-O3" "-ffunction-sections" "-fdata-sections" "-m64" "-I" "D:\\AI\\Screen\\screen-pipe\\target\\release\\build\\onig_sys-308529629068d6af\\out" "-I" "oniguruma\\src" "-o" "D:\\AI\\Screen\\screen-pipe\\target\\release\\build\\onig_sys-308529629068d6af\\out\\abd886268342579b-regexec.o" "-c" "oniguruma\\src\\regexec.c" with args gcc.exe did not execute successfully (status code exit code: 1).
  112. warning: build failed, waiting for other jobs to finish...
  113. Building [=================> ] 446/606: windows

cuda

huggingface/candle#353
他只是想让至少在CPU上正常工作,尝试在Windows上禁用onig,因为似乎你的Cargo.toml中有optional,但然后构建器抱怨没有onig
如何在windows上构建分词器?

7dl7o3gd

7dl7o3gd1#

你还可以使用unstable_wasm来使用高级正则表达式。

atmip9wb

atmip9wb2#

你是对的,它原本应该是可选的😓现在不是了。

相关问题