spack / spack

A flexible package manager that supports multiple versions, configurations, platforms, and compilers.
https://spack.io
Other
4.28k stars 2.27k forks source link

protobuf-c package is missing protobuf header file #36949

Open DaveWK opened 1 year ago

DaveWK commented 1 year ago

Steps to reproduce

spack install --add protobuf installs successfully.

When I then try to install protobuf-c:

spack install --add protobuf-c
[+] /usr (external pkgconf-1.8.0-vk3ygy4kadrqqfvccqj6qoqvg76j5qu3)
[+] /usr (external cmake-3.26.3-3tuy7qhedumwxrejlqcy6miqwlbsr2hx)
[+] /usr (external gmake-4.4-wkvhcefnjekod4cninlsfg4wxrjs6pau)
...
==> No patches needed for protobuf-c
==> protobuf-c: Executing phase: 'autoreconf'
==> protobuf-c: Executing phase: 'configure'
==> Error: ProcessError: Command exited with status 1:
    '/tmp/<user>/spack-stage/spack-stage-protobuf-c-1.4.1-43mnplpaf2xcjpbaihwfs2ej6aaec4ak/spack-src/configure' '--prefix=/<path>/spack/opt/spack/linux-fedora38-zen2/aocc-4.0.0/protobuf-c-1.4.1-43mnplpaf2xcjpbaihwfs2ej6aaec4ak'

1 error found in build log:
..
     113    checking for protobuf... yes
     114    checking for google/protobuf/compiler/command_line_interface.h... no
  >> 115    configure: error: required protobuf header file not found

Checking this against my system using dnf provides */google/protobuf/compiler/command_line_interface.h

I can see this is provided by the protobuf-devel package on fedora 38, so I expect that the header file just needs to be added as a dep for the protobuf-c package. Still learning how to use spack, and not sure if there's some way I can just hot-patch the protobuf header into the protobuf-c install package as a dep.

Error message

lib/spack/spack/error.py:54 ==> [2023-04-16-10:19:45.740832] Error: ProcessError: Command exited with status 1:

Information on your system

spack debug report

General information

alalazo commented 1 year ago

Cannot reproduce on:

There I get:

...
checking for protobuf... yes
checking for google/protobuf/compiler/command_line_interface.h... yes
checking for protoc... /home/culpo/PycharmProjects/spack/opt/spack/linux-ubuntu20.04-icelake/gcc-9.4.0/protobuf-3.21.12-lq5q4j7y47rii6kdgbocvbjixd5acuf7/bin/protoc
checking if LD -Wl,--version-script works... yes
...

and I can succesfully build protobuf-c. The header seems to be correctly installed in the protobuf dependency.