pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/58900: abseil bug results in protoc header mismatch
>Number: 58900
>Category: pkg
>Synopsis: abseil bug results in protoc header mismatch
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Dec 13 08:15:00 +0000 2024
>Originator: Paul W. Rankin
>Release: pkgsrc-2024Q3
>Organization:
>Environment:
Darwin MacBookAir.home 24.1.0 Darwin Kernel Version 24.1.0: Thu Oct 10 21:05:14 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T8103 arm64
>Description:
A bug in devel/bseil fixed upstream results in build failures for packages requiring abseil and protobuf headers to match, e.g. net/mosh.
Here is the abseil bugfix: https://github.com/abseil/abseil-cpp/commit/bd0c9c58cac4463d96b574de3097422bb78215a8
This is not yet in a release. Could this be backported please?
>How-To-Repeat:
$ cd net/mosh
$ bmake install
>Fix:
$ cat > $LOCALPATCHES/devel/abseil/patch-shell-copts
diff --git a/CMake/AbseilHelpers.cmake b/CMake/AbseilHelpers.cmake
index 3c4c92fec4c..d8fb9fe5de3 100644
--- a/CMake/AbseilHelpers.cmake
+++ b/CMake/AbseilHelpers.cmake
@@ -186,15 +186,15 @@ function(absl_cc_library)
endif()
endif()
endforeach()
- set(skip_next_cflag OFF)
foreach(cflag ${ABSL_CC_LIB_COPTS})
- if(skip_next_cflag)
- set(skip_next_cflag OFF)
- elseif(${cflag} MATCHES "^-Xarch_")
+ # Strip out the CMake-specific `SHELL:` prefix, which is used to construct
+ # a group of space-separated options.
+ # https://cmake.org/cmake/help/v3.30/command/target_compile_options.html#option-de-duplication
+ string(REGEX REPLACE "^SHELL:" "" cflag "${cflag}")
+ if(${cflag} MATCHES "^-Xarch_")
# An -Xarch_ flag implies that its successor only applies to the
- # specified platform. Filter both of them out before the successor
- # reaches the "^-m" filter.
- set(skip_next_cflag ON)
+ # specified platform. Such option groups are each specified in a single
+ # `SHELL:`-prefixed string in the COPTS list, which we simply ignore.
elseif(${cflag} MATCHES "^(-Wno-|/wd)")
# These flags are needed to suppress warnings that might fire in our headers.
set(PC_CFLAGS "${PC_CFLAGS} ${cflag}")
$ cd $PKGSRCDIR/devel/abseil/
$ bmake install
$ cd $PKGSRCDIR/net/mosh
$ bmake install
Home |
Main Index |
Thread Index |
Old Index