You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ko...@apache.org on 2022/05/17 00:07:10 UTC
[arrow] branch master updated: ARROW-16571: [Java] Update .gitignore to exclude JNI-related binaries
This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new f17b09b4ba ARROW-16571: [Java] Update .gitignore to exclude JNI-related binaries
f17b09b4ba is described below
commit f17b09b4ba912f9658974ce1f6f12ee48a92cf26
Author: Larry White <lw...@users.noreply.github.com>
AuthorDate: Tue May 17 09:06:58 2022 +0900
ARROW-16571: [Java] Update .gitignore to exclude JNI-related binaries
Adds three lines to gitignore to exclude three folders containing binaries and other build output produced by the JNI build process. The folders:
- java-dist/
- java-native-c/
- java-native-cpp/
are created in the root arrow directory when cmake is run
The command line build is documented here: https://arrow.apache.org/docs/dev/developers/java/building.html#
I followed the macOS instructions:
[Building JNI Libraries on MacOS](https://arrow.apache.org/docs/dev/developers/java/building.html#id7)
To build only the C Data Interface library:
$ cd arrow
$ brew bundle --file=cpp/Brewfile
Homebrew Bundle complete! 25 Brewfile dependencies now installed.
$ export JAVA_HOME=<absolute path to your java home>
$ mkdir -p java-dist java-native-c
$ cd java-native-c
$ cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_INSTALL_PREFIX=../java-dist \
../java/c
$ cmake --build . --target install
To build other JNI libraries:
$ cd arrow
$ brew bundle --file=cpp/Brewfile
Homebrew Bundle complete! 25 Brewfile dependencies now installed.
$ export JAVA_HOME=<absolute path to your java home>
$ mkdir -p java-dist java-native-cpp
$ cd java-native-cpp
$ cmake \
-DARROW_BOOST_USE_SHARED=OFF \
-DARROW_BROTLI_USE_SHARED=OFF \
-DARROW_BZ2_USE_SHARED=OFF \
-DARROW_GFLAGS_USE_SHARED=OFF \
-DARROW_GRPC_USE_SHARED=OFF \
-DARROW_LZ4_USE_SHARED=OFF \
-DARROW_OPENSSL_USE_SHARED=OFF \
-DARROW_PROTOBUF_USE_SHARED=OFF \
-DARROW_SNAPPY_USE_SHARED=OFF \
-DARROW_THRIFT_USE_SHARED=OFF \
-DARROW_UTF8PROC_USE_SHARED=OFF \
-DARROW_ZSTD_USE_SHARED=OFF \
-DARROW_JNI=ON \
-DARROW_PARQUET=ON \
-DARROW_FILESYSTEM=ON \
-DARROW_DATASET=ON \
-DARROW_GANDIVA_JAVA=ON \
-DARROW_GANDIVA_STATIC_LIBSTDCPP=ON \
-DARROW_GANDIVA=ON \
-DARROW_ORC=ON \
-DARROW_PLASMA_JAVA_CLIENT=ON \
-DARROW_PLASMA=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_INSTALL_PREFIX=../java-dist \
-DCMAKE_UNITY_BUILD=ON \
-Dre2_SOURCE=BUNDLED \
-DBoost_SOURCE=BUNDLED \
-Dutf8proc_SOURCE=BUNDLED \
-DSnappy_SOURCE=BUNDLED \
-DORC_SOURCE=BUNDLED \
-DZLIB_SOURCE=BUNDLED \
../cpp
$ cmake --build . --target install
[Building Arrow JNI Modules](https://arrow.apache.org/docs/dev/developers/java/building.html#id8)
To compile the JNI bindings, use the arrow-c-data Maven profile:
$ cd arrow/java
$ mvn -Darrow.c.jni.dist.dir=../java-dist/lib -Parrow-c-data clean install
To compile the JNI bindings for ORC / Gandiva / Dataset, use the arrow-jni Maven profile:
$ cd arrow/java
$ mvn -Darrow.cpp.build.dir=../java-dist/lib -Parrow-jni clean install
Closes #13153 from lwhite1/update-gitignore-to-include-folders-where-binaries-are-created
Authored-by: Larry White <lw...@users.noreply.github.com>
Signed-off-by: Sutou Kouhei <ko...@clear-code.com>
---
.gitignore | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/.gitignore b/.gitignore
index 8b12a9a5f7..1406c30689 100644
--- a/.gitignore
+++ b/.gitignore
@@ -82,3 +82,8 @@ cpp/Brewfile.lock.json
# docker volumes used for caching
.docker
+
+# generated native binaries created by java JNI build
+java-dist/
+java-native-c/
+java-native-cpp/