Repository navigation
Closed
Labels
Description
Describe the bug, including details regarding any error messages, version, and platform.
CentOS 7
devtoolset-8
snappy 1.1.10
arrow-12.0.1.1
R package arrow installtion options:
Sys.setenv(ARROW_USE_PKG_CONFIG=FALSE)
Sys.setenv("LIBARROW_BINARY" = FALSE)
Sys.setenv("LIBARROW_MINIMAL" = FALSE)
Sys.setenv("ARROW_R_DEV" = TRUE)
Sys.setenv(ARROW_WITH_SNAPPY =TRUE)
Sys.setenv(ARROW_PARQUET =TRUE)
Sys.setenv(ARROW_DATASET =TRUE)
install.packages("arrow")
It's O.K. to compile arrow 12.0.1.1 & the corresponding R package, but failed to load. It seems that the function _ZTIN5arrow17RecordBatchReaderE is undefined in arrow.so. Maybe an option flag is missed?
/opt/rh/devtoolset-8/root/usr/libexec/gcc/x86_64-redhat-linux/8/ld: warning: /usr/local/lib64/libsnappy.a(snappy-c.cc.o): unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010002
/opt/rh/devtoolset-8/root/usr/libexec/gcc/x86_64-redhat-linux/8/ld: warning: /usr/local/lib64/libsnappy.a(snappy-c.cc.o): unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010001
installing to /usr/lib64/R-4.1.2/lib64/R/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
libgcc_s.so.1 must be installed for pthread_cancel to work
sh: 行 1: 4744 已放弃 R_TESTS= '/usr/lib64/R-4.1.2/lib64/R/bin/R' --no-save --no-restore --no-echo 2>&1 < '/tmp/RtmpIW4NdM/file2e627f5fb63d'
Error: package or namespace load failed for ‘arrow’ in dyn.load(file, DLLpath = DLLpath, ...):
无法载入共享目标对象‘/usr/lib64/R-4.1.2/lib64/R/library/00LOCK-arrow/00new/arrow/libs/arrow.so’::
/usr/lib64/R-4.1.2/lib64/R/library/00LOCK-arrow/00new/arrow/libs/arrow.so: undefined symbol: _ZTIN5arrow17RecordBatchReaderE
错误: loading failed
停止执行
ERROR: loading failed
* removing ‘/usr/lib64/R-4.1.2/lib64/R/library/arrow’
The downloaded source packages are in
‘/tmp/RtmpI0IRQ3/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("arrow") :
installation of package ‘arrow’ had non-zero exit status
Arrow compiling flags:
-- ---------------------------------------------------------------------
-- Arrow version: 12.0.1
--
-- Build configuration summary:
-- Generator: Unix Makefiles
-- Build type: RELEASE
-- Source directory: /tmp/RtmpIW4NdM/R.INSTALL2e6228a0b9bc/arrow/tools/cpp
-- Install prefix: /tmp/RtmpIW4NdM/R.INSTALL2e6228a0b9bc/arrow/libarrow/arrow-12.0.1.1
--
-- Compile and link options:
--
-- ARROW_CXXFLAGS="" [default=""]
-- Compiler flags to append when compiling Arrow
-- ARROW_BUILD_STATIC=ON [default=ON]
-- Build static libraries
-- ARROW_BUILD_SHARED=OFF [default=ON]
-- Build shared libraries
-- ARROW_PACKAGE_KIND="" [default=""]
-- Arbitrary string that identifies the kind of package
-- (for informational purposes)
-- ARROW_GIT_ID="" [default=""]
-- The Arrow git commit id (if any)
-- ARROW_GIT_DESCRIPTION="" [default=""]
-- The Arrow git commit description (if any)
-- ARROW_NO_DEPRECATED_API=OFF [default=OFF]
-- Exclude deprecated APIs from build
-- ARROW_POSITION_INDEPENDENT_CODE=ON [default=ON]
-- Whether to create position-independent target
-- ARROW_USE_CCACHE=ON [default=ON]
-- Use ccache when compiling (if available)
-- ARROW_USE_SCCACHE=ON [default=ON]
-- Use sccache when compiling (if available),
-- takes precedence over ccache if a storage backend is configured
-- ARROW_USE_LD_GOLD=OFF [default=OFF]
-- Use ld.gold for linking on Linux (if available)
-- ARROW_USE_PRECOMPILED_HEADERS=OFF [default=OFF]
-- Use precompiled headers when compiling
-- ARROW_SIMD_LEVEL=SSE4_2 [default=NONE|SSE4_2|AVX2|AVX512|NEON|SVE|SVE128|SVE256|SVE512|DEFAULT]
-- Compile-time SIMD optimization level
-- ARROW_RUNTIME_SIMD_LEVEL=MAX [default=NONE|SSE4_2|AVX2|AVX512|MAX]
-- Max runtime SIMD optimization level
-- ARROW_ALTIVEC=ON [default=ON]
-- Build with Altivec if compiler has support
-- ARROW_RPATH_ORIGIN=OFF [default=OFF]
-- Build Arrow libraries with RATH set to $ORIGIN
-- ARROW_INSTALL_NAME_RPATH=ON [default=ON]
-- Build Arrow libraries with install_name set to @rpath
-- ARROW_GGDB_DEBUG=ON [default=ON]
-- Pass -ggdb flag to debug builds
-- ARROW_WITH_MUSL=OFF [default=OFF]
-- Whether the system libc is musl or not
--
-- Test and benchmark options:
--
-- ARROW_BUILD_EXAMPLES=OFF [default=OFF]
-- Build the Arrow examples
-- ARROW_BUILD_TESTS=OFF [default=OFF]
-- Build the Arrow googletest unit tests
-- ARROW_ENABLE_TIMING_TESTS=ON [default=ON]
-- Enable timing-sensitive tests
-- ARROW_BUILD_INTEGRATION=OFF [default=OFF]
-- Build the Arrow integration test executables
-- ARROW_BUILD_BENCHMARKS=OFF [default=OFF]
-- Build the Arrow micro benchmarks
-- ARROW_BUILD_BENCHMARKS_REFERENCE=OFF [default=OFF]
-- Build the Arrow micro reference benchmarks
-- ARROW_BUILD_OPENMP_BENCHMARKS=OFF [default=OFF]
-- Build the Arrow benchmarks that rely on OpenMP
-- ARROW_BUILD_DETAILED_BENCHMARKS=OFF [default=OFF]
-- Build benchmarks that do a longer exploration of performance
-- ARROW_TEST_LINKAGE=static [default=shared|static]
-- Linkage of Arrow libraries with unit tests executables.
-- ARROW_FUZZING=OFF [default=OFF]
-- Build Arrow Fuzzing executables
-- ARROW_LARGE_MEMORY_TESTS=OFF [default=OFF]
-- Enable unit tests which use large memory
--
-- Lint options:
--
-- ARROW_ONLY_LINT=OFF [default=OFF]
-- Only define the lint and check-format targets
-- ARROW_VERBOSE_LINT=OFF [default=OFF]
-- If off, 'quiet' flags will be passed to linting tools
-- ARROW_GENERATE_COVERAGE=OFF [default=OFF]
-- Build with C++ code coverage enabled
--
-- Checks options:
--
-- ARROW_TEST_MEMCHECK=OFF [default=OFF]
-- Run the test suite using valgrind --tool=memcheck
-- ARROW_USE_ASAN=OFF [default=OFF]
-- Enable Address Sanitizer checks
-- ARROW_USE_TSAN=OFF [default=OFF]
-- Enable Thread Sanitizer checks
-- ARROW_USE_UBSAN=OFF [default=OFF]
-- Enable Undefined Behavior sanitizer checks
--
-- Project component options:
--
-- ARROW_BUILD_UTILITIES=OFF [default=OFF]
-- Build Arrow commandline utilities
-- ARROW_COMPUTE=ON [default=OFF]
-- Build all Arrow Compute kernels
-- ARROW_CSV=ON [default=OFF]
-- Build the Arrow CSV Parser Module
-- ARROW_CUDA=OFF [default=OFF]
-- Build the Arrow CUDA extensions (requires CUDA toolkit)
-- ARROW_DATASET=TRUE [default=OFF]
-- Build the Arrow Dataset Modules
-- ARROW_FILESYSTEM=ON [default=OFF]
-- Build the Arrow Filesystem Layer
-- ARROW_FLIGHT=OFF [default=OFF]
-- Build the Arrow Flight RPC System (requires GRPC, Protocol Buffers)
-- ARROW_FLIGHT_SQL=OFF [default=OFF]
-- Build the Arrow Flight SQL extension
-- ARROW_GANDIVA=OFF [default=OFF]
-- Build the Gandiva libraries
-- ARROW_GCS=ON [default=OFF]
-- Build Arrow with GCS support (requires the GCloud SDK for C++)
-- ARROW_HDFS=OFF [default=OFF]
-- Build the Arrow HDFS bridge
-- ARROW_IPC=ON [default=ON]
-- Build the Arrow IPC extensions
-- ARROW_JEMALLOC=ON [default=ON]
-- Build the Arrow jemalloc-based allocator
-- ARROW_JSON=ON [default=OFF]
-- Build Arrow with JSON support (requires RapidJSON)
-- ARROW_MIMALLOC=ON [default=OFF]
-- Build the Arrow mimalloc-based allocator
-- ARROW_PARQUET=TRUE [default=OFF]
-- Build the Parquet libraries
-- ARROW_ORC=OFF [default=OFF]
-- Build the Arrow ORC adapter
-- ARROW_PYTHON=OFF [default=OFF]
-- Build some components needed by PyArrow.
-- (This is a deprecated option. Use CMake presets instead.)
-- ARROW_S3=ON [default=OFF]
-- Build Arrow with S3 support (requires the AWS SDK for C++)
-- ARROW_SKYHOOK=OFF [default=OFF]
-- Build the Skyhook libraries
-- ARROW_SUBSTRAIT=OFF [default=OFF]
-- Build the Arrow Substrait Consumer Module
-- ARROW_ACERO=ON [default=OFF]
-- Build the Arrow Acero Engine Module
-- ARROW_TENSORFLOW=OFF [default=OFF]
-- Build Arrow with TensorFlow support enabled
-- ARROW_TESTING=OFF [default=OFF]
-- Build the Arrow testing libraries
--
-- Thirdparty toolchain options:
--
-- ARROW_DEPENDENCY_SOURCE=AUTO [default=AUTO|BUNDLED|SYSTEM|CONDA|VCPKG|BREW]
-- Method to use for acquiring arrow's build dependencies
-- ARROW_VERBOSE_THIRDPARTY_BUILD=OFF [default=OFF]
-- Show output from ExternalProjects rather than just logging to files
-- ARROW_DEPENDENCY_USE_SHARED=ON [default=ON]
-- Link to shared libraries
-- ARROW_BOOST_USE_SHARED=OFF [default=ON]
-- Rely on Boost shared libraries where relevant
-- ARROW_BROTLI_USE_SHARED=ON [default=ON]
-- Rely on Brotli shared libraries where relevant
-- ARROW_BZ2_USE_SHARED=ON [default=ON]
-- Rely on Bz2 shared libraries where relevant
-- ARROW_GFLAGS_USE_SHARED=ON [default=ON]
-- Rely on GFlags shared libraries where relevant
-- ARROW_GRPC_USE_SHARED=ON [default=ON]
-- Rely on gRPC shared libraries where relevant
-- ARROW_JEMALLOC_USE_SHARED=OFF [default=ON]
-- Rely on jemalloc shared libraries where relevant
-- ARROW_LZ4_USE_SHARED=ON [default=ON]
-- Rely on lz4 shared libraries where relevant
-- ARROW_OPENSSL_USE_SHARED=ON [default=ON]
-- Rely on OpenSSL shared libraries where relevant
-- ARROW_PROTOBUF_USE_SHARED=ON [default=ON]
-- Rely on Protocol Buffers shared libraries where relevant
-- ARROW_SNAPPY_USE_SHARED=ON [default=ON]
-- Rely on snappy shared libraries where relevant
-- ARROW_THRIFT_USE_SHARED=ON [default=ON]
-- Rely on thrift shared libraries where relevant
-- ARROW_UTF8PROC_USE_SHARED=ON [default=ON]
-- Rely on utf8proc shared libraries where relevant
-- ARROW_ZSTD_USE_SHARED=ON [default=ON]
-- Rely on zstd shared libraries where relevant
-- ARROW_USE_GLOG=OFF [default=OFF]
-- Build libraries with glog support for pluggable logging
-- ARROW_WITH_BACKTRACE=ON [default=ON]
-- Build with backtrace support
-- ARROW_WITH_OPENTELEMETRY=OFF [default=OFF]
-- Build libraries with OpenTelemetry support for distributed tracing
-- ARROW_WITH_BROTLI=ON [default=OFF]
-- Build with Brotli compression
-- ARROW_WITH_BZ2=ON [default=OFF]
-- Build with BZ2 compression
-- ARROW_WITH_LZ4=ON [default=OFF]
-- Build with lz4 compression
-- ARROW_WITH_SNAPPY=TRUE [default=OFF]
-- Build with Snappy compression
-- ARROW_WITH_ZLIB=ON [default=OFF]
-- Build with zlib compression
-- ARROW_WITH_ZSTD=ON [default=OFF]
-- Build with zstd compression
-- ARROW_WITH_UCX=OFF [default=OFF]
-- Build with UCX transport for Arrow Flight
-- (only used if ARROW_FLIGHT is ON)
-- ARROW_WITH_UTF8PROC=ON [default=ON]
-- Build with support for Unicode properties using the utf8proc library
-- (only used if ARROW_COMPUTE is ON or ARROW_GANDIVA is ON)
-- ARROW_WITH_RE2=ON [default=ON]
-- Build with support for regular expressions using the re2 library
-- (only used if ARROW_COMPUTE or ARROW_GANDIVA is ON)
--
-- Parquet options:
--
-- PARQUET_MINIMAL_DEPENDENCY=OFF [default=OFF]
-- Depend only on Thirdparty headers to build libparquet.
-- Always OFF if building binaries
-- PARQUET_BUILD_EXECUTABLES=OFF [default=OFF]
-- Build the Parquet executable CLI tools. Requires static libraries to be built.
-- PARQUET_BUILD_EXAMPLES=OFF [default=OFF]
-- Build the Parquet examples. Requires static libraries to be built.
-- PARQUET_REQUIRE_ENCRYPTION=OFF [default=OFF]
-- Build support for encryption. Fail if OpenSSL is not found
--
-- Gandiva options:
--
-- ARROW_GANDIVA_STATIC_LIBSTDCPP=OFF [default=OFF]
-- Include -static-libstdc++ -static-libgcc when linking with
-- Gandiva static libraries
-- ARROW_GANDIVA_PC_CXX_FLAGS="" [default=""]
-- Compiler flags to append when pre-compiling Gandiva operations
--
-- Advanced developer options:
--
-- ARROW_EXTRA_ERROR_CONTEXT=OFF [default=OFF]
-- Compile with extra error context (line numbers, code)
-- ARROW_OPTIONAL_INSTALL=OFF [default=OFF]
-- If enabled install ONLY targets that have already been built. Please be
-- advised that if this is enabled 'install' will fail silently on components
-- that have not been built
-- ARROW_GDB_INSTALL_DIR="" [default=""]
-- Use a custom install directory for GDB plugin.
-- In general, you don't need to specify this because the default
-- (CMAKE_INSTALL_FULL_BINDIR on Windows, CMAKE_INSTALL_FULL_LIBDIR otherwise)
-- is reasonable.
-- Outputting build configuration summary to /tmp/RtmpPbo0XS/file2e99dfb0036/cmake_summary.json
-- Configuring done (3.4s)
-- Generating done (0.1s)
-- Build files have been written to: /tmp/RtmpPbo0XS/file2e99dfb0036
+ /usr/bin/cmake --build . --target install -- -j 4
Component(s)
R
Activity
[-]Fail to install R package arrow: arrow.so: undefined symbol: _ZTIN5arrow17RecordBatchReaderE[/-][+][R] Fail to install R package arrow: arrow.so: undefined symbol: _ZTIN5arrow17RecordBatchReaderE[/+]thisisnic commentedon Jul 24, 2023
Thanks for reporting this @icejean. I see you're building from source, and am wondering if something has gone wrong with the building of the Arrow C++ libraries; would you mind pasting the full install log, so we can check if there's anything we can see going on in there?
icejean commentedon Jul 24, 2023
Sure, here's the full installation log:
icejean commentedon Jul 24, 2023
Maybe some dependencies other than curl and openssl are missed?
kou commentedon Jul 25, 2023
I think that
PKG_LIBS = -L/usr/local/lib64 -lsnappyis the problem.Could you try removing it from
Makevars?icejean commentedon Jul 25, 2023
If remove the line, R seems can't find the snappy lib to test loading of the compiled lib: arrow.so: undefined symbol:
_ZN6snappy19MaxCompressedLengthEm:kou commentedon Jul 25, 2023
How about defining
EXTRA_CMAKE_FLAGS=-DSnappy_ROOT=/usr/localenvironment variable?icejean commentedon Jul 25, 2023
Not worked this way, same error that
_ZN6snappy19MaxCompressedLengthEmis undefined.It's strange that R can find libsnappy.a at compiling time and can't find it while trying to load the compiled lib arrow.
When add the following line to Makevars, it can find libsnappy.a, but rises an undefined symbol
_ZTIN5arrow17RecordBatchReaderEinstead:icejean commentedon Jul 26, 2023
If I install R package with binary arrow C++ library, compilation will suceed and the library can be loaded, but dataset and parquet are disabled, even though the env vars have been set:
I down load the rpm packages from
packages.groonga.org, and install these packages:
Is there anything that is missed?
kou commentedon Jul 26, 2023
Could you show full install log with
EXTRA_CMAKE_FLAGS=-DSnappy_ROOT=/usr/localand withoutPKG_LIBS = -L/usr/local/lib64 -lsnappy?kou commentedon Jul 26, 2023
You should use RPM packages at https://apache.jfrog.io/artifactory/arrow not packages.groonga.org.
See also: https://arrow.apache.org/install/
packages.groonga.org just mirrors them. https://apache.jfrog.io/artifactory/arrow is the upstream.
You should always provide full install log.
icejean commentedon Jul 26, 2023
I'll reinstall the binaries from https://apache.jfrog.io/ui/native/arrow/centos/7/x86_64/Packages/ and have a try again.
icejean commentedon Jul 26, 2023
Here's the R package source+arrow C++ binary installation logs,
? 1. Sys.setenv(ARROW_PARQUET ="ON") or Sys.setenv(ARROW_PARQUET =TRUE)?
? 2. snappy version? I compile & install the latest snappy verison 1.1.10 at /usr/local/lib64 and make a link to /usr/lib64 of libsnappy.a .
? 3. Makevars
? 4. PKG_LIBS, I can see that the PKG_LIBS env in compiling logs is
BUT NOT
Is it means that the compiler couldn't find -larrow_acero -larrow_dataset -lparquet?
And the package path reported is NULL, is it correct? dataset & parquet is FALSE, SNAPPY is TRUE, it's the wrong result.
assignUser commentedon Jul 26, 2023
We have pre-built c++ binaries that should have all these features enabled, if you remove
Sys.setenv("LIBARROW_BINARY" = FALSE)or set it to true it should download them automatically and only build the R related c++.icejean commentedon Jul 27, 2023
I don't know why dataset and parquet features are FALSE, when I install the binaries, it's said that they are relied on acero,
and acero is FALSE too, is there anytong missed?
I've read through the installation guide allready.
acero FALSE
dataset FALSE
substrait FALSE
parquet FALSE
json FALSE
s3 FALSE
gcs FALSE
assignUser commentedon Jul 27, 2023
Is it possible that you do not have
openssl-develinstalled? IIRC this is necessary for a number of features.I just tested installing with the precomiled binary on centos7 and that results in this:
export LIBARROW_BINARY=TRUEinstall.packages('arrow')assignUser commentedon Jul 27, 2023
Alternatively you could install from PPM, that binary also has most features enabled:
icejean commentedon Jul 27, 2023
Seems to have 2 versions of openssl, does it matter?
assignUser commentedon Jul 27, 2023
hm that might confuse the script we use to determine the correct binary, we compile a test program and based on error messages/output we decide... I don't really now how this would affect it though... (relevant code here) could you try to install as I showed above but also set
ARROW_R_DEV=TRUEthat way we can see that output from that code at the beginning of the install!assignUser commentedon Jul 27, 2023
(or you couldk ofc remove one version of openssl if that does not interfere with other things)
icejean commentedon Jul 27, 2023
It's on my previous post allready, same output.
PKG_LIBS, I can see that the PKG_LIBS env in compiling logs is
*** Arrow C++ libraries found via pkg-config at
PKG_CFLAGS=-D_GLIBCXX_USE_CXX11_ABI=0
PKG_LIBS= -larrow
BUT NOT
PKG_LIBS=-L/usr/lib64 -larrow_acero -larrow_dataset -lparquet -larrow
Is it means that the compiler couldn't find -larrow_acero -larrow_dataset -lparquet?
And the package path reported is NULL, is it correct?
assignUser commentedon Jul 27, 2023
This means that you have a system binary of arrow installed on your system that has these features disabled and that gets used via PKG config in building the R package.
You can either uninstall this (outdated?) Version of arrow or replace it with a version that has the necessary features enabled or disable the use of the system lib(I'll have to check how in detail)
icejean commentedon Jul 27, 2023
I download binariy packages from https://apache.jfrog.io/ui/native/arrow/centos/7/x86_64/Packages/, it's said that they're compiled to enable all features?
Maybe it's the problem of multi-versions of some package such as openssl, or the problem of pkg-config?
BTW, when installing arrow C++ library from source, I get the message that snappy need to be 1.1.8+, for arrow-12.0.1 so I compile snappy 1.1.10 and the master branch both, is it relative to the version of snappy?
The installation on Windows is quite simple, and it works, I just don't know why it doesn't work on my CentOS 7 server.
kou commentedon Jul 28, 2023
This is the problem. It should be
... pkg-config at /usr/lib64.This must be fixed by #35147 and #36435. So 13.0.0 will work.
icejean commentedon Jul 28, 2023
I modify the configure script and hard code FOUND_LIB_DIR="/usr/lib64" to install arrow at the current time, and it works.
kou commentedon Jul 28, 2023
OK. I close this.