apache / apache/arrow-java

[Java] Gandiva fails to build on M1 Mac

Đang mở
#178 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Java
Star
94
Fork
152
Merge trung bình
3 ngày 16 giờ
Pull request đã merge (30 ngày)
11

Mô tả

### Describe the bug, including details regarding any error messages, version, and platform.

When building the Java JNI modules on M1
```
mvn \
-Darrow.cpp.build.dir=/java-dist/lib/ \
-Darrow.c.jni.dist.dir=/java-dist/lib/ \
-Parrow-jni clean install
```

.. we'll fail on the Gandiva module ..
```
...
[INFO] Arrow Gandiva ...................................... FAILURE [ 3.053 s]
[INFO] Arrow Java C Data Interface ........................ SKIPPED
[INFO] Arrow Java Dataset ................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:34 min
[INFO] Finished at: 2023-07-27T17:17:21-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.6.1:compile (default) on project arrow-gandiva: Unable to resolve artifact: Missing:
[ERROR] ----------
[ERROR] 1) com.google.protobuf:protoc:exe:osx-aarch_64:3.20.3
[ERROR]
[ERROR] Try downloading the file manually from the project website.
[ERROR]
[ERROR] Then, install it using the command:
[ERROR] mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.20.3 -Dclassifier=osx-aarch_64 -Dpackaging=exe -Dfile=/path/to/file
[ERROR]
[ERROR] Alternatively, if you host your own repository you can deploy the file there:
[ERROR] mvn deploy:deploy-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.20.3 -Dclassifier=osx-aarch_64 -Dpackaging=exe -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[ERROR]
[ERROR] Path to dependency:
[ERROR] 1) org.apache.arrow.gandiva:arrow-gandiva:jar:13.0.0-SNAPSHOT
[ERROR] 2) com.google.protobuf:protoc:exe:osx-aarch_64:3.20.3
[ERROR]
[ERROR] ----------
[ERROR] 1 required artifact is missing.
[ERROR]
[ERROR] for artifact:
[ERROR] org.apache.arrow.gandiva:arrow-gandiva:jar:13.0.0-SNAPSHOT
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] apache.snapshots (https://repository.apache.org/snapshots, releases=false, snapshots=true),
[ERROR] central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false)
```

Why? Gandiva uses protoc version `v3.20.3`, which doesn't have an osx-aarch64 build on maven[1]. If you check +/-1 from this version, there _is_ an osx-aarch64 build.

We can either:
1) Request the osx-aarch64 build be uploaded (assuming it wasn't broken or removed deliberately).
2) Upgrade protobuf. There are 263 new commits if we upgrade to the next incremental release[2].

I built Gandiva with protobuf `v3.21.0` and tests passed, but I haven't verified any farther than that.

[1] https://repo.maven.apache.org/maven2/com/google/protobuf/protoc/3.20.3/
[2] https://github.com/protocolbuffers/protobuf/compare/v3.20.3...v3.21.0

### Component(s)

Java

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với lệnh Maven và mô-đun Java của Arrow Gandiva được mô tả trong issue, sau đó kiểm tra cách protoc 3.20.3 được cấu hình cho bản build Java JNI. So sánh các phiên bản protobuf hiện có và xác minh thay đổi đã chọn bằng cách build Gandiva trên máy Mac M1 và chạy các bài kiểm thử của nó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
java
Lĩnh vực
build-system
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.