Summary: | app-office/libreoffice-7.3.4.2 fails to build because "libclucene has contribs-lib missing" | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | dawgg <pete_dawgg> |
Component: | Current packages | Assignee: | Gentoo Office Team <office> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | pete_dawgg, voron1 |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=760549 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 869170 | ||
Bug Blocks: | |||
Attachments: |
build.log
config.log |
Description
dawgg
2022-06-21 11:03:23 UTC
Please attach the log files to this bug report. Created attachment 787325 [details]
build.log
build.log
Created attachment 787328 [details]
config.log
config.log
This bug shows onlu when you have libclucene compiled by GCC,
I've recompiled it using Clang and have more errors from dependency hell of libraries which must be recompiled by llvm.
Right now have inside /etc/portage/package.env for Clang:
dev-cpp/clucene compiler-clang-lto
dev-util/cppunit compiler-clang-lto
app-crypt/gpgme compiler-clang-lto
app-text/hunspell compiler-clang-lto
Also pdfimprt flag gives error but have just disabled it for now.
In that case I have stopped on errors:
[MOD] uui
S=/var/tmp/portage/app-office/libreoffice-7.3.4.2/work/libreoffice-7.3.4.2 && I=$S/instdir && W=$S/workdir && mkdir -p $W/Module/ && touch $W/Module/uui
ld.lld: error: undefined symbol: Numbertext::string2wstring(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
>>> referenced by numbertext.cxx
>>> /var/tmp/portage/app-office/libreoffice-7.3.4.2/work/libreoffice-7.3.4.2/workdir/CxxObject/lingucomponent/source/numbertext/numbertext.o:((anonymous namespace)::NumberText_Impl::getNumberText(rtl::OUString const&, com::sun::star::lang::Locale const&))
You should not need to recursively recompile with Clang as its output should be ABI compatible with GCC. You probably dangerously have default-libcxx on or similar. (In reply to Sam James from comment #5) > You should not need to recursively recompile with Clang as its output should > be ABI compatible with GCC. You probably dangerously have default-libcxx on > or similar. Indeed. What you suggest? Turn this flags (default-compiler-rt default-libcxx default-lld llvm-libunwind) off? sys-devel/clang-14.0.6:14::gentoo USE="default-compiler-rt default-libcxx default-lld llvm-libunwind (pie) static-analyzer xml -debug -doc -test -verify-sig" Wanted to have independly from gcc compilation environment but it gives some troubles with re2(chromium and qtwebengine sharing lib) and samba(libunwind issue) package too. Right now have working: #app-office/libreoffice compiler-clang-lto #dev-qt/qtwebengine compiler-clang-lto www-client/chromium compiler-clang-lto www-client/firefox compiler-clang-lto mail-client/thunderbird compiler-clang-lto sys-devel/llvm compiler-clang-lto sys-devel/lld compiler-clang-lto dev-util/lldb compiler-clang-lto sys-devel/clang compiler-clang-lto sys-libs/libcxx compiler-clang-lto sys-libs/libcxxabi compiler-clang-lto sys-libs/llvm-libunwind compiler-clang-lto sys-libs/compiler-rt compiler-clang-lto sys-libs/compiler-rt-sanitizers compiler-clang-lto dev-lang/rust compiler-clang-lto app-doc/doxygen compiler-clang-lto sys-libs/libomp compiler-clang-lto dev-libs/libclc compiler-clang-lto dev-libs/re2 compiler-clang-lto dev-ml/re compiler-clang-lto media-libs/mesa compiler-clang-lto dev-lang/ispc compiler-clang-lto sys-devel/llvm-roc compiler-clang-lto dev-libs/rocclr compiler-clang-lto sci-libs/rocFFT compiler-clang-lto sci-libs/rocBLAS compiler-clang-lto sci-libs/rocPRIM compiler-clang-lto sci-libs/rocRAND compiler-clang-lto dev-util/rocm-smi compiler-clang-lto dev-util/rocminfo compiler-clang-lto dev-util/roctracer compiler-clang-lto dev-libs/rocm-comgr compiler-clang-lto dev-util/rocm-cmake compiler-clang-lto dev-libs/rocr-runtime compiler-clang-lto dev-libs/rocm-hostcall compiler-clang-lto dev-util/rocm-clang-ocl compiler-clang-lto dev-libs/rocm-device-libs compiler-clang-lto dev-libs/rocm-opencl-runtime compiler-clang-lto with USE="-clang" it compiled cleanly today. (In reply to xdev52 from comment #6) > (In reply to Sam James from comment #5) > > You should not need to recursively recompile with Clang as its output should > > be ABI compatible with GCC. You probably dangerously have default-libcxx on > > or similar. > > Indeed. What you suggest? Turn this flags (default-compiler-rt > default-libcxx default-lld llvm-libunwind) off? > default-libcxx is the only dangerous one there. > sys-devel/clang-14.0.6:14::gentoo USE="default-compiler-rt default-libcxx > default-lld llvm-libunwind (pie) static-analyzer xml -debug -doc -test > -verify-sig" > > Wanted to have independly from gcc compilation environment but it gives some > troubles with re2(chromium and qtwebengine sharing lib) and samba(libunwind > issue) package too. > If you want to go full blown libcxx, you'd need to build your entire system with it, and the transition is dangerous. So, this bug only exists when using Clang flag set on during libreoffice compilation and system has @world set flags mostly for Clang but coexisting with GCC: default-libcxx (these below are recursively must be also set on for default-libcxx @world) default-compiler-rt llvm-libunwind libunwind then all of it muse be disabled and compilation should be ok? I need to check it first but just set -clang gives proper compilation for libreoffice It's not a bug but configure gives not proper error explanation. It' not contribs-lib missing but dev-cpp/clucene is compiled using GCC and Clang has active default-libcxx. recompiled clang with "-default-libcxx" and rest of packages and libreoffice with "clang" flag compiled well. So this "bug" only appears when for Clang is set flag on "default-libcxx". (In reply to xdev52 from comment #10) > recompiled clang with "-default-libcxx" and rest of packages and libreoffice > with "clang" flag compiled well. > > So this "bug" only appears when for Clang is set flag on "default-libcxx". Your assumptions are incorrect this bug happens even when -clang is set. (In reply to Jory A. Pratt from comment #11) > (In reply to xdev52 from comment #10) > > recompiled clang with "-default-libcxx" and rest of packages and libreoffice > > with "clang" flag compiled well. > > > > So this "bug" only appears when for Clang is set flag on "default-libcxx". > > Your assumptions are incorrect this bug happens even when -clang is set. The error is kind of generic. Are you getting the same ld.lld: error: undefined symbol spew...? It can be avoided by several ways: - By building clucene with a patch that removes the use of binary_function - By adding -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES to CXXFLAGS and using custom-cflags use-flag while building libreoffice (and clucene) - By building both with GCC. I added -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES to clucene because it wouldn't compile otherwise. I now have to add that to libreoffice as well to get past the configure issue about contribs-lib missing? Just making sure I understand correctly because I don't think that adding -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES to libreoffice would get past the configure check. When ./configure reports a missing library, it's almost always because something is actually missing. (In reply to Alec Ari from comment #14) > I added -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES to clucene because it > wouldn't compile otherwise. > > I now have to add that to libreoffice as well to get past the configure > issue about contribs-lib missing? Just making sure I understand correctly > because I don't think that adding -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES to > libreoffice would get past the configure check. When ./configure reports a > missing library, it's almost always because something is actually missing. It's not really missing here, it just tries to build a test program against it and fails, so concludes it must be missing (or otherwise broken). In any case, the issue is clear, we need to patch clucene. The only reason I haven't Just Done It yet is that these deprecated (removed) functions are in their *public* headers, which means patching them out is probably going to break ABI. (In reply to Sam James from comment #15) > (In reply to Alec Ari from comment #14) > > I added -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES to clucene because it > > wouldn't compile otherwise. > > > > I now have to add that to libreoffice as well to get past the configure > > issue about contribs-lib missing? Just making sure I understand correctly > > because I don't think that adding -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES to > > libreoffice would get past the configure check. When ./configure reports a > > missing library, it's almost always because something is actually missing. > > It's not really missing here, it just tries to build a test program against > it and fails, so concludes it must be missing (or otherwise broken). > > In any case, the issue is clear, we need to patch clucene. The only reason I > haven't Just Done It yet is that these deprecated (removed) functions are in > their *public* headers, which means patching them out is probably going to > break ABI. Sam! Thank you! -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES added to libreoffice fixes this issue (mitigates for the time being, heh good enough for me) no problem! I really do hope to get it sorted soon, it's just a thorny one because it's worse than normal. Thanks! The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ba9c12d6ed1d6054c055bea8480e2d0132ae8eb commit 1ba9c12d6ed1d6054c055bea8480e2d0132ae8eb Author: LinuxUserGD <hugegameartgd@gmail.com> AuthorDate: 2023-04-10 22:01:01 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-06-28 21:13:55 +0000 dev-cpp/clucene: fix removed std::binary_function in c++17 Closes: https://bugs.gentoo.org/853298 Closes: https://bugs.gentoo.org/869170 Signed-off-by: LinuxUserGD <hugegameartgd@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/30547 Signed-off-by: Sam James <sam@gentoo.org> ...2.3.3.4-r8.ebuild => clucene-2.3.3.4-r9.ebuild} | 1 + .../clucene-2.3.3.4-fix-binary-function.patch | 199 +++++++++++++++++++++ 2 files changed, 200 insertions(+) |