barracuda156 commented on issue #38769:
URL: https://github.com/apache/arrow/issues/38769#issuecomment-1817426316

   @assignUser So yes, what was effectively breaking it is a version mismatch 
which triggered an attempt to download pre-built `arrow`, apparently, and that 
could not end well :)
   Despite that failed, the build somehow managed to proceed, but with all 
flags wiped out, so nothing went to Makevars and eventually to the linker. With 
ldflags missing, `libarrow` were simply not found.
   
   So you were right.
   
   Commenting out a chunk of code which prohibits using mismatched versions 
fixes everything: `pkg-config` passes flags, those go to the linker:
   ```
   *** Trying Arrow C++ found by pkg-config: /opt/local
   PKG_CFLAGS=-D_GLIBCXX_USE_CXX11_ABI=0   -DARROW_R_WITH_PARQUET 
-DARROW_R_WITH_DATASET -DARROW_R_WITH_ACERO -DARROW_R_WITH_SUBSTRAIT 
-DARROW_R_WITH_JSON -DARROW_R_WITH_GCS
   PKG_LIBS=-L/opt/local/lib -larrow_substrait -larrow_dataset -larrow_acero 
-lparquet -larrow  
   ** libs
   using C++ compiler: ‘g++-mp-13 (MacPorts gcc13 13.2.0_4+stdlib_flag) 13.2.0’
   using C++17
   ```
   Package installs normally:
   ```
   /opt/local/bin/g++-mp-13 -std=gnu++17 -dynamiclib 
-Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module 
-multiply_defined suppress 
-L/opt/local/Library/Frameworks/R.framework/Resources/lib 
-Wl,-headerpad_max_install_names -Wl,-rpath,/opt/local/lib/libgcc 
-L/opt/local/lib -lMacportsLegacySupport -arch ppc -o arrow.so RTasks.o 
altrep.o array.o array_to_vector.o arraydata.o arrowExports.o bridge.o buffer.o 
chunkedarray.o compression.o compute-exec.o compute.o config.o csv.o dataset.o 
datatype.o expression.o extension-impl.o feather.o field.o filesystem.o io.o 
json.o memorypool.o message.o parquet.o r_to_arrow.o recordbatch.o 
recordbatchreader.o recordbatchwriter.o safe-call-into-r-impl.o scalar.o 
schema.o symbols.o table.o threadpool.o type_infer.o -L/opt/local/lib 
-larrow_substrait -larrow_dataset -larrow_acero -lparquet -larrow 
-F/opt/local/Library/Frameworks/R.framework/.. -framework R -Wl,-framework 
-Wl,CoreFoundation
   installing to 
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-arrow/R-arrow/work/destroot/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/00LOCK-arrow/00new/arrow/libs
   ** R
   ** inst
   ** tests
   ** 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)
   ```
   
   P. S. Not really sure why this change was made; in 13.0.0 version mismatch 
triggered a warning (totally justified behavior), but did not break anything. 
Perhaps it makes sense at least to display some meaningful error, since 
otherwise it may not be obvious what fails, especially when it worked earlier.
   It would also be helpful to have a readable error re unsupported archs: I do 
not expect `arrow` to provide pre-built libs for macOS PowerPC, of course, or, 
say, Irix, but the process fails with something unintelligible:
   ```
   shasum: tools/checksums/darwin-power: No such file or directory
   *** Checksum validation failed for libarrow binary:
   ```
   If there are no pre-built binaries for a combo of OS and arch, perhaps let 
the configure script instruct to build `libarrow` manually?


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