Repository navigation
Closed
Description
Hi,
I encountered "undefined symbol: _ZTIN3Aws4Auth22AWSCredentialsProviderE
Error: loading failed
Execution halted
ERROR: loading failed" errors when trying to install arrow under R 4.1.3 with devtoolset-8 (gcc version 8.3.1).
> Sys.getenv("LD_LIBRARY_PATH")
[1] "/usr/local/lib64:/usr/local/lib64/cmake:/lib64:/opt/rh/devtoolset-8/root/usr/lib64:/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8:/opt/rh/devtoolset-8/root/usr/libexec/gcc/x86_64-redhat-linux/8:/opt/R/4.1.3/lib/R/lib:/usr/local/lib:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64/jre/lib/amd64/server"
> Sys.getenv("PATH")
[1] "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/apps/Python/3.9.12/bin:/usr/local/cmake-3.21.4-linux-x86_64/bin:/opt/rh/devtoolset-8/root/usr/bin:/apps/bin:/usr/local/bin:/bin:/usr/bin"
> Sys.setenv("NOT_CRAN"=TRUE)
> Sys.setenv("LIBARROW_BINARY" = FALSE)
> Sys.setenv("ARROW_R_DEV" = TRUE)
> Sys.setenv("ARROW_USE_PKG_CONFIG" = FALSE)
> Sys.setenv(ARROW_S3 = "ON")
> Sys.setenv(CMAKE = "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/apps/cmake-3.21.4-linux-x86_64/bin/cmake")
> sessionInfo()
R version 4.1.3 (2022-03-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux Server 7.9 (Maipo)
Matrix products: default
BLAS/LAPACK: /usr/lib64/libopenblasp-r0.3.3.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.1.3
> arrow::arrow_available()
Error in loadNamespace(x) : there is no package called ‘arrow’
> system("gcc -v")
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-8/root/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/opt/rh/devtoolset-8/root/usr --mandir=/opt/rh/devtoolset-8/root/usr/share/man --infodir=/opt/rh/devtoolset-8/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --with-default-libstdcxx-abi=gcc4-compatible --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-8.3.1-20190311/obj-x86_64-redhat-linux/isl-install --disable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 8.3.1 20190311 (Red Hat 8.3.1-3) (GCC)
> install.packages(mpkg, repos=NULL, type="source")
......
......
** building package indices
** installing vignettes
** 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 '/home/user1/R/x86_64-pc-linux-gnu/4.1.3/00LOCK-arrow/00new/arrow/libs/arrow.so':
/home/user1/R/x86_64-pc-linux-gnu/4.1.3/00LOCK-arrow/00new/arrow/libs/arrow.so: undefined symbol: _ZTIN3Aws4Auth22AWSCredentialsProviderE
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/user1/R/x86_64-pc-linux-gnu/4.1.3/arrow’
Warning message:
In install.packages(mpkg, repos = NULL, type = "source") :
installation of package ‘/apps/tmp/RtmpEqJN3J/downloaded_packages/arrow_8.0.0.tar.gz’ had non-zero exit status
Reporter: Wayne Tu
Assignee: Nicola Crane / @thisisnic
PRs and other links:
Note: This issue was originally created as ARROW-17692. Please see the migration documentation for further details.
Activity
asfimport commentedon Sep 13, 2022
Nicola Crane / @thisisnic:
Thanks for reporting this
[~wtacct77]. A couple of questions; is there are longer installation log that you can provide? It'll give us a little more context to see exactly what has gone wrong as the last message isn't always the most relevant one for diagnosing the issue.That said, the last message there refers to something to do with AWS. Looking at the dependencies list in the installation guide, it looks like you have a sufficient version of gcc, but would you mind you confirming the versions of CURL and OpenSSL that you have installed, so I can rule out a dependency mismatch?
asfimport commentedon Sep 13, 2022
Wayne Tu:
Thank you so much Nicola for taking a look at my post. I ran an installation of arrow version 9.0.0 but got the same undefined symbol error. We want to enable S3. Both CURL and OpenSSL seem to meet the requirements of dependencies. please refer to the following for full build log:
asfimport commentedon Sep 14, 2022
Kouhei Sutou / @kou:
It seems that this build uses the system AWS SDK C++ not bundled AWS SDK C++.
I think that we need to add AWS SDK C++ related link flags for this case in https://github.com/apache/arrow/blob/master/r/configure#L259 .
@thisisnic Could you try this with system AWS SDK C++?
asfimport commentedon Sep 14, 2022
Nicola Crane / @thisisnic:
@kou Sorry, I'm not totally sure what you mean, can you expand on "try this with system AWS SDK C++" - try what?
asfimport commentedon Sep 14, 2022
Kouhei Sutou / @kou:
[~wtacct77]How did you install AWS SDK C++?)asfimport commentedon Sep 15, 2022
Wayne Tu:
This was how I built AWS SDK C++ from source:
git clone --recurse-submodules https://github.com/aws/aws-sdk-cpp
mkdir mybuild
cd mybuild
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=/usr/local/aws-sdk-cpp-1.9.341
make
make install
asfimport commentedon Sep 19, 2022
Nicola Crane / @thisisnic:
Having issues trying this locally as I keep running out of disk space. Is it worth me trying with just the
aws-cpp-sdk-s3directory, or is it likely to have other dependencies here?asfimport commentedon Sep 19, 2022
Wayne Tu:
According to my experience, it's required ~14GB (or ~14003000KB) space for the aws-sdk-cpp build. The directory size continuously grew when running the build until the above size was reached.
asfimport commentedon Sep 20, 2022
Neal Richardson / @nealrichardson:
You don't need all of aws-sdk-cpp but it is complicated to enumerate all of the things you do need. We have that sorted out in arrow's cmake in the bundled build, is there a reason you need to build it separately?
asfimport commentedon Sep 20, 2022
Kouhei Sutou / @kou:
It seems that this problem is occurred when we use system AWS SDK C\. So we can't use bundled AWS SDK C\ to reproduce this problem.
asfimport commentedon Sep 22, 2022
Nicola Crane / @thisisnic:
Managed to clear up some space and replicate the problem locally. Just trying to work out how to:
"2. Add missing AWS SDK C++ related libraries to https://github.com/apache/arrow/blob/master/r/configure#L259 to resolve the link error: "undefined symbol: _ZTIN3Aws4Auth22AWSCredentialsProviderE""
I'm not sure what the new
-lflag should be or how I even find out that information.asfimport commentedon Sep 22, 2022
Kouhei Sutou / @kou:
Could you show AWS SDK C\'s
lib*list on your environment?You can find then under
$AWS_SDK_CPP_PREFIX/lib/whereAWS_SDK_CPP_PREFIXis the value you specified to-DCMAKE_INSTALL_PREFIXwhen you built AWS SDK C\. If you didn't specify-DCMAKE_INSTALL_PREFIX,AWS_SDK_CPP_PREFIXis/usr/local.asfimport commentedon Sep 22, 2022
Nicola Crane / @thisisnic:
Thanks @kou - here it is:
asfimport commentedon Sep 23, 2022
Kouhei Sutou / @kou:
Oh, many libraries...
Could you try
-laws-cpp-sdk-identity-management -laws-cpp-sdk-sts -laws-cpp-sdk-cognito-identity -laws-cpp-sdk-s3 -laws-cpp-sdk-core -laws-c-event-stream -laws-checksums -laws-c-common?It's based on https://github.com/apache/arrow/blob/master/cpp/cmake_modules/ThirdpartyToolchain.cmake#L4629-L4636 .
asfimport commentedon Sep 26, 2022
Nicola Crane / @thisisnic:
Cheers @kou! That worked, so I'll submit a PR with that change.
[~wtacct77]This should be updated by the next Arrow release, but in the short term as a workaround, you could edit the fileconfigurein the Arrow R package archive you're using on this line https://github.com/apache/arrow/blob/master/r/configure#L259 to have the additional flags that Kou has mentioned there.asfimport commentedon Sep 27, 2022
Wayne Tu:
Thank you Nicola and Kouhei so much! I will add the additional flags and try again to build Arrow R package with S3 enabled.
asfimport commentedon Dec 17, 2022
Kouhei Sutou / @kou:
Issue resolved by pull request 14235
#14235
petacube commentedon Feb 7, 2024
still unresolved. arrow.so undefined symbol __libc_single_threaded
R 4.2.2
gcc 13.2.0.5
Redhat Enterprise 7.9
running simple install.packages("arrow")
using conda install works however - conda install r-arrow -c conda-forge