--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: papi FTBFS on ppc64el with LTO enabled
- From: Steve Langasek <steve.langasek@canonical.com>
- Date: Tue, 28 Mar 2023 21:25:34 -0700
- Message-id: <168006393405.2522282.5469064719919632559.reportbug@homer.dodds.net>
Package: papi
Version: 7.0.0-2
Severity: minor
Tags: patch
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu lunar ubuntu-patch
Dear maintainers,
In Ubuntu we have observed that papi fails to build from source on ppc64el:
[...]
cc -I../testlib -I../validation_tests -I.. -I. -g -O3 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wextra -Wall -DHAVE_ROCM_SMI -DPAPI_NUM_COMP=5 -O1 exeinfo.c ../testlib/libtestlib.a ../libpapi.so.7.0.0.0 -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -Wl,--enable-new-dtags -o exeinfo
/usr/bin/ld: /tmp/ccNFJgHF.ltrans0.ltrans.o:(.rodata+0x10): undefined reference to `f08_callback_'
/usr/bin/ld: BFD (GNU Binutils for Ubuntu) 2.40 assertion fail ../../bfd/elf64-ppc.c:17380
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:151: sde_test_f08] Error 1
[...]
This error only happens when LTO is enabled. It is likely a bug in the LTO
toolchain implementation, but to work around the build failure, I have
uploaded the attached patch to Ubuntu which disables LTO on ppc64el.
This patch should presently be a safe no-op in Debian, since Debian does not
enable LTO by default. But as there are discussions to enable it by default
in the future, I am forwarding this patch to you in case it proves useful.
Thanks for considering,
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer https://www.debian.org/
slangasek@ubuntu.com vorlon@debian.org
diff -Nru papi-7.0.0/debian/rules papi-7.0.0/debian/rules
--- papi-7.0.0/debian/rules 2022-11-29 05:40:48.000000000 -0800
+++ papi-7.0.0/debian/rules 2023-03-28 21:18:17.000000000 -0700
@@ -8,9 +8,14 @@
# see FEATURE AREAS in dpkg-buildflags(1)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+include /usr/share/dpkg/architecture.mk
+
+ifeq ($(DEB_HOST_ARCH),ppc64el)
+ DEB_BUILD_MAINT_OPTIONS += optimize=-lto
+endif
+
DPKG_EXPORT_BUILDFLAGS = yes
include /usr/share/dpkg/buildflags.mk
-include /usr/share/dpkg/architecture.mk
# Upstream does not use CPPFLAGS
CFLAGS += $(CPPFLAGS)
--- End Message ---
--- Begin Message ---
Source: papi
Source-Version: 7.0.0-3
Done: Andreas Beckmann <anbe@debian.org>
We believe that the bug you reported is fixed in the latest version of
papi, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 1033631@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Andreas Beckmann <anbe@debian.org> (supplier of updated papi package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Wed, 16 Aug 2023 22:13:15 +0200
Source: papi
Architecture: source
Version: 7.0.0-3
Distribution: unstable
Urgency: medium
Maintainer: Debian HPC Team <debian-hpc@lists.debian.org>
Changed-By: Andreas Beckmann <anbe@debian.org>
Closes: 1033631 1049046
Changes:
papi (7.0.0-3) unstable; urgency=medium
.
* Cleanup more generated files. (Closes: #1049046)
* Disable LTO on ppc64el. (Closes: #1033631)
* Bump Standards-Version to 4.6.2. No changes needed.
Checksums-Sha1:
294645cfcd4c6cbf4cef61e8e3505cef1d538d18 2275 papi_7.0.0-3.dsc
ff32697fc9c861df6505b4b1b2a4552b084bbd86 20812 papi_7.0.0-3.debian.tar.xz
d6f8b88ac5d7256d8f3d9bf72b9be3c723717734 6222 papi_7.0.0-3_source.buildinfo
Checksums-Sha256:
93458219be74ed29f871d6285925b4ff3bfdabb5db40f115e79b7c5816233337 2275 papi_7.0.0-3.dsc
ab60d0394f59802186337059f7fef86491834eb1c0ef8fe0d66d35e0a2466156 20812 papi_7.0.0-3.debian.tar.xz
64b6e6dce0596a29f56917b501c6cee906c82ce63d73cfdaa45f0f4aa9e0c605 6222 papi_7.0.0-3_source.buildinfo
Files:
b885e5960247394c05ce8cb3caa9a2e1 2275 devel optional papi_7.0.0-3.dsc
bbe682d3403d08394b883ea141b8670a 20812 devel optional papi_7.0.0-3.debian.tar.xz
fd5cd13d8b379e9b43a11ad92e5ccfad 6222 devel optional papi_7.0.0-3_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQJEBAEBCAAuFiEE6/MKMKjZxjvaRMaUX7M/k1np7QgFAmTdLjwQHGFuYmVAZGVi
aWFuLm9yZwAKCRBfsz+TWentCFDiEACmVwys2bM1EV+4lv/0iW8qajKlu/Yf4o/5
OSbtTunIrGQwOAL59yO7zO+aUI5PmnWedcP2PacGycaBVNp3Ce3y8e5r05mfZ6zH
K7AzBBDQp5MHQc0lHCVeEtjHaO72B9+yr+Oc2KCdS+TmywBqEiiAFupnX6FzDbOp
+0fj2LK6QY9wPuhniP7/Ypogq+q/uoQTimTQs9G4mzxVHzpnP4yikdPL5iZVKpjB
gTpnCNUPpcSgTsJ6vs1aVYvLC2jDFXxjjxu6L4E4Mu1cK8JBIbdBsIvSXjoiKFUQ
s6lecl3lEV8QNokP/97zZj5Q9yljDXloZI2ZKkdsi50YJSe8fRbtcJcJo8SB3GUe
CIM5xPdRpGDl1v+PEgymT29vbguB5FdnXj+k2Xm/3h5L1dXwuTbivXAyzjiA5QA+
ttIYF8iNp6kOT5Lurv4fEOM+hOtALkWw8lZkREjSgV0d/pV0VIq/44xdOUmpbf23
N0xdIH/nkwvGYHlCBPXJcHz3k+Swu3Waog7IV1BGDPAynPliXI00/pa9PYnAiXtt
+jiR4+XlcwOdWaESZr0HSP2TKlcuWcCIqgy9O2Wx6GDVX/9/VuJ6V9F7jxz0Ieq8
LjxqeuSij4odzR7fMlUFGGlef3e+sJWGHyTjd+mPZ8vxoRzyxmsefiuZ1O3SRK+F
PrE51s1/yg==
=y4lT
-----END PGP SIGNATURE-----
--- End Message ---