On 28/09/2023, at 9:37 AM, Reed A. Cartwright <racartwright at gmail.com>
I was unable to reproduce the error on the rhub's clang17 docker image.
I notice that the linking command is slightly different between systems.
And this suggests that I need to find some way to get CRAN to pass
flag at the linking stage.
CRAN:
/usr/local/clang17/bin/clang++ -std=gnu++17 -shared
-L/usr/local/clang/lib64 -L/usr/local/clang17/lib
-L/usr/local/lib64 -o rbedrock.so actors.o bedrock_leveldb.o dummy.o
key_conv.o nbt.o random.o subchunk.o support.o -L./leveldb-mcpe/build
-pthread -lleveldb -lz
RHUB:
clang++-17 -stdlib=libc++ -std=gnu++14 -shared -L/opt/R/devel/lib/R/lib
-L/usr/local/lib -o rbedrock.so actors.o bedrock_leveldb.o dummy.o init.o
key_conv.o nbt.o random.o subchunk.o support.o -L./leveldb-mcpe/build
-pthread -lleveldb -lz -L/opt/R/devel/lib/R/lib -lR
On Wed, Sep 27, 2023 at 11:36?AM G?bor Cs?rdi <csardi.gabor at gmail.com>
wrote:
You might be able to reproduce it with the clang17 container here:
You can either run it directly or with the rhub2 package:
Gabor
On Wed, Sep 27, 2023 at 8:29?PM Reed A. Cartwright
<racartwright at gmail.com> wrote:
My package, RBedrock, is now throwing an error when compiled against
Clang17. The error log is here:
The important part is
"""
Error: package or namespace load failed for ?rbedrock? in
DLLpath = DLLpath, ...):
unable to load shared object
'/data/gannet/ripley/R/packages/tests-clang-trunk/rbedrock.Rcheck/00LOCK-rbedrock/00new/rbedrock/libs/rbedrock.so':
/data/gannet/ripley/R/packages/tests-clang-trunk/rbedrock.Rcheck/00LOCK-rbedrock/00new/rbedrock/libs/rbedrock.so:
undefined symbol: _ZNSt3__122__libcpp_verbose_abortEPKcz
Error: loading failed
"""
From what I can gather through googling, this error can be caused by
the C linker when one of the dependent libraries is a C++ library.
I cannot tell if this is an issue with my package (likely) or CRAN's
clang17 setup (less likely).
Background about the package: rbedrock is written in C but links
C++ library (Mojang's leveldb fork) via the library's C-API
use a dummy .cpp file in the source directory to trigger R into using
C++ linker. That does still seem to be happening according to the log.
Has anyone seen this before and know where I should start looking to
Thanks.
--
Reed A. Cartwright, PhD
Associate Professor of Genomics, Evolution, and Bioinformatics
School of Life Sciences and The Biodesign Institute
Arizona State University
==================
Address: The Biodesign Institute, PO Box 876401, Tempe, AZ 85287-6401
Packages: The Biodesign Institute, 1001 S. McAllister Ave, Tempe, AZ
85287-6401 USA
Office: Biodesign B-220C, 1-480-965-9949
Website:
[[alternative HTML version deleted]]