Skip to content

Instantly share code, notes, and snippets.

@githubutilities
Last active January 31, 2023 10:09
Show Gist options
  • Select an option

  • Save githubutilities/2aaa96783652dad1a4a1 to your computer and use it in GitHub Desktop.

Select an option

Save githubutilities/2aaa96783652dad1a4a1 to your computer and use it in GitHub Desktop.
Avahi build error log on Mac OS X Mavericks

According to wikipedia, Avahi is a free zero-configuration networking (zeroconf) implementation, including a system for multicast DNS/DNS-SD service discovery.

  1. build dependent libs, refer to avahi download page
  • gettext
    brew link --force gettext
    brew unlink gettext
  • intltool
  • glib need link
  • libdaemon
  1. disable gui and python, refer to linux from scratch and askubuntu
./configure --disable-qt3 --disable-qt4       \
            --disable-gtk --disable-gtk3      \
            --disable-python                  \
            --disable-mono --disable-monodoc  \
            --enable-core-docs                \
            --disable-dbus                    \ 
            --prefix=/Users/will/Downloads/avahi-0.6.31/build      \
            --sysconfdir=/Users/will/Downloads/avahi-0.6.31/etc    \
            --localstatedir=/Users/will/Downloads/avahi-0.6.31/var \
  1. make, which I got a error
socket.c:609:27: error: use of undeclared identifier 'IPV6_PKTINFO'
        cmsg->cmsg_type = IPV6_PKTINFO;
socket.c:869:22: error: use of undeclared identifier 'IPV6_HOPLIMIT'
                case IPV6_HOPLIMIT:
socket.c:878:22: error: use of undeclared identifier 'IPV6_PKTINFO'
                case IPV6_PKTINFO: {

for IPV6_PKTINFO please refer to apple opensource .h file

@ayush-yadav001
Copy link

hi @artificiel i am facing same issue can you please tell me where i need to add this flag

@artificiel
Copy link

hello! i'm currently not in a setup to try this but i believe it's only a matter of starting the configure with the CFLAGS so

./configure CFLAGS=-D__APPLE_USE_RFC_2292 --disable-qt3 --disable-qt4 (...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment