Ticket #59 (closed defect: fixed)

Opened 7 years ago

Last modified 6 years ago

avahi >=0.6.11 won't compile on NetBSD

Reported by: adrianp Owned by: lennart
Milestone: Avahi 0.6.15 Component: avahi-core
Keywords: Cc:

Description

Avahi 0.6.11 or later fails to compile on NetBSD. The following is the output from a build of 0.6.13 on NetBSD 3 (i386). Looking at the changelog and associated files i _think_ the port to solaris make have broken something.

cc -DHAVE_CONFIG_H -I. -I.. -I/usr/pkgsrc/wip/avahi/work/.buildlink/include "-DDEBUG_TRAP=asm(\"int \$3\")" -O2 -std=c99 -Wall -W -pedantic -pipe -Wformat -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Winline -MT libavahi_core_la-iface-pfroute.lo -MD -MP -MF .deps/libavahi_core_la-iface-pfroute.Tpo -c iface-pfroute.c -fPIC -DPIC -o .libs/libavahi_core_la-iface-pfroute.o

iface-pfroute.c:347: warning: `struct lifreq' declared inside parameter list iface-pfroute.c:347: warning: its scope is only this definition or declaration, which is probably not what you want iface-pfroute.c: In function `if_add_interface': iface-pfroute.c:351: error: storage size of `lifrcopy' isn't known iface-pfroute.c:352: warning: declaration of `index' shadows a global declaration /usr/include/strings.h:61: warning: shadowed declaration is here iface-pfroute.c:362: error: dereferencing pointer to incomplete type iface-pfroute.c:364: warning: implicit declaration of function `ioctl' iface-pfroute.c:364: error: `SIOCGLIFFLAGS' undeclared (first use in this function) iface-pfroute.c:364: error: (Each undeclared identifier is reported only once iface-pfroute.c:364: error: for each function it appears in.) iface-pfroute.c:370: warning: redundant redeclaration of `ioctl' in same scope iface-pfroute.c:364: warning: previous declaration of `ioctl' iface-pfroute.c:370: error: `SIOCGLIFMTU' undeclared (first use in this function) iface-pfroute.c:376: warning: redundant redeclaration of `ioctl' in same scope iface-pfroute.c:364: warning: previous declaration of `ioctl' iface-pfroute.c:380: error: dereferencing pointer to incomplete type iface-pfroute.c:381: warning: redundant redeclaration of `ioctl' in same scope iface-pfroute.c:364: warning: previous declaration of `ioctl' iface-pfroute.c:381: error: `SIOCGLIFNETMASK' undeclared (first use in this function) iface-pfroute.c:385: error: dereferencing pointer to incomplete type iface-pfroute.c:387: error: dereferencing pointer to incomplete type iface-pfroute.c:392: error: dereferencing pointer to incomplete type iface-pfroute.c:399: error: dereferencing pointer to incomplete type iface-pfroute.c:411: error: dereferencing pointer to incomplete type iface-pfroute.c:351: warning: unused variable `lifrcopy' iface-pfroute.c:360: warning: unused variable `caddr' iface-pfroute.c:347: warning: unused parameter `count' iface-pfroute.c: In function `avahi_interface_monitor_sync': iface-pfroute.c:480: error: storage size of `lifn' isn't known iface-pfroute.c:481: error: storage size of `lifc' isn't known iface-pfroute.c:491: error: `SIOCGLIFNUM' undeclared (first use in this function) iface-pfroute.c:495: error: invalid application of `sizeof' to an incomplete type iface-pfroute.c:502: warning: redundant redeclaration of `ioctl' in same scope iface-pfroute.c:491: warning: previous declaration of `ioctl' iface-pfroute.c:502: error: `SIOCGLIFCONF' undeclared (first use in this function) iface-pfroute.c:508: error: invalid application of `sizeof' to an incomplete type iface-pfroute.c:509: warning: passing arg 1 of `if_add_interface' from incompatible pointer type iface-pfroute.c:510: error: increment of pointer to unknown structure iface-pfroute.c:510: error: arithmetic on pointer to an incomplete type iface-pfroute.c:478: warning: unused variable `ret' iface-pfroute.c:480: warning: unused variable `lifn' iface-pfroute.c:481: warning: unused variable `lifc' iface-pfroute.c: At top level: iface-pfroute.c:325: warning: `ip6_masklen' defined but not used gmake[2]: *** [libavahi_core_la-iface-pfroute.lo] Error 1 gmake[2]: Leaving directory `/usr/pkgsrc/wip/avahi/work/avahi-0.6.13/avahi-core' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/usr/pkgsrc/wip/avahi/work/avahi-0.6.13' gmake: *** [all] Error 2 *** Error code 2

Stop. make: stopped in /usr/pkgsrc/wip/avahi *** Error code 1

Stop. make: stopped in /usr/pkgsrc/wip/avahi

Attachments

netbsd-patches.tar.bz2 Download (4.9 KB) - added by DanielSHaischt 7 years ago.
patch files that do re-enable NetBSD support in Avahi

Change History

Changed 7 years ago by lennart

I fear there's not much we (the Avahi developers) can do about this. None of us runs NetBSD. Seems some Solaris patch we merged broke NetBSD support. At this point we cannot simply revert this patch, because that would break the build on Solaris again. Unless some NetBSD guy takes enough interest to prepare a working patch, NetBSD support will stay broken.

I am sorry.

Changed 7 years ago by DanielSHaischt

I am confirming herby, that I am getting the same error if compiling iface-pfroute from avahi-0.6.14.

Changed 7 years ago by DanielSHaischt

according to ...

->  http://www.mail-archive.com/avahi@lists.freedesktop.org/msg00499.html

... you did add ...

* static int ip6_masklen

* static void if_add_interface

... in Avahi 0.6.11 (?) to support Solaris. Unfortunatly this breaks *BSD compiles. I am wondering if it would compile on FreeBSD.

As it seems the first error occures cause the type lifreq isn't defined on FreeBSD systems.

Changed 7 years ago by DanielSHaischt

okay I would say ifreq, ifconf etc. exists on *BSD systems but not lifreq, lifconf etc.

Changed 7 years ago by DanielSHaischt

patch files that do re-enable NetBSD support in Avahi

Changed 7 years ago by lennart

  • status changed from new to closed
  • resolution set to fixed

(In [1328]) Fix build on NetBSD. Patch contributed by Daniel S. Haischt (closes #59)

Changed 6 years ago by lennart

  • milestone set to Avahi 0.6.15
Note: See TracTickets for help on using tickets.