barracuda156 opened a new issue, #35045:
URL: https://github.com/apache/arrow/issues/35045
### Describe the bug, including details regarding any error messages,
version, and platform.
I am fixing `R` packages for Macports, and while I have apparently fixed
`arrow` itself across macOS versions, I got a problem with `R-arrow`. Does
anyone know where this rpath sneaks in from?
```
/opt/local/bin/g++-mp-12 -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
-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/arrow/arrow.Rcheck/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
Error: package or namespace load failed for ‘arrow’ in dyn.load(file,
DLLpath = DLLpath, ...):
unable to load shared object
'/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-arrow/R-arrow/work/arrow/arrow.Rcheck/00LOCK-arrow/00new/arrow/libs/arrow.so':
dlopen(/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-arrow/R-arrow/work/arrow/arrow.Rcheck/00LOCK-arrow/00new/arrow/libs/arrow.so,
6): Library not loaded: @rpath/libarrow.1100.dylib
Referenced from:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-arrow/R-arrow/work/arrow/arrow.Rcheck/00LOCK-arrow/00new/arrow/libs/arrow.so
Reason: image not found
Error: loading failed
```
It is not hard to fix this for install (using libtool and fixing paths
manually), however I do not immediately see how to fix it inside running tests,
but it is desirable to have tests working.
The lib indeed gets this:
```
svacchanda$ otool -L
/Users/svacchanda/Desktop/arrow/arrow.Rcheck/00_pkg_src/arrow/src/arrow.so
/Users/svacchanda/Desktop/arrow/arrow.Rcheck/00_pkg_src/arrow/src/arrow.so:
arrow.so (compatibility version 0.0.0, current version 0.0.0)
/opt/local/lib/libMacportsLegacySupport.dylib (compatibility version
1.0.0, current version 1.0.99)
@rpath/libarrow.1100.dylib (compatibility version 1100.0.0, current
version 1100.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
(compatibility version 150.0.0, current version 511.1.0)
/opt/local/lib/libgcc/libstdc++.6.dylib (compatibility version
7.0.0, current version 7.30.0)
/opt/local/Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libR.dylib
(compatibility version 4.2.0, current version 4.2.3)
/opt/local/lib/libgcc/libgcc_s.1.1.dylib (compatibility version
1.0.0, current version 1.1.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 117.0.0)
```
What I need is to change this to absolute path, like for other dylibs. But
during compilation: since a single command builds the package and runs tests
for it, I cannot squeeze in patching via libtool.
### 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]