pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/43288: net/net-snmp fails to compile on NetBSD 4.0



>Number:         43288
>Category:       pkg
>Synopsis:       net/net-snmp fails to compile on NetBSD 4.0
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue May 11 13:25:00 +0000 2010
>Originator:     Robert Elz
>Release:        NetBSD 4.0 / i386   (pkgsrc current 2010-05-11)
>Organization:
        Prince of Songkla University
>Environment:
System: NetBSD jade.coe.psu.ac.th 4.0_STABLE NetBSD 4.0_STABLE 
(JADE-1.696-20080517) #9: Fri May 23 18:55:13 ICT 2008 
kre%jade.coe.psu.ac.th@localhost:/usr/obj/4/kernels/JADE i386
Architecture: i386
Machine: i386
>Description:
        The recent changes to net/net-snmp to support fetching stats via
        sysctl (as requored by netbsd current apparently) break the build
        on NetBSD 4.0  ... the code attempts to use the new (sysctl) way to
        fetch stats which does not exist until 4.99.something

>How-To-Repeat:
        I use pkg_comp with NetBSD 4.0 release sets installed (and pkgsrc
        modular xorg, but that's not relevant here, nor is use of libkver
        to get an apparent 4.0 release version identity even though the
        actual kernel running is slightly newer than that).

        In that environment ...

libtool: compile:  cc -I../../include -I. -I../../agent -I../../agent/mibgroup 
-I../../snmplib -DNETSNMP_ENABLE_IPV6 -O2 -Dnetbsd1 -Unetbsdelf 
-Dnetbsdelf=netbsdelf -fno-strict-aliasing -pipe -fstack-protector 
-I/pkg_comp/obj/pkgsrc/net/net-snmp/4x/.buildlink/lib/perl5/5.10.0/i386-netbsd-thread-multi/CORE
 -c mibII/ip.c  -fPIC -DPIC -o mibII/.libs/ip.o
mibII/ip.c: In function 'ip_handler':
mibII/ip.c:296: error: invalid use of undefined type 'struct ip_mib'
mibII/ip.c:300: error: invalid use of undefined type 'struct ip_mib'
mibII/ip.c:304: error: invalid use of undefined type 'struct ip_mib'
mibII/ip.c:307: error: invalid use of undefined type 'struct ip_mib'
mibII/ip.c:310: error: invalid use of undefined type 'struct ip_mib'
mibII/ip.c:313: error: invalid use of undefined type 'struct ip_mib'
mibII/ip.c:316: error: invalid use of undefined type 'struct ip_mib'
mibII/ip.c:319: error: invalid use of undefined type 'struct ip_mib'
mibII/ip.c:322: error: invalid use of undefined type 'struct ip_mib'
mibII/ip.c:325: error: invalid use of undefined type 'struct ip_mib'
mibII/ip.c:328: error: invalid use of undefined type 'struct ip_mib'
mibII/ip.c:331: error: invalid use of undefined type 'struct ip_mib'
mibII/ip.c:334: error: invalid use of undefined type 'struct ip_mib'
mibII/ip.c:338: error: invalid use of undefined type 'struct ip_mib'
mibII/ip.c:341: error: invalid use of undefined type 'struct ip_mib'
mibII/ip.c:344: error: invalid use of undefined type 'struct ip_mib'
mibII/ip.c:347: error: invalid use of undefined type 'struct ip_mib'
mibII/ip.c:350: error: invalid use of undefined type 'struct ip_mib'
mibII/ip.c:353: error: invalid use of undefined type 'struct ip_mib'
mibII/ip.c:356: error: invalid use of undefined type 'struct ip_mib'
mibII/ip.c: In function 'ip_free':
mibII/ip.c:987: error: invalid application of 'sizeof' to incomplete type 
'struct ip_mib' 
*** Error code 1

Stop.
make: stopped in 
/pkg_comp/obj/pkgsrc/net/net-snmp/4x/net-snmp-5.4.2.1/agent/mibgroup
*** Error code 1

Stop.

>Fix:
        No idea - no simple change I tried helped - including changing
        include/net-snmp/system/netbsd.h so it only goes into "netbsd4"
        mode with __NetBSD_VERSION__ >= 499005800 (rather than 400000000)
        to match the test in agent/mibgroup/mibII/kernel_netbsd.h

        The code to make it work on newer NetBSD's seems to have broken
        the compile on NetBSD 4 (no idea about earlier NetBSD's but they're
        not required to be supported any more anyway).

        Can we rethink just how/where the paching is done, and what is
        tested, to ensure that we keep doing things the old way on
        NetBSD 4.x ?



Home | Main Index | Thread Index | Old Index