-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-41215][BUILD][PROTOBUF] Support user configurable protoc executables when building Spark Protobuf. #38743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…tables when building Spark Protobuf.
connector/protobuf/README.md
Outdated
| ### Build | ||
|
|
||
| ```bash | ||
| ./build/mvn -Phive clean package |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For protobuf module, do we have to compile with -Phive?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't seem to be necessary. Let me adjust it.
|
cc @HyukjinKwon FYI, a similar fix as SPARK-40593 |
…tables when building Spark Protobuf.
|
checked this pr in CentOS 6u3 passed |
|
Can one of the admins verify this patch? |
|
@HyukjinKwon Does this one need to be reviewed by others? |
|
Merged to master. |
|
Thanks @HyukjinKwon @LuciferYang~ |
|
Congratulations @WolverineJiang |
…tables when building Spark Protobuf ### What changes were proposed in this pull request? This PR use profile named `-Puser-defined-protoc` to support that users can build and test `protobuf` module by specifying custom `protoc` executables. ### Why are the changes needed? As described in [SPARK-41215](https://issues.apache.org/jira/browse/SPARK-41215), the latest versions of `protoc` have the minimum version requirements for basic libraries such as `glibc` and `glibcxx`. Because of that it is not possible to test-compile the `protobuf` module out of the box on CentOS 6 or CentOS 7. Instead the following error messages is shown: ``` [ERROR] /home/disk1/spark-ut/spark/connector/protobuf/src/test/resources/protobuf/timestamp.proto [0:0]: /tmp/protoc6599263403262688374.exe: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /tmp/protoc6599263403262688374.exe) [ERROR] /home/disk1/spark-ut/spark/connector/protobuf/src/test/resources/protobuf/timestamp.proto [0:0]: /tmp/protoc6599263403262688374.exe: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by /tmp/protoc6599263403262688374.exe) [ERROR] /home/disk1/spark-ut/spark/connector/protobuf/src/test/resources/protobuf/timestamp.proto [0:0]: /tmp/protoc6599263403262688374.exe: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /tmp/protoc6599263403262688374.exe) [ERROR] /home/disk1/spark-ut/spark/connector/protobuf/src/test/resources/protobuf/timestamp.proto [0:0]: /tmp/protoc6599263403262688374.exe: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.5' not found (required by /tmp/protoc6599263403262688374.exe) ``` ### Does this PR introduce _any_ user-facing change? No, the way to using official pre-release `protoc` binary files is activated by default. ### How was this patch tested? - Pass GitHub Actions - Manual test on CentOS6u3 and CentOS7u4 ```bash export PROTOBUF_PROTOC_EXEC_PATH=/path-to-protoc-exe ./build/mvn clean install -pl connector/protobuf -Puser-defined-protoc -am -DskipTests ./build/mvn clean test -pl connector/protobuf -Puser-defined-protoc ``` and ```bash export PROTOBUF_PROTOC_EXEC_PATH=/path-to-protoc-exe ./build/sbt clean "protobuf/compile" -Puser-defined-protoc ./build/sbt "protobuf/test" -Puser-defined-protoc ``` Closes apache#38743 from WolverineJiang/master. Authored-by: jianghaonan <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
…tables when building Spark Protobuf ### What changes were proposed in this pull request? This PR use profile named `-Puser-defined-protoc` to support that users can build and test `protobuf` module by specifying custom `protoc` executables. ### Why are the changes needed? As described in [SPARK-41215](https://issues.apache.org/jira/browse/SPARK-41215), the latest versions of `protoc` have the minimum version requirements for basic libraries such as `glibc` and `glibcxx`. Because of that it is not possible to test-compile the `protobuf` module out of the box on CentOS 6 or CentOS 7. Instead the following error messages is shown: ``` [ERROR] /home/disk1/spark-ut/spark/connector/protobuf/src/test/resources/protobuf/timestamp.proto [0:0]: /tmp/protoc6599263403262688374.exe: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /tmp/protoc6599263403262688374.exe) [ERROR] /home/disk1/spark-ut/spark/connector/protobuf/src/test/resources/protobuf/timestamp.proto [0:0]: /tmp/protoc6599263403262688374.exe: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by /tmp/protoc6599263403262688374.exe) [ERROR] /home/disk1/spark-ut/spark/connector/protobuf/src/test/resources/protobuf/timestamp.proto [0:0]: /tmp/protoc6599263403262688374.exe: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /tmp/protoc6599263403262688374.exe) [ERROR] /home/disk1/spark-ut/spark/connector/protobuf/src/test/resources/protobuf/timestamp.proto [0:0]: /tmp/protoc6599263403262688374.exe: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.5' not found (required by /tmp/protoc6599263403262688374.exe) ``` ### Does this PR introduce _any_ user-facing change? No, the way to using official pre-release `protoc` binary files is activated by default. ### How was this patch tested? - Pass GitHub Actions - Manual test on CentOS6u3 and CentOS7u4 ```bash export PROTOBUF_PROTOC_EXEC_PATH=/path-to-protoc-exe ./build/mvn clean install -pl connector/protobuf -Puser-defined-protoc -am -DskipTests ./build/mvn clean test -pl connector/protobuf -Puser-defined-protoc ``` and ```bash export PROTOBUF_PROTOC_EXEC_PATH=/path-to-protoc-exe ./build/sbt clean "protobuf/compile" -Puser-defined-protoc ./build/sbt "protobuf/test" -Puser-defined-protoc ``` Closes apache#38743 from WolverineJiang/master. Authored-by: jianghaonan <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
What changes were proposed in this pull request?
This PR use profile named
-Puser-defined-protocto support that users can build and testprotobufmodule by specifying customprotocexecutables.Why are the changes needed?
As described in SPARK-41215, the latest versions of
protochave the minimum version requirements for basic libraries such asglibcandglibcxx. Because of that it is not possible to test-compile theprotobufmodule out of the box on CentOS 6 or CentOS 7. Instead the following error messages is shown:Does this PR introduce any user-facing change?
No, the way to using official pre-release
protocbinary files is activated by default.How was this patch tested?
and