Repository: spack/spack

Issue:
Installation issue: spack install grpc 
### Steps to reproduce the issue

```console
$ spack config add "config:build_jobs: 48"
spack clean --all
spack add grpc
spack concretize --force
spack install
```

### Error message

```console
==> Error: ProcessError: Command exited with status 2:
    'make' '-j48'

16 errors found in build log:
   >> 1027    /tmp/aidune03/spack-stage/spack-stage-grpc-1.55.0-efwphjzxbwoxe4xkfsb56ea7ggdfpvzb/spack-src/src/core/lib/iomgr/event_engine_shims/tcp_client.cc:74:23: error:
             'StrCat' is not a member of 'absl'
     1028       74 |                 absl::StrCat("tcp-client:", addr_uri.value()))
     1029          |                       ^~~~~~
 
>> 1052    make[2]: *** [CMakeFiles/grpc_authorization_provider.dir/build.make:1395: CMakeFiles/grpc_authorization_provider.dir/src/core/lib/iomgr/event_engine_shims/tcp_
             client.cc.o] Error 1
 >> 1120    make[1]: *** [CMakeFiles/Makefile2:497: CMakeFiles/grpc_authorization_provider.dir/all] Error 2
  1121    make[1]: *** Waiting for unfinished jobs....

 >> 1902    /tmp/aidune03/spack-stage/spack-stage-grpc-1.55.0-efwphjzxbwoxe4xkfsb56ea7ggdfpvzb/spack-src/src/core/lib/iomgr/event_engine_shims/tcp_client.cc:74:23: error:
             'StrCat' is not a member of 'absl'
     1903       74 |                 absl::StrCat("tcp-client:", addr_uri.value()))
     1904          |                       ^~~~~~

 >> 1965    make[2]: *** [CMakeFiles/grpc_unsecure.dir/build.make:2949: CMakeFiles/grpc_unsecure.dir/src/core/lib/iomgr/event_engine_shims/tcp_client.cc.o] Error 1
     1966    make[2]: *** Waiting for unfinished jobs....
 >> 1968    /tmp/aidune03/spack-stage/spack-stage-grpc-1.55.0-efwphjzxbwoxe4xkfsb56ea7ggdfpvzb/spack-src/src/core/lib/iomgr/tcp_posix.cc:863:19: error: 'StrCat' is not a m
             ember of 'absl'
     1969      863 |             absl::StrCat("Cannot set SO_RCVLOWAT on fd=", tcp->fd,
     1970          |                   ^~~~~~
     1971    /tmp/aidune03/spack-stage/spack-stage-grpc-1.55.0-efwphjzxbwoxe4xkfsb56ea7ggdfpvzb/spack-src/src/core/lib/iomgr/tcp_posix.cc: In function 'bool tcp_do_read({an
             onymous}::grpc_tcp*, grpc_error_handle*)':
  >> 1972    /tmp/aidune03/spack-stage/spack-stage-grpc-1.55.0-efwphjzxbwoxe4xkfsb56ea7ggdfpvzb/spack-src/src/core/lib/iomgr/tcp_posix.cc:953:58: error: 'StrCat' is not a m
             ember of 'absl'
     1973      953 |             tcp_annotate_error(absl::InternalError(absl::StrCat(
     1974          |                                                          ^~~~~~
     1975 

 >> 2139    make[2]: *** [CMakeFiles/grpc_unsecure.dir/build.make:3509: CMakeFiles/grpc_unsecure.dir/src/core/lib/iomgr/tcp_posix.cc.o] Error 1

 >> 2475    make[1]: *** [CMakeFiles/Makefile2:321: CMakeFiles/grpc_unsecure.dir/all] Error 2

  >> 2693    /tmp/aidune03/spack-stage/spack-stage-grpc-1.55.0-efwphjzxbwoxe4xkfsb56ea7ggdfpvzb/spack-src/src/core/lib/iomgr/event_engine_shims/tcp_client.cc:74:23: error:
             'StrCat' is not a member of 'absl'
     2694       74 |                 absl::StrCat("tcp-client:", addr_uri.value()))
     2695          |                       ^~~~~~


 >> 2713    make[2]: *** [CMakeFiles/grpc.dir/build.make:7611: CMakeFiles/grpc.dir/src/core/lib/iomgr/event_engine_shims/tcp_client.cc.o] Error 1
     2714    make[2]: *** Waiting for unfinished jobs....

  >> 2717    /tmp/aidune03/spack-stage/spack-stage-grpc-1.55.0-efwphjzxbwoxe4xkfsb56ea7ggdfpvzb/spack-src/src/core/lib/iomgr/tcp_posix.cc:863:19: error: 'StrCat' is not a m
             ember of 'absl'
     2718      863 |             absl::StrCat("Cannot set SO_RCVLOWAT on fd=", tcp->fd,
     2719          |                   ^~~~~~
     2720    /tmp/aidune03/spack-stage/spack-stage-grpc-1.55.0-efwphjzxbwoxe4xkfsb56ea7ggdfpvzb/spack-src/src/core/lib/iomgr/tcp_posix.cc: In function 'bool tcp_do_read({an
             onymous}::grpc_tcp*, grpc_error_handle*)':
  >> 2721    /tmp/aidune03/spack-stage/spack-stage-grpc-1.55.0-efwphjzxbwoxe4xkfsb56ea7ggdfpvzb/spack-src/src/core/lib/iomgr/tcp_posix.cc:953:58: error: 'StrCat' is not a m
             ember of 'absl'
     2722      953 |             tcp_annotate_error(absl::InternalError(absl::StrCat(
     2723          |                                                          ^~~~~~
  >> 2724    make[2]: *** [CMakeFiles/grpc.dir/build.make:8171: CMakeFiles/grpc.dir/src/core/lib/iomgr/tcp_posix.cc.o] Error 1

  >> 2731    make[1]: *** [CMakeFiles/Makefile2:293: CMakeFiles/grpc.dir/all] Error 2
     2732    make[1]: Leaving directory '/tmp/aidune03/spack-stage/spack-stage-grpc-1.55.0-efwphjzxbwoxe4xkfsb56ea7ggdfpvzb/spack-build-efwphjz'
  >> 2733    make: *** [Makefile:139: all] Error 2

See build log for details:
  /tmp/aidune03/spack-stage/spack-stage-grpc-1.55.0-efwphjzxbwoxe4xkfsb56ea7ggdfpvzb/spack-build-out.txt

==> Error: grpc-1.55.0-efwphjzxbwoxe4xkfsb56ea7ggdfpvzb: ProcessError: Command exited with status 2:
    'make' '-j48'
==> Error: grpc-1.55.0-efwphjzxbwoxe4xkfsb56ea7ggdfpvzb: Package was not installed
==> Error: Installation request failed.  Refer to reported errors for failing package(s).
```





