Skip to content

Latest commit

 

History

History
83 lines (63 loc) · 2.85 KB

File metadata and controls

83 lines (63 loc) · 2.85 KB

メモ

Intel oneAPI

ダウンロード

PCRE2

インストール

vcpkg install pcre2でインストールしたけど、パスの通し方が分からない… -DSSPLIT_USE_INTERNAL_PCRE2=ONを付けてcmakeすると、👆は使わないけど通った

ビルド

cd bergamot-translator\build-native
cmake ../ -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DSSPLIT_USE_INTERNAL_PCRE2=ON
REM cmake ../ -G "Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=Release -DSSPLIT_USE_INTERNAL_PCRE2=ON
nmake

ビルドが通らない... ファイルのコードページが932として認識されて(実際はUTF-8)、処理出来ない文字が存在するっぽい。 ファイルをUTF-8(BOM)に変換して再度ビルドすると通りそう。

bergamot-translator\3rd_party\marian-dev\CMakeLists.txtCMAKE_CXX_FLAGS/utf-8を足すと落ちてたところが通った。

👆だと結局PCRE2が無理なので、vckg通す

mkdir build-win
cd build-win
cmake -DBUILD_ARCH=corei7-avx -DCMAKE_BUILD_TYPE=Release -DUSE_STATIC_LIBS=ON -DVCPKG_TARGET_TRIPLET="x64-windows-static" ..
cmake --build . --config Release --target bergamot_translator_dynamic
cmake --install . --prefix "../libs" --component bergamot_translator_dynamic
mkdir build-win-arm
cd build-win-arm
cmake -DCMAKE_BUILD_TYPE=Release -DUSE_STATIC_LIBS=ON -DVCPKG_TARGET_TRIPLET="arm64-windows-static" ..
cmake --build . --config Release --target bergamot_translator_dynamic
cmake --install . --prefix "../libs" --component bergamot_translator_dynamic

これでも-- Not Found TCMalloc: TCMALLOC_LIB-NOTFOUNDがでる

bergamot-translator\.github\workflows\windows.ymlにビルド方法あるやん。

Linux

mkdir build-linux
cmake -DCMAKE_BUILD_TYPE=Release -DUSE_STATIC_LIBS=ON ..
cmake --build . --config Release --target bergamot_translator_dynamic -j12
cmake --install . --prefix "../libs" --component bergamot_translator_dynamic

実行

echo "Hello World!" | build-native\app\Debug\bergamot.exe --model-config-paths models\enja\config.yml

やること

  • Windows版のビルド通す
  • Windows版の実行確認
  • ネイティブ動的ライブラリの作成
  • ネイティブ動的ライブラリを参照した.NETライブラリの作成
  • .NETライブラリを参照したサンプルアプリの作成
  • NuGetパッケージの作成
  • ドキュメントの作成
  • テストの作成
  • CI/CDの設定
  • リリース