Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 940695 - app-backup/bacula-15.0.2 - [ncurses-6.5] [meson] [libtool] [gcc-15] ../jcr.h: error: type struct JCR violates the C++ One Definition Rule [-Werror=odr]
Summary: app-backup/bacula-15.0.2 - [ncurses-6.5] [meson] [libtool] [gcc-15] ../jcr.h:...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Thomas Beierlein
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2024-10-03 08:15 UTC by Toralf Förster
Modified: 2024-10-25 11:17 UTC (History)
2 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,20.14 KB, text/plain)
2024-10-03 08:15 UTC, Toralf Förster
Details
app-backup:bacula-15.0.2:20241002-233337.log (app-backup:bacula-15.0.2:20241002-233337.log,121.93 KB, text/plain)
2024-10-03 08:15 UTC, Toralf Förster
Details
emerge-history.txt.xz (emerge-history.txt.xz,60.77 KB, application/x-xz)
2024-10-03 08:15 UTC, Toralf Förster
Details
environment (environment,95.60 KB, text/plain)
2024-10-03 08:15 UTC, Toralf Förster
Details
etc.clang.tar.xz (etc.clang.tar.xz,1.20 KB, application/x-xz)
2024-10-03 08:15 UTC, Toralf Förster
Details
etc.portage.tar.xz (etc.portage.tar.xz,20.73 KB, application/x-xz)
2024-10-03 08:15 UTC, Toralf Förster
Details
logs.tar.xz (logs.tar.xz,22.45 KB, application/x-xz)
2024-10-03 08:15 UTC, Toralf Förster
Details
qlist-info.txt.xz (qlist-info.txt.xz,72.33 KB, application/x-xz)
2024-10-03 08:15 UTC, Toralf Förster
Details
temp.tar.xz (temp.tar.xz,914.59 KB, application/x-xz)
2024-10-03 08:15 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2024-10-03 08:15:39 UTC
   -lacl 	      -lz -lbacfind -lbaccfg -lbac -lm \
  -rpath /usr/lib64   -lssl -lcrypto -lpthread  -lcap  -llzo2 -lzstd 
Linking bfdjson ...
/var/tmp/portage/app-backup/bacula-15.0.2/work/bacula-15.0.2/libtool --silent --tag=CXX --mode=link /usr/bin/x86_64-pc-linux-gnu-g++  -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--defsym=__gentoo_check_ldflags__=0 -Werror=lto-type-mismatch -Werror=strict-aliasing -Werror=odr -flto -L../lib -L../findlib -o bfdjson bfdjson.o filed_conf.o runres_conf.o \
   -lacl 	      -lz -lbacfind -lbaccfg -lbac -lm \
  -rpath /usr/lib64   -lssl -lcrypto -lpthread  -lcap  -llzo2 -lzstd
../jcr.h:203:7: error: type 'struct JCR' violates the C++ One Definition Rule [-Werror=odr]
  203 | class JCR {
      |       ^

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 23.0_desktop_systemd-20240927-085502

  UNMASKED:
  /etc/portage/package.unmask/60gcc:<sys-devel/gcc-15.0.9999:15
    Requested by sam
    Please re-assign to ztrawhcse@ if you cannot reproduced it with regular meson.
  /etc/portage/package.unmask/50unstable:<dev-build/meson-9999
    Issues involving opaque types / incomplete typedefs should block bug 930805
  /etc/portage/package.unmask/50unstable:>=sys-libs/ncurses-6.5

  The attached etc.portage.tar.xz has all details.
  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-10
 [2] x86_64-pc-linux-gnu-15 *
clang/llvm (if any):
clang version 19.1.1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/19/bin
Configuration file: /etc/clang/x86_64-pc-linux-gnu-clang.cfg
/usr/lib/llvm/19
19.1.1
Python 3.12.7
Available Ruby profiles:
  [1]   ruby31 (with Rubygems)
  [2]   ruby32 (with Rubygems)
  [3]   ruby33 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.81.0 *
The following VMs are available for generation-2:
1)	Eclipse Temurin JDK 11.0.24_p8 [openjdk-bin-11]
2)	Eclipse Temurin JDK 17.0.12_p7 [openjdk-bin-17]
*)	Eclipse Temurin JDK 21.0.4_p7 [openjdk-bin-21]
4)	Eclipse Temurin JDK 8.422_p05 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8 
  [2]   openjdk-bin-11 
  [3]   openjdk-bin-17 
  [4]   openjdk-bin-21  system-vm

The Glorious Glasgow Haskell Compilation System, version 9.2.8
php cli (if any):
  [1]   php8.3 *
go version go1.23.1 linux/amd64

  HEAD of ::gentoo
