Bug 2264128 - gettext fails to build without the disable-libtextstyle patch: error: '-Wformat-security' ignored without '-Wformat'
Summary: gettext fails to build without the disable-libtextstyle patch: error: '-Wform...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gettext
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Manish Tiwari
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-02-14 05:02 UTC by Jens Petersen
Modified: 2024-03-19 05:25 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-03-19 05:25:12 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FC-1122 0 None None None 2024-02-21 05:16:46 UTC

Description Jens Petersen 2024-02-14 05:02:15 UTC
Disabling gettext-0.22-disable-libtextstyle.patch gives:

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I. -I. -I.. -I.. -Iglib -DIN_LIBTEXTSTYLE -I./libcroco -DDEPENDS_ON_LIBICONV=1 -I/usr/include/libxml2 -fanalyzer -fstrict-flex-arrays -Wall -Warith-conversion -Wcast-align=strict -Wdate-time -Wdisabled-optimization -Wdouble-promotion -Wduplicated-branches -Wduplicated-cond -Wextra -Wformat-signedness -Winit-self -Winvalid-pch -Wlogical-op -Wmissing-include-dirs -Wnested-externs -Wnull-dereference -Wopenmp-simd -Woverlength-strings -Wpacked -Wpointer-arith -Wstack-protector -Wstrict-flex-arrays -Wstrict-overflow -Wsuggest-attribute=format -Wsuggest-final-methods -Wsuggest-final-types -Wsync-nand -Wsystem-headers -Wtrampolines -Wuninitialized -Wunknown-pragmas -Wunsafe-loop-optimizations -Wvariadic-macros -Wvector-operation-performance -Wwrite-strings -Warray-bounds=2 -Wattribute-alias=2 -Wbidi-chars=any,ucn -Wformat-overflow=2 -Wformat=2 -Wformat-truncation=2 -Wimplicit-fallthrough=5 -Wshift-overflow=2 -Wuse-after-free=3 -Wunused-const-variable=2 -Wvla-larger-than=4031 -Wno-analyzer-malloc-leak -Wno-empty-body -Wno-analyzer-double-fclose -Wno-analyzer-double-free -Wno-analyzer-fd-double-close -Wno-analyzer-null-argument -Wno-analyzer-null-dereference -Wno-analyzer-use-of-uninitialized-value -Wno-cast-align -Wno-format-nonliteral -Wno-sign-compare -Wno-type-limits -Wno-unused-parameter -Wno-clobbered -Wshadow=local -Wno-cast-function-type -Wno-duplicated-cond -Wno-format -Wno-implicit-fallthrough -Wno-null-dereference -Wno-suggest-attribute=format -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -c libcroco/cr-additional-sel.c  -fPIC -DPIC -o libcroco/.libs/rpl_la-cr-additional-sel.o
cc1: error: '-Wformat-security' ignored without '-Wformat' [-Werror=format-security]
cc1: some warnings being treated as errors
make[5]: *** [Makefile:2833: libcroco/rpl_la-cr-additional-sel.lo] Error 1
make[5]: Leaving directory '/var/home/petersen/fedora/gettext/BUILD/gettext-0.22.4/libtextstyle/lib'
make[4]: *** [Makefile:2537: all] Error 2
make[4]: Leaving directory '/var/home/petersen/fedora/gettext/BUILD/gettext-0.22.4/libtextstyle/lib'
make[3]: *** [Makefile:1994: all-recursive] Error 1
make[3]: Leaving directory '/var/home/petersen/fedora/gettext/BUILD/gettext-0.22.4/libtextstyle'
make[2]: *** [Makefile:1922: all] Error 2
make[2]: Leaving directory '/var/home/petersen/fedora/gettext/BUILD/gettext-0.22.4/libtextstyle'
make[1]: *** [Makefile:408: all-recursive] Error 1
make[1]: Leaving directory '/var/home/petersen/fedora/gettext/BUILD/gettext-0.22.4'
make: *** [Makefile:364: all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.YkneHB (%build)


Reproducible: Always

Comment 1 Jens Petersen 2024-02-21 15:11:48 UTC
Florian, do you think -Wformat should be included the %_warning_options macro in redhat-rpm-config?

https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/rawhide/f/macros#_417

Comment 2 Jens Petersen 2024-02-21 15:12:35 UTC
See also https://src.fedoraproject.org/rpms/gettext/pull-request/26

Comment 3 Florian Weimer 2024-03-08 09:28:03 UTC
(In reply to Jens Petersen from comment #1)
> Florian, do you think -Wformat should be included the %_warning_options
> macro in redhat-rpm-config?
> 
> https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/rawhide/f/
> macros#_417

Do you mean to override the previous -Wno-format? I'm not sure if that's going to be useful. This is the first time I've hard of a package having such an issue. There is no full redhat-rpm-config solution for packages that set custom flags. For example, even with -Wformat in the flags, another package might still override that with a flag later on the command line.


Note You need to log in before you can comment on or make changes to this bug.