Created attachment 643484 [details] emerge --info emerge libreoffice fails on my ~amd64 system with the following error: /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/app-office/libreoffice-6.4.4.2/work/libreoffice-6.4.4.2/workdir/CxxObject/filter/source/xsltdialog/xmlfilterjar.o: in function `XMLFilterJarHelper::addFile(com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&, com::sun::star::uno::Reference<com::sun::star::lang::XSingleServiceFactory> const&, rtl::OUString const&)': xmlfilterjar.cxx:(.text+0x2436): undefined reference to `non-virtual thunk to cppu::ImplInheritanceHelper<utl::OInputStreamWrapper, com::sun::star::io::XSeekable>::acquire()' /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/app-office/libreoffice-6.4.4.2/work/libreoffice-6.4.4.2/workdir/CxxObject/filter/source/xsltdialog/xmlfilterjar.o: in function `XMLFilterJarHelper::savePackage(rtl::OUString const&, std::vector<filter_info_impl*, std::allocator<filter_info_impl*> > const&)': xmlfilterjar.cxx:(.text+0x2fea): undefined reference to `non-virtual thunk to cppu::ImplInheritanceHelper<utl::OInputStreamWrapper, com::sun::star::io::XSeekable>::acquire()' The error and undefined reference are not referenced anywhere else on a Google search.
Created attachment 643486 [details] build.log
Hi, absolutely the same error here: /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/app-office/libreoffice-6.4.4.2/work/libreoffice-6.4.4.2/workdir/CxxObject/filter/source/xsltdialog/xmlfilterjar.o: in function `XMLFilterJarHelper::addFile(com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&, com::sun::star::uno::Reference<com::sun::star::lang::XSingleServiceFactory> const&, rtl::OUString const&)': xmlfilterjar.cxx:(.text+0x2436): undefined reference to `non-virtual thunk to cppu::ImplInheritanceHelper<utl::OInputStreamWrapper, com::sun::star::io::XSeekable>::acquire()' /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/app-office/libreoffice-6.4.4.2/work/libreoffice-6.4.4.2/workdir/CxxObject/filter/source/xsltdialog/xmlfilterjar.o: in function `XMLFilterJarHelper::savePackage(rtl::OUString const&, std::vector<filter_info_impl*, std::allocator<filter_info_impl*> > const&)': xmlfilterjar.cxx:(.text+0x2fea): undefined reference to `non-virtual thunk to cppu::ImplInheritanceHelper<utl::OInputStreamWrapper, com::sun::star::io::XSeekable>::acquire()'
I can confirm this, with the same log. This error is especially frustrating, as libreoffice takes hours to compile and this only occurs in the last linking step. Lots of wasted time and energy.
The same error in 6.4.5.2.
Any news on this?
I can confirm the same error in app-office/libreoffice-6.4.6.2, but can't really give more input or do more research as this is deeply rooted in a horrible C++-macro-hell.
The same error in 6.4.6.2-r1.
Same here with a custom -7 ebuild.
The same error with 6.4.7.2. Why churn out new versions if they are unusable anyway?
(In reply to he.ousia from comment #9) > The same error with 6.4.7.2. > Why churn out new versions if they are unusable anyway? I think a bit more respect (or just goodwill) should be given here. Do you really think that this version works for *nobody*? I'm not denying you are experiencing a bug, but it has obviously been tested. Can you please try with -O2?
(In reply to Sam James from comment #10) > (In reply to he.ousia from comment #9) > > The same error with 6.4.7.2. > > Why churn out new versions if they are unusable anyway? > > I think a bit more respect (or just goodwill) should be given here. Do you > really think that this version works for *nobody*? I'm not denying you are > experiencing a bug, but it has obviously been tested. > > Can you please try with -O2? I was on -Os and set -O2 in my make.conf (it was the only change, and it failed earlier in the exact configuration with the same dependencies) and now the compilation succeeded.
*** Bug 752981 has been marked as a duplicate of this bug. ***
Created attachment 669998 [details] build.log (gcc-10.2.0-r2 -O2) Builds fine for me with gcc -O2. So what I have found out so far is: gcc-10.2.0-r2 -Os, binutils-2.35.1-r1: FAILS gcc-10.2.0-r2 -O2, binutils-2.35.1-r1: BUILDS OK clang-10.0.1 -Os, lld-10.0.1: BUILDS OK
libreoffce-7.0.4.2 build failed for me on RPi4 (arm64) using gcc-10.2.0-r5/binutils-2.35.1-r1 with -Os. I think I've seen some ebuild's for other packages overriding my /etc/portage/make.conf -Os setting. Maybe libreoffice should "replace-flags -Os -O2"?
Zero_Chaos is hitting this too: [03:02:33] <Zero_Chaos> sam_: https://bugs.gentoo.org/727188 fails for me, gcc-10 but with binutils-2.34-r2, and I can't build with -Os or -O2 or -O3 or literally at all [03:03:27] <Zero_Chaos> sam_: I even rebuilt gcc with -O2 and -O3 to see if the flags I built gcc with mattered. they don't. Interesting that (I think) we only have one report of -O2 failing.
Same on 7.0.5.2
For me 7.1.3.2 fails with `-march=x86-64 -Os -pipe`, but succeeds with `-march=i686 -Os -pipe`
See https://gitlab.alpinelinux.org/alpine/aports/-/issues/12109#note_161369 on the Alpine bug tracker. They filed https://bugs.documentfoundation.org/show_bug.cgi?id=142442 after hitting ismilar errors at least. Alpine also applied their own patch in https://gitlab.alpinelinux.org/alpine/aports/-/commit/8fac12716006b0f8fdf1a01812f65310e33b7c6c.
Created attachment 733300 [details, diff] gcc-10 patch for app-office/libreoffice-7.1.3.2
Sam, thank you for the hint! I've combined both patches and the compilation was successful for `-march=x86-64 -Os -pipe`! I've attached the resulting patch.
Is this still a problem with current versions?
(In reply to Andreas K. Hüttel from comment #21) > Is this still a problem with current versions? libreoffice-7.2.5.2 still fails to build with -Os on amd64-musl. Did not try a build on glibc though as I use libreoffice-bin there.
Adding data point: 7.3.0.3 fails to build with gcc 11.2.1, -Os or -O2, for the same reason. I am not sure why TDF has closed the bug as RESOLVED NOTOURBUG, couldn't find further info.
Created attachment 765276 [details, diff] libreoffice 7.2.5.2 gcc10 patch Attaching a patch for 7.2.5.2
emerge libreoffice-7.3.4.2-r1 failed with same error. emerge --info: Portage 3.0.30 (python 3.10.5-final-0, default/linux/amd64/17.1/desktop/systemd, gcc-11.3.0, glibc-2.35-r8, 5.15.37-x86_64 x86_64) ================================================================= System Settings ================================================================= System uname: Linux-5.15.37-x86_64-x86_64-Intel-R-_Core-TM-_i5-8250U_CPU_@_1.60GHz-with-glibc2.35 KiB Mem: 16240264 total, 5066536 free KiB Swap: 524284 total, 524284 free Timestamp of repository gentoo: Mon, 08 Aug 2022 15:30:01 +0000 Head commit of repository gentoo: c0e3ab5a829f86e167d3f5d498e1382af8359816 sh bash 5.1_p16-r1 ld GNU ld (Gentoo 2.37_p1 p2) 2.37 app-misc/pax-utils: 1.3.4::gentoo app-shells/bash: 5.1_p16-r1::gentoo dev-lang/perl: 5.34.1-r3::gentoo dev-lang/python: 3.9.13::gentoo, 3.10.5::gentoo dev-lang/rust-bin: 1.62.1::gentoo dev-util/cmake: 3.22.4::gentoo dev-util/meson: 0.62.2::gentoo sys-apps/baselayout: 2.8::gentoo sys-apps/sandbox: 2.29::gentoo sys-apps/systemd: 251.2::gentoo sys-devel/autoconf: 2.13-r2::gentoo, 2.71-r1::gentoo sys-devel/automake: 1.16.5::gentoo sys-devel/binutils: 2.37_p1-r2::gentoo, 2.38-r2::gentoo sys-devel/binutils-config: 5.4.1::gentoo sys-devel/clang: 13.0.1::gentoo, 14.0.6-r1::gentoo sys-devel/gcc: 11.3.0::gentoo sys-devel/gcc-config: 2.5-r1::gentoo sys-devel/libtool: 2.4.7::gentoo sys-devel/lld: 14.0.6::gentoo sys-devel/llvm: 13.0.1::gentoo, 14.0.6-r2::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.15-r3::gentoo (virtual/os-headers) sys-libs/glibc: 2.35-r8::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-max-age: 24 sync-rsync-extra-opts: sync-rsync-verify-jobs: 1 sync-rsync-verify-metamanifest: no torbrowser location: /var/lib/layman/torbrowser masters: gentoo priority: 50 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-mtune=generic -Os -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-mtune=generic -Os -pipe" DISTDIR="/usr/portage/distfiles" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live candy config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync metadata-transfer multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="ru_RU.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="ru en" MAKEOPTS="-j9" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" SHELL="/bin/bash" USE="X a52 aac aalib acl acpi alsa amd64 amr ao audiofile avif bash-completion bluetooth bmff branding bzip2 cairo cdda cdr cli corefonts crypt cups dbus djvu dri dts dvd dvdr ebook encode eps epub exif ffmpeg flac gd gdbm gdk-pixbuf gif glamor gme gnutls gui hdri heif iconv icu idn imlib infinality ipv6 jbig jpeg jpeg2k jpegxl kerberos lcms ldap libglvnd libnotify libtirpc lz4 lzma lzo mac mad matroska mng mp3 mp4 mpeg mspub multilib musepack mwaw ncurses nls nptl ogg openal openexr opengl openmp opus pam pango pcre pdf png policykit ppds private-headers raw readline sdl seccomp sndfile speex spell split-usr ssl startup-notification svg systemd theora threads tiff truetype udev udisks unicode upower usb vaapi vcd vdpau vim-syntax visio vorbis vpx vulkan wavpack webp wmf woff2 wpd wps wxp-compat wxwidgets x264 x265 xattr xcb xcomposite xface xinerama xml xmp xpm xps xv xvid xvmc zlib zmf" ABI_X86="64 32" ADA_TARGET="gnat_2020" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx f16c fma3 pclmul popcnt sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="libinput metadata-transfer synaptics" KERNEL="linux" L10N="ru en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby27" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Created attachment 798939 [details] gzipped build.log for libreoffice-7.3.4.2-r1 emerge -pqv libreoffice: [ebuild U ] app-office/libreoffice-7.3.4.2-r1 [7.3.3.2-r3] USE="branding cups dbus ldap* mariadb vulkan* -accessibility (-base) -bluetooth -clang (-coinmp) -custom-cflags -debug -eds (-firebird) -googledrive -gstreamer -gtk -java -kde -odk -pdfimport -postgres -test" LIBREOFFICE_EXTENSIONS="-nlpsolver -scripting-beanshell -scripting-javascript -wiki-publisher" PYTHON_SINGLE_TARGET="python3_10 -python3_8 -python3_9 (-python3_11)"
Change -O1 to -O2 fix the problem. app-office/libreoffice-7.5.8.2-r2
still a problem with app-office/libreoffice-7.6.7.2 /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/app-office/libreoffice-7.6.7.2/work/libreoffice-7.6.7.2/workdir/CxxObject/writerfilter/source/rtftok/rtfdocumentimpl.o: in function `writerfilter::rtftok::RTFDocumentImpl::handleEmbeddedObject()': rtfdocumentimpl.cxx:(.text+0xb206): undefined reference to `non-virtual thunk to cppu::ImplInheritanceHelper<utl::OInputStreamWrapper, com::sun::star::io::XSeekable>::acquire()' collect2: error: ld returned 1 exit status changing -Os to -O2 worked around the issue pretty please with sugar on top, if this cannot be fixed properly, could we get some check in the ebuild for the "correct" flags at least? - it took me a while to find this (asi it failed with different file) and figure out :-/
(In reply to kavol from comment #28) > pretty please with sugar on top, if this cannot be fixed properly, could we > get some check in the ebuild for the "correct" flags at least? Yes, this would be nice to have.