Sober7135 commented on code in PR #857:
URL: https://github.com/apache/incubator-graphar/pull/857#discussion_r2811065974


##########
rust/build.rs:
##########
@@ -63,6 +69,22 @@ fn build_graphar() -> Vec<PathBuf> {
         .define("CMAKE_BUILD_TYPE", cmake_build_type)
         .define("GRAPHAR_BUILD_STATIC", "ON")
         .define("GRAPHAR_ENABLE_SANITIZER", "OFF");
+
+    let arrow_prefix = if let Ok(arrow_home) = env::var("ARROW_HOME") {
+        Some(arrow_home)
+    } else if let Ok(arrow_lib) = pkg_config::probe_library("arrow") {
+        arrow_lib
+            .include_paths
+            .first()
+            .map(|path| 
path.parent().unwrap_or(path).to_string_lossy().to_string())

Review Comment:
   
   I think this method is somewhat heuristic. Maybe we should try using 
`pkg-config --variable=prefix arrow`. on my mac:
   
   <img width="306" height="59" alt="Image" 
src="https://github.com/user-attachments/assets/7f8ac684-1d55-4db1-abc4-46c3be005f02";
 />
   
   For using `pkg-config` crate:
   ```Rust
   pkg_config::get_variable("arrow", "prefix")
   ```



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to