### Information on your system

[aidune03@iceberg03 packages]$ spack debug report
* **Spack:** 0.22.0 (5fe93fee1eec46a0750bd340198bffcb92ff9eec)
* **Python:** 3.9.18
* **Platform:** linux-almalinux9-sapphirerapids
* **Concretizer:** clingo

[spack-build-env.txt](https://github.com/spack/spack/files/15366460/spack-build-env.txt)
[spack-build-out.txt](https://github.com/spack/spack/files/15366461/spack-build-out.txt)


### Additional information

 spack maintainers grpc
@nazavode please suggest how to fix these error


### General information

- [X] I have run `spack debug report` and reported the version of Spack/Python/Platform
- [X] I have run `spack maintainers <name-of-the-package>` and **@mentioned** any maintainers
- [X] I have uploaded the build log and environment files
- [X] I have searched the issues of this repo and believe this is not a duplicate


Discussion:

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/grpc/package.py b/var/spack/repos/builtin/packages/grpc/package.py
--- a/var/spack/repos/builtin/packages/grpc/package.py
+++ b/var/spack/repos/builtin/packages/grpc/package.py
@@ -62,7 +62,12 @@ class Grpc(CMakePackage):
     depends_on("openssl")
     depends_on("zlib-api")
     depends_on("c-ares")
-    depends_on("abseil-cpp", when="@1.27:")
+
+    with when("@1.27:"):
+        depends_on("abseil-cpp")
+        # missing includes: https://github.com/grpc/grpc/commit/bc044174401a0842b36b8682936fc93b5041cf88
+        depends_on("abseil-cpp@:20230802", when="@:1.61")
+
     depends_on("re2+pic@2023-09-01", when="@1.33.1:")
 
     def cmake_args(self):


Test patch: