Open sacckey opened 2 years ago
報告ありがとうございます。今月は時間がなく対応できないのですが10月頭に検証・対応致します。
いち利用者ですが参考までにわかっていることを報告いたします。grpc を 1.49.1 にアップデートすると解決~しました~できるかもしれません。
ubuntu 22.04 は glibc 2.35 をインストールします。現在の mjx は grpc 1.39.0 をバージョン固定でインストールしており、この grpc 1.39.0 の third party library である abseil-cpp が新しい glibc 2.34+ に対応していないことによるエラーであると思われます。
そのため上述のパッチが取り込まれたあとの abseil-cpp を使うよう変更して私の環境では解決しました。 grpc では以下の PR で解消しています。
.devcontainer/Dockerfile
で以下のように変更することで(開発環境の)ビルドだけはできることを確認しました。
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index 12d322a..3db0498 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -1,4 +1,4 @@
-FROM ubuntu:20.04
+FROM ubuntu:22.04
ARG DEBIAN_FRONTEND=noninteractive
@@ -20,7 +20,7 @@ RUN apt-get update && apt-get install -y \
# install gRPC
RUN cd / && \
- git clone --recurse-submodules -b v1.39.0 https://github.com/grpc/grpc && \
+ git clone --recurse-submodules -b v1.49.1 https://github.com/grpc/grpc && \
cd grpc && \
mkdir -p cmake/build && \
cd cmake/build && \
テストや動作確認などは詳細に検証していおりません。参考になれば幸いです。
ご報告ありがとうございます🙏 参考にさせて頂きます!
ありがとうございます!
grpcをアップデートしたところ、以下のようなエラーが出ました。
In file included from /tmp/pip-req-build-t7rcojkd/include/mjx/action.cpp:1:
/tmp/pip-req-build-t7rcojkd/include/mjx/action.h:23:8: error: ‘optional’ in namespace ‘std’ does not name a template type
23 | std::optional<int> tile() const noexcept;
| ^~~~~~~~
/tmp/pip-req-build-t7rcojkd/include/mjx/action.h:5:1: note: ‘std::optional’ is defined in header ‘<optional>’; did you forget to ‘#include <optional>’?
そのため、std::optionalを使用している全ファイルに#include <optional>
を追記することで、無事にインストールすることができました。
ワークアラウンドとして、Ubuntu 22.04の場合は以下のコマンドでインストールできるかと思います。
pip install git+https://github.com/sacckey/mjx.git@update-grpc-version
プルリクエストも作成したので、お時間ができたタイミングで確認いただけますと幸いです。
ソースからはビルド出来るようにPRを出してもらいましたが、cibuildwheelがちゃんと動いてないのが検証できてないのでissueは開けたままにしておきます🙏 10月対応になります。
環境 OS: Ubuntu 22.04.1 LTS Python: 3.10.6 pip: 22.2.2 from /usr/local/lib/python3.10/dist-packages/pip (python 3.10) cmake: 3.22.1 ninja: 1.10.1
Ubuntu 22.04でpipを使ってMjxをインストールしようとしたのですが、エラーが出て失敗してしまいました。 もし環境やインストール手順が間違っていれば、教えていただきたいです🙇♂️
実行したコマンドと発生したエラーは以下の通りです。
コマンド
エラー