atsuik opened a new issue, #35140:
URL: https://github.com/apache/arrow/issues/35140

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   arrow version: 11.0.0.3
   R version: 4.2.3
   platform: arm64
   
   I found that current `r/configure`  fails to set PKG_CFLAGS parsing 
ARROW_OPTS_CMAKE file. 
   
   This is a log I tried to install arrow to my m1 mac.
   ```
   > install.packages("arrow")
   Installing package into ‘/opt/homebrew/lib/R/4.2/site-library’
   (as ‘lib’ is unspecified)
   trying URL 'https://cran.ism.ac.jp/src/contrib/arrow_11.0.0.3.tar.gz'
   Content type 'application/x-gzip' length 3921484 bytes (3.7 MB)
   ==================================================
   downloaded 3.7 MB
   
   * installing *source* package ‘arrow’ ...
   files ‘tools/cpp/src/arrow/Testing/Temporary/CTestCostData.txt’, 
‘tools/cpp/src/arrow/Testing/Temporary/LastTest.log’ are missing
   ** using staged installation
   *** Arrow C++ libraries found via pkg-config at 
/opt/homebrew/Cellar/apache-arrow/11.0.0_3/lib
   **** Warning: library version mismatch
   **** C++ is 11.0.0 but R is 11.0.0.3
   **** If installation fails, upgrade the C++ library to match
   **** or retry with ARROW_USE_PKG_CONFIG=false
   PKG_CFLAGS= 
   PKG_LIBS=-L/opt/homebrew/Cellar/apache-arrow/11.0.0_3/lib -larrow
   ```
   The log shows `PKG_CFLAGS` is empty.
   This causes that capabilities, such as dataset, parquet,  etc..., are FALSE.
   ```
   > arrow_info()
   Arrow package version: 11.0.0.3
   
   Capabilities:
                  
   dataset   FALSE
   substrait FALSE
   parquet   FALSE
   json      FALSE
   s3        FALSE
   gcs       FALSE
   utf8proc   TRUE
   re2        TRUE
   snappy     TRUE
   gzip       TRUE
   brotli     TRUE
   zstd       TRUE
   lz4        TRUE
   lz4_frame  TRUE
   lzo       FALSE
   bz2        TRUE
   jemalloc   TRUE
   mimalloc  FALSE
   
   Memory:
                     
   Allocator jemalloc
   Current    0 bytes
   Max        0 bytes
   
   Runtime:
                           
   SIMD Level          none
   Detected SIMD Level none
   
   Build:
                                       
   C++ Library Version           11.0.0
   C++ Compiler              AppleClang
   C++ Compiler Version 14.0.3.14030022
   ```
   
   This is caused by `$LIB_DIR` is empty at this line
   
https://github.com/apache/arrow/blob/5c73973a23deb68bef75be8acd743763307ac12f/r/configure#L255
   
   
   I found that the deletion of line at this pull request
   
https://github.com/apache/arrow/pull/14235/files#diff-089697faebdb7820ca629a2bb316b878cc0ba18a5bfb0b60996f8dbcd1fa11e7L234
   causes this problem.
   ```
   LIB_DIR=`echo $PKG_DIRS | sed -e 's/^-L//'`
   ```
   
   I have already checked that to recover this line resolves this problem.
   
   This is the log.
   
   ```
   install.packages("./arrow", repos=NULL, type="source")
   Installing package into ‘/opt/homebrew/lib/R/4.2/site-library’
   (as ‘lib’ is unspecified)
   * installing *source* package ‘arrow’ ...
   files ‘tools/cpp/src/arrow/Testing/Temporary/CTestCostData.txt’, 
‘tools/cpp/src/arrow/Testing/Temporary/LastTest.log’ are missing
   file ‘configure’ has the wrong MD5 checksum
   ** using staged installation
   *** Arrow C++ libraries found via pkg-config at 
/opt/homebrew/Cellar/apache-arrow/11.0.0_3/lib
   **** Warning: library version mismatch
   **** C++ is 11.0.0 but R is 11.0.0.3
   **** If installation fails, upgrade the C++ library to match
   **** or retry with ARROW_USE_PKG_CONFIG=false
   PKG_CFLAGS=  -DARROW_R_WITH_PARQUET -DARROW_R_WITH_DATASET 
-DARROW_R_WITH_JSON -DARROW_R_WITH_S3
   PKG_LIBS=-L/opt/homebrew/Cellar/apache-arrow/11.0.0_3/lib -larrow_dataset 
-lparquet -larrow 
   ** libs
   make: Nothing to be done for `all'.
   installing to 
/opt/homebrew/lib/R/4.2/site-library/00LOCK-arrow/00new/arrow/libs
   ** R
   ** inst
   ** byte-compile and prepare package for lazy loading
   ** help
   *** installing help indices
   ** building package indices
   ** testing if installed package can be loaded from temporary location
   ** checking absolute paths in shared objects and dynamic libraries
   ** testing if installed package can be loaded from final location
   ** testing if installed package keeps a record of temporary installation path
   * DONE (arrow)
   > library(arrow)
   Some features are not enabled in this build of Arrow. Run `arrow_info()` for 
more information.
   
   Attaching package: ‘arrow’
   
   The following object is masked from ‘package:utils’:
   
       timestamp
   
   > arrow_info()
   Arrow package version: 11.0.0.3
   
   Capabilities:
                  
   dataset    TRUE
   substrait FALSE
   parquet    TRUE
   json       TRUE
   s3         TRUE
   gcs       FALSE
   utf8proc   TRUE
   re2        TRUE
   snappy     TRUE
   gzip       TRUE
   brotli     TRUE
   zstd       TRUE
   lz4        TRUE
   lz4_frame  TRUE
   lzo       FALSE
   bz2        TRUE
   jemalloc   TRUE
   mimalloc  FALSE
   
   Memory:
                     
   Allocator jemalloc
   Current    0 bytes
   Max        0 bytes
   
   Runtime:
                           
   SIMD Level          none
   Detected SIMD Level none
   
   Build:
                                       
   C++ Library Version           11.0.0
   C++ Compiler              AppleClang
   C++ Compiler Version 14.0.3.14030022
   ```
   
   ### Component(s)
   R
   
   ### Component(s)
   
   R


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