kou opened a new pull request, #37399:
URL: https://github.com/apache/arrow/pull/37399

   ### Rationale for this change
   
   Currently, `arrow.pc` has `Requires.private: grpc++` when Flight is enabled 
and system gRPC is used. `grpc++.pc` depends on `re2.pc` on Amazon Linux 2023 
and `re2.pc` has `-std=c++11`. It causes a problem when an user uses `c++ 
-std=c++17 a.cc $(pkg-config --cflags --libs arrow)`. Because the command will 
be expanded to `c++ -std=c++17 ... -std=c++11 ...`. The expanded command line 
uses C++11 not C++17 because `-std=c++11` is appeared after `-std=c++17`. In 
general, the user must use `c++ ... $(pkg-config --cflags --libs arrow) 
-std=c++17` to ensure using their `-std=XXX`. But we want to avoid this case as 
much as possible. 
   
   ### What changes are included in this PR?
   
   Split Flight related dependencies such as gRPC to 
ArrowFlightConfig.cmake/arrow-flight.pc from ArrowConfig.cmake/arrow.pc.
   
   Split Parquet related dependencies such as Thrift to 
ParquetConfig.cmake/parquet.pc from ArrowConfig.cmake/arrow.pc.
   
   With this change, `c++ -std=c++17 ... $(pkg-config --cflags --libs arrow)` 
works because `arrow.pc` doesn't depend on `grpc++` (`re2`). But `c++ 
-std=c++17 ... $(pkg-config --cflags --libs arrow-flight)` still doesn't work 
on Amazon Linux 2023. `c++ ... $(pkg-config --cflags --libs arrow-flight) ... 
-std=c++17 ...` should be used for the case.
   
   ### Are these changes tested?
   
   Yes.
   
   ### Are there any user-facing changes?
   
   Yes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to