commit 0a17b1dde871a3abc8f981cc1f36ee2feffa3b51
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Wed Oct 2 22:49:00 2024 +0000

    2024-10-02 22:48:59 UTC

emerge -qpvO =app-backup/bacula-15.0.2
[ebuild  N    ] app-backup/bacula-15.0.2  USE="X acl batch-insert examples ipv6 qt5 readline sqlite ssl -bacula-clientonly -bacula-nodir -bacula-nosd -logwatch -mysql -postgres (-selinux) -static -tcpd -vim-syntax"
Comment 1 Toralf Förster gentoo-dev 2024-10-03 08:15:40 UTC
Created attachment 904744 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2024-10-03 08:15:41 UTC
Created attachment 904745 [details]
app-backup:bacula-15.0.2:20241002-233337.log
Comment 3 Toralf Förster gentoo-dev 2024-10-03 08:15:42 UTC
Created attachment 904746 [details]
emerge-history.txt.xz
Comment 4 Toralf Förster gentoo-dev 2024-10-03 08:15:44 UTC
Created attachment 904747 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2024-10-03 08:15:45 UTC
Created attachment 904748 [details]
etc.clang.tar.xz
Comment 6 Toralf Förster gentoo-dev 2024-10-03 08:15:46 UTC
Created attachment 904749 [details]
etc.portage.tar.xz
Comment 7 Toralf Förster gentoo-dev 2024-10-03 08:15:47 UTC
Created attachment 904750 [details]
logs.tar.xz
Comment 8 Toralf Förster gentoo-dev 2024-10-03 08:15:48 UTC
Created attachment 904751 [details]
qlist-info.txt.xz
Comment 9 Toralf Förster gentoo-dev 2024-10-03 08:15:50 UTC
Created attachment 904752 [details]
temp.tar.xz
Comment 10 Larry the Git Cow gentoo-dev 2024-10-21 20:02:12 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=544fedfdeb0f3f5cf0b5d903c3d0e879e3eb664e

commit 544fedfdeb0f3f5cf0b5d903c3d0e879e3eb664e
Author:     Thomas Beierlein <tomjbe@gentoo.org>
AuthorDate: 2024-10-21 19:57:03 +0000
Commit:     Thomas Beierlein <tomjbe@gentoo.org>
CommitDate: 2024-10-21 20:01:10 +0000

    app-backup/bacula: Do not build with -flto
    
    The package defines some structures with different content for some of
    the tools which triggers severe warning with -Werror=odr and
    -Werror=lto-type-mismatch
    
    Closes: https://bugs.gentoo.org/940695
    Signed-off-by: Thomas Beierlein <tomjbe@gentoo.org>

 app-backup/bacula/bacula-15.0.2.ebuild | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
Comment 11 Eli Schwartz gentoo-dev 2024-10-21 23:05:16 UTC
... are you planning to report this upstream too? :)
Comment 12 Thomas Beierlein gentoo-dev 2024-10-22 10:14:39 UTC
(In reply to Eli Schwartz from comment #11)
> ... are you planning to report this upstream too? :)

I am not sure if that make sense.

Bacula consists of a bunch of different programs which works loosely together.

For me it looks like upstream made the decision to use the same structures names but with partly different content for different parts of the suite. E.g. the 'class JCR' from the bug report stand for 'Job control record', where different parts of the suite have different needs what belongs into that record.

But you are right we should at least inform them about the problem (try do to it tommorow).
Comment 13 Eli Schwartz gentoo-dev 2024-10-22 13:16:49 UTC
(In reply to Thomas Beierlein from comment #12)
> I am not sure if that make sense.
> 
> Bacula consists of a bunch of different programs which works loosely
> together.
> 
> For me it looks like upstream made the decision to use the same structures
> names but with partly different content for different parts of the suite.
> E.g. the 'class JCR' from the bug report stand for 'Job control record',
> where different parts of the suite have different needs what belongs into
> that record.


I don't see how any of this has to do with anything. Are you trying to say that their incorrect code is correct because the variables really are doing different things?

The bug here isn't that it fails to compile with LTO -- the bug here is that compiling with LTO reveals that there is Undefined Behavior (and LTO allows the compiler to fully typecheck the application -- and also allows it to perform the optimizations that lead to a crash).

Restricting LTO makes a crash much less likely -- but it doesn't get rid of the Undefined Behavior. We *always* want a proper fix.

If they are using "job control record" to mean different things in different parts of the suite, they can just rename those classes to more specific names which don't conflict.


> But you are right we should at least inform them about the problem (try do
> to it tommorow).


Thank you. :)
Comment 14 Thomas Beierlein gentoo-dev 2024-10-25 11:17:50 UTC
Mail sent to bacula devel list.