Bug 2101467

Summary: postgresql-14.3-5.fc37 FTBFS on ppc64le: /usr/include/bits/stdio-ldbl.h:26:20: error: cannot apply asm label to function after its first use
Product: [Fedora] Fedora Reporter: Petr Pisar <ppisar>
Component: postgresqlAssignee: Filip Januš <fjanus>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: anon.amish, devrim, fjanus, hhorak, jmlich83, mkulik, panovotn, pkubat, praiskup, tgl
Target Milestone: ---   
Target Release: ---   
Hardware: ppc64le   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-07-20 09:16:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2100546    
Bug Blocks: 2045102    

Description Petr Pisar 2022-06-27 14:46:22 UTC
postgresql-14.3-5.fc37 fails to compile on 64-bit little-endian PowerPC:

/usr/bin/make -C timezone all
make[2]: Entering directory '/builddir/build/BUILD/postgresql-14.3/src/timezone'
/usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2  -I../../src/include  -D_GNU_SOURCE -I/usr/include/libxml2  '-DSYSTEMTZDIR="/usr/share/zoneinfo"' -flto=thin -emit-llvm -c -o pgtz.bc pgtz.c
In file included from pgtz.c:13:
In file included from ../../src/include/postgres.h:46:
In file included from ../../src/include/c.h:59:
In file included from /usr/include/stdio.h:899:
/usr/include/bits/stdio-ldbl.h:26:20: error: cannot apply asm label to function after its first use
__LDBL_REDIR_DECL (vfprintf)
~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/usr/include/sys/cdefs.h:569:26: note: expanded from macro '__LDBL_REDIR_DECL'
  extern __typeof (name) name __asm (__ASMNAME ("__" #name "ieee128"));
                         ^           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [../../src/Makefile.global:1047: pgtz.bc] Error 1
make[2]: Leaving directory '/builddir/build/BUILD/postgresql-14.3/src/timezone'
make[2]: *** Waiting for unfinished jobs....

A difference between passing and failing build root is at <https://koschei.fedoraproject.org/build/13101483>. An upgrade clang-devel from
14.0.0-1.fc37 to 14.0.0-4.fc37 is suspicious.

Comment 1 Petr Pisar 2022-06-27 14:47:59 UTC
From clang's changelog:

* Thu May 19 2022 Tom Stellard <tstellar> - 14.0.0-3
- Use the ieee128 format for long double on ppc64le

Comment 2 Filip Januš 2022-06-29 06:32:26 UTC
Yes, it's clang issue. They are working on a fix.

https://bugzilla.redhat.com/show_bug.cgi?id=2100546

Comment 3 Filip Januš 2022-07-20 09:16:39 UTC
there is already postgresql-14.3-6.fc37