Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 916435 - app-office/libreoffice-7.5.6.2[vulkan] fails to compile (lto): UnpackedTarball/skia/src/core/SkFontStream.cpp:13:8: error: type ‘struct SkSFNTHeader’ violates the C++ One Definition Rule [-Werror=odr]
Summary: app-office/libreoffice-7.5.6.2[vulkan] fails to compile (lto): UnpackedTarbal...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Office Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2023-10-28 16:47 UTC by Kostadin Shishmanov
Modified: 2023-10-28 19:04 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build log compressed with xz (build.log.xz,187.52 KB, application/x-xz)
2023-10-28 16:47 UTC, Kostadin Shishmanov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kostadin Shishmanov 2023-10-28 16:47:32 UTC
Created attachment 873602 [details]
build log compressed with xz

app-office/libreoffice-7.5.6.2 fails to compile with LTO and ODR violations turned into warnings with -Werror=odr

/var/tmp/portage/app-office/libreoffice-7.5.6.2/work/libreoffice-7.5.6.2/workdir/UnpackedTarball/skia/src/core/SkFontStream.cpp:13:8: error: type ‘struct SkSFNTHeader’ violates the C++ One Definition Rule [-Werror=odr]
   13 | struct SkSFNTHeader {
      |        ^
/var/tmp/portage/app-office/libreoffice-7.5.6.2/work/libreoffice-7.5.6.2/workdir/UnpackedTarball/skia/src/sfnt/SkSFNTHeader.h:20:8: note: a different type is defined in another translation unit
   20 | struct SkSFNTHeader {
      |        ^
/var/tmp/portage/app-office/libreoffice-7.5.6.2/work/libreoffice-7.5.6.2/workdir/UnpackedTarball/skia/src/core/SkFontStream.cpp:14:17: note: the first difference of corresponding definitions is field ‘fVersion’
   14 |     uint32_t    fVersion;
      |                 ^
/var/tmp/portage/app-office/libreoffice-7.5.6.2/work/libreoffice-7.5.6.2/workdir/UnpackedTarball/skia/src/sfnt/SkSFNTHeader.h:21:19: note: a field with different name is defined in another translation unit
   21 |     SK_SFNT_ULONG fontType;
      |
Comment 1 Kostadin Shishmanov 2023-10-28 16:47:39 UTC
Portage 3.0.51 (python 3.11.5-final-0, default/linux/amd64/17.1/desktop/plasma/systemd/merged-usr, gcc-13, glibc-2.37-r7, 6.6.0-rc7 x86_64)
=================================================================
System uname: Linux-6.6.0-rc7-x86_64-13th_Gen_Intel-R-_Core-TM-_i5-13600KF-with-glibc2.37
KiB Mem:    16242400 total,   6434824 free
KiB Swap:   24630264 total,  22924792 free
Timestamp of repository gentoo: Sat, 28 Oct 2023 16:16:55 +0000
Head commit of repository gentoo: d2a28c6e6bf0fecc5524ccf5873f53e4b24fdb4c

Timestamp of repository guru: Sat, 28 Oct 2023 07:46:46 +0000
Head commit of repository guru: 429f3a9d7f21e497d38762006f9167d7b62ef07c

Timestamp of repository steam-overlay: Thu, 26 Oct 2023 22:03:40 +0000
Head commit of repository steam-overlay: 72c4dc8b7510033045f713b891758713c3c11801

sh bash 5.1_p16-r6
ld GNU ld (Gentoo 2.40 p5) 2.40.0
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r6::gentoo
dev-java/java-config:      2.3.1-r1::gentoo
dev-lang/perl:             5.38.0-r1::gentoo
dev-lang/python:           3.11.5::gentoo
dev-lang/rust:             1.73.0::gentoo
dev-util/cmake:            3.26.5-r2::gentoo
dev-util/meson:            1.2.1-r1::gentoo
sys-apps/baselayout:       2.14::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-apps/systemd:          254.5::gentoo
sys-devel/autoconf:        2.13-r7::gentoo, 2.71-r6::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.40-r5::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           17.0.3::gentoo
sys-devel/gcc:             13.2.1_p20230826::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             17.0.3::gentoo
sys-devel/llvm:            17.0.3::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.37-r7::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000
    volatile: False

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo
    volatile: False

local
    location: /var/db/repos/local
    masters: gentoo
    volatile: False

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo
    volatile: False

Binary Repositories:

gentoobinhost
    priority: 1
    sync-uri: https://gentoo.osuosl.org/releases/amd64/binpackages/17.1/x86-64

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=x86-64-v3 -O2 -pipe -flto=auto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
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"
CXXFLAGS="-march=x86-64-v3 -O2 -pipe -flto=auto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE 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 XDG_STATE_HOME"
FCFLAGS="-march=x86-64-v3 -O2 -pipe -flto=auto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync 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="-march=x86-64-v3 -O2 -pipe -flto=auto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing"
GENTOO_MIRRORS="https://mirror.telepoint.bg/gentoo "
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1,--as-needed -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing"
LEX="flex"
MAKEOPTS="-j16"
PKGDIR="/var/cache/binpkgs"
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"
RUSTFLAGS="-C target-cpu=x86-64-v3 -C opt-level=2"
SHELL="/bin/bash"
USE="X aac acl acpi activities amd64 branding bzip2 cairo cdr cli crypt cups dbus declarative dri dvdr encode exif flac fortran gdbm gif gtk gui iconv icu jpeg kde kwallet lcms libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses networkmanager nls nptl ogg opengl openmp pam pango pcre pdf pipewire plasma png policykit ppds pulseaudio qml qt5 readline screencast sdl seccomp sound ssl startup-notification svg systemd test-rust tiff truetype udev udisks unicode upower usb vaapi vulkan wayland widgets wxwidgets x264 xattr xcb xft xml xv zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2021" 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 avx2 f16c fma3 pclmul popcnt rdrand sha sse3 sse4_1 sse4_2 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" INPUT_DEVICES="libinput" KERNEL="linux" 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="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" 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, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-28 17:47:30 UTC
Do you know if this is a regression by chance?
Comment 3 Kostadin Shishmanov 2023-10-28 17:52:59 UTC
(In reply to Sam James from comment #2)
> Do you know if this is a regression by chance?

I was using the flatpak up until now, so no idea. Going to try some older ebuilds from the past and also the live one, and will report back.
Comment 4 Kostadin Shishmanov 2023-10-28 19:04:07 UTC
I think the issue is not in libreoffice itself but rather upstream in skia and
VulkanMemoryAllocator 

I found some more lines in a build log from Tumbleweed:

[  638s] /home/abuild/rpmbuild/BUILD/libreoffice-7.6.2.1/workdir/UnpackedTarball/skia/src/core/SkFontStream.cpp:13:8: warning: type 'struct SkSFNTHeader' violates the C++ One Definition Rule [-Wodr]
[  638s] /home/abuild/rpmbuild/BUILD/libreoffice-7.6.2.1/workdir/UnpackedTarball/skia/src/core/SkDistanceFieldGen.cpp:22:8: warning: type 'struct DFData' violates the C++ One Definition Rule [-Wodr]
[  639s] /home/abuild/rpmbuild/BUILD/libreoffice-7.6.2.1/workdir/UnpackedTarball/skia/third_party/vulkanmemoryallocator/include/vk_mem_alloc.h:1566: warning: 'vmaCreateAllocator' violates the C++ One Definition Rule [-Wodr]
[  639s] /home/abuild/rpmbuild/BUILD/libreoffice-7.6.2.1/workdir/UnpackedTarball/skia/third_party/vulkanmemoryallocator/include/vk_mem_alloc.h:2061: warning: 'vmaInvalidateAllocation' violates the C++ One Definition Rule [-Wodr]
[  639s] /home/abuild/rpmbuild/BUILD/libreoffice-7.6.2.1/workdir/UnpackedTarball/skia/third_party/vulkanmemoryallocator/include/vk_mem_alloc.h:2034: warning: 'vmaFlushAllocation' violates the C++ One Definition Rule [-Wodr]
[  639s] /home/abuild/rpmbuild/BUILD/libreoffice-7.6.2.1/workdir/UnpackedTarball/skia/third_party/vulkanmemoryallocator/include/vk_mem_alloc.h:2009: warning: 'vmaUnmapMemory' violates the C++ One Definition Rule [-Wodr]
[  639s] /home/abuild/rpmbuild/BUILD/libreoffice-7.6.2.1/workdir/UnpackedTarball/skia/third_party/vulkanmemoryallocator/include/vk_mem_alloc.h:1996: warning: 'vmaMapMemory' violates the C++ One Definition Rule [-Wodr]
[  639s] /home/abuild/rpmbuild/BUILD/libreoffice-7.6.2.1/workdir/UnpackedTarball/skia/third_party/vulkanmemoryallocator/include/vk_mem_alloc.h:1890: warning: 'vmaFreeMemory' violates the C++ One Definition Rule [-Wodr]
[  639s] /home/abuild/rpmbuild/BUILD/libreoffice-7.6.2.1/workdir/UnpackedTarball/skia/third_party/vulkanmemoryallocator/include/vk_mem_alloc.h:1858: warning: 'vmaAllocateMemoryForBuffer' violates the C++ One Definition Rule [-Wodr]
[  639s] /home/abuild/rpmbuild/BUILD/libreoffice-7.6.2.1/workdir/UnpackedTarball/skia/third_party/vulkanmemoryallocator/include/vk_mem_alloc.h:1879: warning: 'vmaAllocateMemoryForImage' violates the C++ One Definition Rule [-Wodr]
[  639s] /home/abuild/rpmbuild/BUILD/libreoffice-7.6.2.1/workdir/UnpackedTarball/skia/third_party/vulkanmemoryallocator/include/vk_mem_alloc.h:1571: warning: 'vmaDestroyAllocator' violates the C++ One Definition Rule [-Wodr]
[  639s] /home/abuild/rpmbuild/BUILD/libreoffice-7.6.2.1/workdir/UnpackedTarball/skia/third_party/vulkanmemoryallocator/include/vk_mem_alloc.h:1633: warning: 'vmaCalculateStatistics' violates the C++ One Definition Rule [-Wodr]
[  639s] /home/abuild/rpmbuild/BUILD/libreoffice-7.6.2.1/workdir/UnpackedTarball/skia/third_party/vulkanmemoryallocator/include/vk_mem_alloc.h:1919: warning: 'vmaGetAllocationInfo' violates the C++ One Definition Rule [-Wodr]
[  639s] /home/abuild/rpmbuild/BUILD/libreoffice-7.6.2.1/workdir/UnpackedTarball/skia/third_party/vulkanmemoryallocator/include/vk_mem_alloc.h:1605: warning: 'vmaGetMemoryTypeProperties' violates the C++ One Definition Rule [-Wodr]

https://build.opensuse.org/package/live_build_log/LibreOffice:Factory/libreoffice/openSUSE_Tumbleweed/x86_64