Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 941584 - sys-power/apcupsd-3.14.14-r3 - [libtool] [gcc-15] options.c: error: pidfile violates the C++ One Definition Rule [-Werror=odr]
Summary: sys-power/apcupsd-3.14.14-r3 - [libtool] [gcc-15] options.c: error: pidfile v...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: John Einar Reitan
URL:
Whiteboard:
Keywords: PATCH, PullRequest
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2024-10-15 14:42 UTC by Toralf Förster
Modified: 2025-01-23 23:52 UTC (History)
3 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,21.26 KB, text/plain)
2024-10-15 14:42 UTC, Toralf Förster
Details
emerge-history.txt.xz (emerge-history.txt.xz,118.68 KB, application/x-xz)
2024-10-15 14:42 UTC, Toralf Förster
Details
environment (environment,97.13 KB, text/plain)
2024-10-15 14:42 UTC, Toralf Förster
Details
etc.clang.tar.xz (etc.clang.tar.xz,1.14 KB, application/x-xz)
2024-10-15 14:42 UTC, Toralf Förster
Details
etc.portage.tar.xz (etc.portage.tar.xz,40.21 KB, application/x-xz)
2024-10-15 14:42 UTC, Toralf Förster
Details
logs.tar.xz (logs.tar.xz,9.90 KB, application/x-xz)
2024-10-15 14:42 UTC, Toralf Förster
Details
qlist-info.txt.xz (qlist-info.txt.xz,115.59 KB, application/x-xz)
2024-10-15 14:42 UTC, Toralf Förster
Details
sys-power:apcupsd-3.14.14-r3:20241015-142638.log (sys-power:apcupsd-3.14.14-r3:20241015-142638.log,80.03 KB, text/plain)
2024-10-15 14:42 UTC, Toralf Förster
Details
temp.tar.xz (temp.tar.xz,454.26 KB, application/x-xz)
2024-10-15 14:43 UTC, Toralf Förster
Details
Patch to make extern symbol declarations consistent (lto.patch,1.13 KB, patch)
2025-01-19 08:35 UTC, Holger Hoffstätte
Details | Diff

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-15 14:42:50 UTC
too long lines were shrinked:

x86_64-pc-linux-gnu-g++ -x c++ -I/var/tmp/portage/sys-power/apcupsd-3.14.14-r3/work/apcupsd-3.14.14/include  -O2 -pipe -march=native -fno-diagnostics-color -Werror=lto-type-mismatch -Werror=strict-aliasing -Werror=odr -flto -fno-exceptions -fno-rtti -Wall -Wno-unused-result  -c -o .obj/apcupsd.o apc
if test ! -d .deps; then mkdir -p .deps; fi; x86_64-pc-linux-gnu-gcc -M -I/var/tmp/portage/sys-power/apcupsd-3.14.14-r3/work/apcupsd-3.14.14/include  apcupsd.c > .deps/apcupsd.d; 	/usr/bin/echo .obj/ | tr -d '\n' > .deps/apcupsd.P; /usr/bin/sed -e 's/#.*//' -e '/^$/ d' < .deps/apcupsd.d >> .deps/apc
make[2]: Leaving directory '/var/tmp/portage/sys-power/apcupsd-3.14.14-r3/work/apcupsd-3.14.14/src'
make[2]: Entering directory '/var/tmp/portage/sys-power/apcupsd-3.14.14-r3/work/apcupsd-3.14.14/src'
  LD    src/apcupsd
x86_64-pc-linux-gnu-gcc -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/usr/local/lib64 -L/usr/local/lib .obj/options.o .obj/device.o .obj/reports.o .obj/action.o .obj/apcupsd.o .obj/ap
options.c:65:14: error: pidfile violates the C++ One Definition Rule [-Werror=odr]
   65 | extern char *pidfile;
      |              ^

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

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 23.0_no_multilib_hardened_systemd-20241002-145002

  UNMASKED:
  <sys-devel/gcc-15.0.9999:15
    Requested by sam

  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:
