Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 942192 - dev-cpp/abseil-cpp: pollution of CFLAGS (-DNOMINMAX -Wno-virtual-dtor) in pkgconfig files (was: net-misc/mosh: -DNOMINMAX spam in build log from dev-cpp/abseil-cpp via dev-libs/protobuf)
Summary: dev-cpp/abseil-cpp: pollution of CFLAGS (-DNOMINMAX -Wno-virtual-dtor) in pkg...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Paul Zander
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2024-10-25 23:31 UTC by Sam James
Modified: 2025-04-05 00:42 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-10-25 23:31:12 UTC
Originally reported by genr8eofl on IRC.

I see a lot of repeated -DNOMINMAX -Wnon-virtual-dtor when building mosh.

It first appears in protobuf_CFLAGS:
```
/var/tmp/portage/net-misc/mosh-1.4.0/work/mosh-1.4.0/src/fuzz/Makefile
314:protobuf_CFLAGS = -DPROTOBUF_USE_DLLS -Wnon-virtual-dtor -DNOMINMAX -Wnon-virtual-dtor -DNOMINMAX 
[...]
```

protobuf Requires a bunch of abseil components:
```
$ cat /usr/lib64/pkgconfig/protobuf.pc
prefix=/usr
exec_prefix=/usr
libdir=/usr/lib64
includedir=/usr/include

Name: Protocol Buffers
Description: Google's Data Interchange Format
Version: 28.0.0
Requires: absl_absl_check absl_absl_log absl_algorithm absl_base absl_bind_front absl_bits absl_btree absl_cleanup absl_cord absl_core_headers absl_debugging absl_die_if_null absl_dynamic_annotations absl_flags absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_if_constexpr absl_layout absl_log_initialize absl_log_globals absl_log_severity absl_memory absl_node_hash_map absl_node_hash_set absl_optional absl_random_distributions absl_random_random absl_span absl_status absl_statusor absl_strings absl_synchronization absl_time absl_type_traits absl_utility absl_variant utf8_range
Libs: -L${libdir} -lprotobuf
Cflags: -I${includedir} -DPROTOBUF_USE_DLLS
Conflicts: protobuf-lite
```

and each of those sets those CFLAGS, e.g.
```
$ cat /usr/lib64/pkgconfig/absl_symbolize.pc
prefix=/usr
exec_prefix=${prefix}
libdir=/usr/lib64
includedir=/usr/include

Name: absl_symbolize
Description: Abseil symbolize library
URL: https://abseil.io/
Version: 20240722
Requires: absl_debugging_internal = 20240722, absl_demangle_internal = 20240722, absl_base = 20240722, absl_config = 20240722, absl_core_headers = 20240722, absl_dynamic_annotations = 20240722, absl_malloc_internal = 20240722, absl_raw_logging_internal = 20240722, absl_strings = 20240722
Libs: -L${libdir}  -labsl_symbolize
Cflags: -I${includedir} -Wnon-virtual-dtor -DNOMINMAX
```
Comment 1 Larry the Git Cow gentoo-dev 2025-04-05 00:42:07 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=118f77923e182362bb1bcb45756c4679251dcdbf

commit 118f77923e182362bb1bcb45756c4679251dcdbf
Author:     Paul Zander <negril.nx+gentoo@gmail.com>
AuthorDate: 2025-03-03 15:27:40 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-04-05 00:39:47 +0000

    dev-cpp/abseil-cpp: add 20250127.0, 20240722.1, 20240116.3, 20230802.3
    
    Closes: https://bugs.gentoo.org/942192
    Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-cpp/abseil-cpp/Manifest                        |   5 ++
 dev-cpp/abseil-cpp/abseil-cpp-20230802.3.ebuild    |  97 ++++++++++++++++++++
 dev-cpp/abseil-cpp/abseil-cpp-20240116.3.ebuild    |  97 ++++++++++++++++++++
 dev-cpp/abseil-cpp/abseil-cpp-20240722.0-r1.ebuild |   1 +
 dev-cpp/abseil-cpp/abseil-cpp-20240722.1.ebuild    |  93 +++++++++++++++++++
 dev-cpp/abseil-cpp/abseil-cpp-20250127.0.ebuild    | 100 +++++++++++++++++++++
 .../abseil-cpp-20240722.0-ciso646-cxx17.patch      |  37 ++++++++
 7 files changed, 430 insertions(+)