Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't find protobuf-c package since #999 #1006

Closed
origamiofficial opened this issue Feb 4, 2024 · 3 comments
Closed

Can't find protobuf-c package since #999 #1006

origamiofficial opened this issue Feb 4, 2024 · 3 comments
Assignees

Comments

@origamiofficial
Copy link

origamiofficial commented Feb 4, 2024

Describe the bug
Since the merge of #999 compiling failed. If you check my Dockerfile's 48 & 49 line, both libprotobuf-c-dev and protobuf-c-compiler is already installed but still it gives me below error while compiling:

#24 60.29 configure: error: The protobuf-c package was not found with pkg-config. Please install protobuf-c!

Full log available: https://github.com/origamiofficial/docker-pihole-unbound/actions/runs/7771303847/job/21192465275

To reproduce
Steps to reproduce the behavior:

RUN build_deps="curl gcc libc-dev libevent-dev libexpat1-dev libnghttp2-dev make flex bison" && \
    set -x && \
    DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --no-install-recommends \
      $build_deps \
      bsdmainutils \
      ca-certificates \
      ldnsutils \
      libevent-2.1-7 \
      libexpat1 \
      libprotobuf-c-dev \
      protobuf-c-compiler && \
    git clone https://github.com/NLnetLabs/unbound.git && \
    cd unbound && \
    groupadd _unbound && \
    useradd -g _unbound -s /dev/null -d /etc _unbound && \
    ./configure \
        --disable-dependency-tracking \
        --prefix=/opt/unbound \
        --with-pthreads \
        --with-username=_unbound \
        --with-ssl=/opt/openssl \
        --with-libevent \
        --with-libnghttp2 \
        --enable-dnstap \
        --enable-tfo-server \
        --enable-tfo-client \
        --enable-event-api \
        --enable-subnet && \
    make install

Expected behavior
It should compile just like before the merge of #999

System:

  • Unbound version: source clone
  • OS: bullseye-slim
  • unbound -V output: N/A

Additional information

origami@rlabinctestlab:~$ which protoc-c
/usr/bin/protoc-c
origami@rlabinctestlab:~$ pkg-config --cflags libprotobuf-c

origami@rlabinctestlab:~$ pkg-config --libs libprotobuf-c
-lprotobuf-c
@origamiofficial
Copy link
Author

origamiofficial commented Feb 6, 2024

@wcawijngaards Hi, sorry to ping you but is there any workaround? If I reverse the last commit of configure or use c550bc1 it compiles fine!!

@wcawijngaards
Copy link
Member

You could --enable-systemd, that could accidentally work, or instead specify with a path, --with-protobuf-c=/usr. But my colleague has found the correct fix for this.

@gthess gthess closed this as completed in 93490a0 Feb 7, 2024
@gthess gthess self-assigned this Feb 7, 2024
@gthess
Copy link
Member

gthess commented Feb 7, 2024

Current master should work now. I included --enable-dnstap to the options that require pkg-config. Previously it would work only if one of the other pkg-config options (e.g., --enable-systemd) were defined during configure.

jedisct1 added a commit to jedisct1/unbound that referenced this issue Feb 14, 2024
* nlnet/master:
  - These fixes are part of the 1.19.1 release, that is a security   point release on 1.19.0, the code repository continues with these   fixes, with version number 1.19.2.
  - Fix CVE-2023-50868, NSEC3 closest encloser proof can exhaust CPU.
  - Fix CVE-2023-50387, DNSSEC verification complexity can be exploited to   exhaust CPU resources and stall DNS resolvers.
  - Fix documentation for access-control in the unbound.conf man page.
  - autoconf.
  - For NLnetLabs#1006: fix logic error introduced by previous fix.
  - autoheader, autoconf.
  - Fix NLnetLabs#1006: Can't find protobuf-c package since NLnetLabs#999.
  Autoconf and changelog note for NLnetLabs#999 - Merge NLnetLabs#999: Search for protobuf-c with pkg-config.
  Search for protobuf-c with pkg-config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants