Skip to content

Conversation

@WolverineJiang
Copy link

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, 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
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

export PROTOBUF_PROTOC_EXEC_PATH=/path-to-protoc-exe
./build/sbt clean "protobuf/compile" -Puser-defined-protoc
./build/sbt  "protobuf/test" -Puser-defined-protoc

### Build

```bash
./build/mvn -Phive clean package
Copy link
Contributor

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?

Copy link
Author

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.

@LuciferYang
Copy link
Contributor

cc @HyukjinKwon FYI, a similar fix as SPARK-40593

@LuciferYang
Copy link
Contributor

checked this pr in CentOS 6u3 passed

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@LuciferYang
Copy link
Contributor

@HyukjinKwon Does this one need to be reviewed by others?

@HyukjinKwon
Copy link
Member

Merged to master.

@WolverineJiang
Copy link
Author

WolverineJiang commented Nov 24, 2022

Thanks @HyukjinKwon @LuciferYang~

@LuciferYang
Copy link
Contributor

Congratulations @WolverineJiang

beliefer pushed a commit to beliefer/spark that referenced this pull request Dec 15, 2022
…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]>
beliefer pushed a commit to beliefer/spark that referenced this pull request Dec 18, 2022
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants