[MacPorts] #61624: net-snmp @5.8 fails to compile on Big Sur / Xcode 12.2

MacPorts noreply at macports.org
Sun Nov 22 19:17:02 UTC 2020


#61624: net-snmp @5.8 fails to compile on Big Sur / Xcode 12.2
-----------------------+----------------------
 Reporter:  Prolixium  |      Owner:  (none)
     Type:  defect     |     Status:  new
 Priority:  Normal     |  Milestone:
Component:  ports      |    Version:
 Keywords:             |       Port:  net-snmp
-----------------------+----------------------
 From what I can tell on a fresh install of macOS Big Sur (11.0.1) and
 Xcode 12.2 w/MacPorts 2.6.4, net-snmp 5.8 fails to compile:

 {{{
 /bin/sh ../../libtool  --mode=compile /usr/bin/clang -I../../include -I.
 -I../../agent -I../../agent/mibgroup  -I../../snmplib -I/opt/local/include
 -I/opt/local/include
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk  -pipe
 -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk -arch
 x86_64 -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -DNETSNMP_REMOVE_U64
 -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk
 -arch x86_64 -Udarwin20 -Ddarwin20=darwin20  -c -o mibII/ipAddr.lo
 mibII/ipAddr.c
 mibgroup/mibII/ipAddr.c:200:29: error: variable has incomplete type
 'struct in_ifaddr'
     static struct in_ifaddr in_ifaddr, lowin_ifaddr;
                             ^
 mibgroup/mibII/ipAddr.c:200:19: note: forward declaration of 'struct
 in_ifaddr'
     static struct in_ifaddr in_ifaddr, lowin_ifaddr;
                   ^
 mibgroup/mibII/ipAddr.c:200:40: error: variable has incomplete type
 'struct in_ifaddr'
     static struct in_ifaddr in_ifaddr, lowin_ifaddr;
                                        ^
 mibgroup/mibII/ipAddr.c:200:19: note: forward declaration of 'struct
 in_ifaddr'
     static struct in_ifaddr in_ifaddr, lowin_ifaddr;
                   ^
 mibgroup/mibII/ipAddr.c:204:25: error: variable has incomplete type
 'struct ifnet'
     static struct ifnet ifnet;
                         ^
 mibgroup/mibII/ipAddr.c:204:19: note: forward declaration of 'struct
 ifnet'
     static struct ifnet ifnet;
                   ^
 mibgroup/mibII/var_route.c:195:29: error: implicit declaration of function
 'get_in_address' is invalid in C99 [-Werror,-Wimplicit-function-
 declaration]
             cp = (u_char *) get_in_address((struct sockaddr *) (rtp + 1),
                             ^
 3 errors generated.
 mibgroup/mibII/var_route.c:195:18: warning: cast to 'u_char *' (aka
 'unsigned char *') from smaller integer type 'int' [-Wint-to-pointer-cast]
             cp = (u_char *) get_in_address((struct sockaddr *) (rtp + 1),
                  ^
 mibgroup/mibII/var_route.c:235:27: error: implicit declaration of function
 'get_in_address' is invalid in C99 [-Werror,-Wimplicit-function-
 declaration]
         return (u_char *) get_in_address((struct sockaddr *) (rtp + 1),
                           ^
 mibgroup/mibII/var_route.c:235:16: warning: cast to 'u_char *' (aka
 'unsigned char *') from smaller integer type 'int' [-Wint-to-pointer-cast]
         return (u_char *) get_in_address((struct sockaddr *) (rtp + 1),
                ^
 mibgroup/mibII/var_route.c:269:13: warning: cast to 'u_char *' (aka
 'unsigned char *') from smaller integer type 'int' [-Wint-to-pointer-cast]
         return (u_char *) get_in_address((struct sockaddr *) (rtp + 1),
                ^
 mibgroup/mibII/var_route.c:299:20: warning: cast to 'u_char *' (aka
 'unsigned char *') from smaller integer type 'int' [-Wint-to-pointer-cast]
             return (u_char *) get_in_address((struct sockaddr *) (rtp +
 1),
                    ^
 mibgroup/mibII/var_route.c:2110:1: error: conflicting types for
 'get_in_address'
 get_in_address(const void *ap, int addresses, int wanted)
 ^
 mibgroup/mibII/var_route.c:195:29: note: previous implicit declaration is
 here
             cp = (u_char *) get_in_address((struct sockaddr *) (rtp + 1),
                             ^
 4 warnings and 3 errors generated.
 }}}

 If I'm reading the port summary page correctly, there might not be a
 working build for Catalina either, and Mojave was the last OS where the
 port built successfully.

 I'm attaching net-snmp-build.txt that shows all the messages from the
 failed build.

 Please let me know if there's anything I should try or anything additional
 I can include in this ticket.  Thanks!

-- 
Ticket URL: <https://trac.macports.org/ticket/61624>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list