clang version 19.1.1
llvm-config:
19.1.1
python:
Python 3.12.7
Available Ruby profiles:
  [1]   ruby32 (with Rubygems)
  [2]   ruby33 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.81.0
  [2]   rust-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
go version go1.23.1 linux/amd64
php cli (if any):

  HEAD of ::gentoo
commit 8f27ee86bf39d118d66f96c19606e606050461cd
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Tue Oct 15 13:18:59 2024 +0000

    2024-10-15 13:18:59 UTC

emerge -qpvO =sys-power/apcupsd-3.14.14-r3
[ebuild  N    ] sys-power/apcupsd-3.14.14-r3  USE="cgi usb -modbus (-selinux) -snmp"
Comment 1 Toralf Förster gentoo-dev 2024-10-15 14:42:51 UTC
Created attachment 905943 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2024-10-15 14:42:52 UTC
Created attachment 905944 [details]
emerge-history.txt.xz
Comment 3 Toralf Förster gentoo-dev 2024-10-15 14:42:54 UTC
Created attachment 905945 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2024-10-15 14:42:54 UTC
Created attachment 905946 [details]
etc.clang.tar.xz
Comment 5 Toralf Förster gentoo-dev 2024-10-15 14:42:55 UTC
Created attachment 905947 [details]
etc.portage.tar.xz
Comment 6 Toralf Förster gentoo-dev 2024-10-15 14:42:56 UTC
Created attachment 905948 [details]
logs.tar.xz
Comment 7 Toralf Förster gentoo-dev 2024-10-15 14:42:57 UTC
Created attachment 905949 [details]
qlist-info.txt.xz
Comment 8 Toralf Förster gentoo-dev 2024-10-15 14:42:59 UTC
Created attachment 905950 [details]
sys-power:apcupsd-3.14.14-r3:20241015-142638.log
Comment 9 Toralf Förster gentoo-dev 2024-10-15 14:43:00 UTC
Created attachment 905951 [details]
temp.tar.xz
Comment 10 Conrad Kostecki gentoo-dev 2025-01-19 01:20:18 UTC
I see only using 'filter-lto' here. Upstream has for years no new commits, so I don't expect any proper fix here. Unless someone has an idea how to fix this without filtering..
Comment 11 Holger Hoffstätte 2025-01-19 08:35:01 UTC
Created attachment 917061 [details, diff]
Patch to make extern symbol declarations consistent

This fixes it for me.
Comment 12 Conrad Kostecki gentoo-dev 2025-01-19 20:39:01 UTC
(In reply to Holger Hoffstätte from comment #11)
> Created attachment 917061 [details, diff] [details, diff]
> Patch to make extern symbol declarations consistent
> 
> This fixes it for me.

Thats great, thank you!
Comment 13 Larry the Git Cow gentoo-dev 2025-01-23 23:52:10 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85f08b2beefc799a843a3c84f309cf44a3316a93

commit 85f08b2beefc799a843a3c84f309cf44a3316a93
Author:     Conrad Kostecki <conikost@gentoo.org>
AuthorDate: 2025-01-23 23:49:58 +0000
Commit:     Conrad Kostecki <conikost@gentoo.org>
CommitDate: 2025-01-23 23:51:12 +0000

    sys-power/apcupsd: update EAPI 7 -> 8
    
    Also changed:
    * Sorted use flags
    * Use generated apcupsd.conf
    * Set NISIP via configure
    * Remove runlevel check from apcupsd.powerfail
    * Patch for LTO
    * Dropped PAGER workaround
    
    Closes: https://bugs.gentoo.org/418177
    Closes: https://bugs.gentoo.org/832350
    Closes: https://bugs.gentoo.org/941584
    Closes: https://github.com/gentoo/gentoo/pull/40199
    
    Signed-off-by: Conrad Kostecki <conikost@gentoo.org>

 sys-power/apcupsd/apcupsd-3.14.14-r4.ebuild       | 160 ++++++++++++++++++++++
 sys-power/apcupsd/files/apcupsd-3.14.14-lto.patch |  29 ++++
 sys-power/apcupsd/files/apcupsd.powerfail.init-r1 |  17 +++
 3 files changed, 206 insertions(+)