Message-ID: <20241220120450.12523d0b@Tarkus>
Date: 2024-12-20T09:04:50Z
From: Ivan Krylov
Subject: [R-pkg-devel] long user + system time with CRAN special checks clang 19
In-Reply-To: <20241220113004.71a45027@Tarkus>
? Fri, 20 Dec 2024 11:30:04 +0300
Ivan Krylov via R-package-devel <r-package-devel at r-project.org> ?????:
> Unfortunately, it's still a puzzle why the function
> tesseract::TessBaseAPI::GetVariableAsString(char const*, std::string*)
> const fails to load from libtesseract.
That's because libtesseract.so is linked to a different C++ standard
library. Compare:
> undefined symbol:
> _ZNK9tesseract11TessBaseAPI19GetVariableAsStringEPKcPNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE
c++filt says it's:
tesseract::TessBaseAPI::GetVariableAsString(char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) const
The symbol actually exported by libtesseract.so is named differently:
$ nm -gDP /usr/lib/x86_64-linux-gnu/libtesseract.so.5 | grep GetVariableAsString
_ZNK9tesseract11TessBaseAPI19GetVariableAsStringEPKcPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE T a4f40 16
c++filt says:
tesseract::TessBaseAPI::GetVariableAsString(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*) const
What should a package do when it's compiled by clang++ with the libc++
headers and library, but all system dependencies had been compiled with
g++ and linked with libstdc++? How to check packages using the clang
compiler without compiling the rest of the system from source using
clang? How do other C++ packages solve this problem?
--
Best regards,
Ivan