Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • BIND BIND
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 529
    • Issues 529
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 98
    • Merge requests 98
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ISC Open Source Projects
  • BINDBIND
  • Issues
  • #3366
Closed
Open
Created May 18, 2022 by Michal Nowak@mnowakOwner

./configure fails to find "uv.h" on BSD

On FreeBSD and OpenBSD (and likely any system which has libuv headers installed outside of /usr/include) ./configure fails to find uv.h:

configure:18059: checking for libuv
configure:18063: checking for LIBUV
configure:18070: $PKG_CONFIG --exists --print-errors "libuv >= 1.0.0"
configure:18073: $? = 0
configure:18087: $PKG_CONFIG --exists --print-errors "libuv >= 1.0.0"
configure:18090: $? = 0
configure:18128: result: yes
configure:18134: checking whether UV_UDP_MMSG_FREE is declared
configure:18134: cc -c -g -O2 -pthread  conftest.c >&5
conftest.c:76:10: fatal error: 'uv.h' file not found
#include <uv.h>
         ^~~~~~

libuv is detected by pkg-config correctly:

$ pkg-config --modversion libuv
1.42.0
$ pkg-config --cflags libuv
-I/usr/local/include 
$ pkg-config --libs libuv
-L/usr/local/lib -luv 

This results in believing UV_UDP_* are undeclared in libuv:

checking for libuv... checking for libuv >= 1.0.0... yes
checking whether UV_UDP_MMSG_FREE is declared... no
checking whether UV_UDP_MMSG_CHUNK is declared... no
checking whether struct msghdr uses padding for alignment... no
checking whether UV_UDP_RECVMMSG is declared... no
checking whether UV_UDP_LINUX_RECVERR is declared... no

While they are present in /usr/local/include/uv.h:

$ grep -n -e UV_UDP_MMSG_FREE -e UV_UDP_MMSG_CHUNK -e UV_UDP_RECVMMSG -e UV_UDP_LINUX_RECVERR /usr/local/include/uv.h 
628:  UV_UDP_MMSG_CHUNK = 8,
634:  UV_UDP_MMSG_FREE = 16,
642:  UV_UDP_LINUX_RECVERR = 32,
646:  UV_UDP_RECVMMSG = 256

CFLAGS="-I/usr/local/include" ./configure identifies uv.h correctly:

checking for libuv... checking for LIBUV... yes
checking whether UV_UDP_MMSG_FREE is declared... yes
checking whether UV_UDP_MMSG_CHUNK is declared... yes
checking whether struct msghdr uses padding for alignment... no
checking whether UV_UDP_RECVMMSG is declared... yes
checking whether UV_UDP_LINUX_RECVERR is declared... yes
Assignee
Assign to
Time tracking