Subject: Re: net/net-snmp build failure on darwin
To: Mark E. Perkins <perkinsm@bway.net>
From: Adrian Portelli <adrianp@stindustries.net>
List: tech-pkg
Date: 10/08/2004 15:51:17
I built this a few days ago myself (Darwin 7.5.0 / MacOS X 10.3.5) 
without any problems so if something has broken, it must have happened 
in the last week or so.  I'll have to do another update and try to build 
it again.

Also, I had the ethereal build bail on me with libpcap errors when i 
tried to do it.  I've attached the patch that fixed it for me and i'd be 
interested to know if you have the same issue.  Please let me know if it 
fails and if the patch fixes the issue I'll commit it.

thanks,

adrian.

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/net/ethereal/Makefile,v
retrieving revision 1.97
diff -u -r1.97 Makefile
--- Makefile    3 Oct 2004 00:17:51 -0000       1.97
+++ Makefile    8 Oct 2004 14:43:59 -0000
@@ -42,6 +42,12 @@

  PTHREAD_OPTS=          require

+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "Darwin"
+USE_BUILTIN.libpcap=   no
+.endif
+
  .include "../../devel/zlib/buildlink3.mk"
  .include "../../net/libpcap/buildlink3.mk"
  .include "../../net/net-snmp/buildlink3.mk"


Mark E. Perkins wrote:

> I'm trying to update net/ethereal, which requires net/net-snmp, and I 
> get the errors shown below during the net-snmp build. Problem is that I 
> can't find where the undefined symbols should actually be defined.
> 
> I have a (semi-urgent) need for ethereal, so was hoping someone has a 
> quick fix for this.
> 
> This is Darwin 7.5.0 / MacOS X 10.3.5, pkgsrc updated yesterday (6 Oct).
> 
> Any clues?
> 
> Thanks,
> Mark
> 
> ---------------
> 
>  gcc -I../include -I.. -I./.. -I./../snmplib -I. -I./mibgroup -Imibgroup 
> -no-cpp-precomp 
> -I/Volumes/NetBSD/pkgsrc/net/net-snmp/work/.buildlink/include -O2 
> -Ddarwin -c snmpd.c -o snmpd.o >/dev/null 2>&1
> /bin/sh ../libtool --mode=link gcc -O2 -I/usr/include 
> -I/Volumes/NetBSD/pkg/include -Ddarwin -o snmpd snmpd.lo  -L/usr/lib 
> -L/Volumes/NetBSD/pkg/lib libnetsnmpagent.la  libnetsnmpmibs.la 
> helpers/libnetsnmphelpers.la  -lwrap ../snmplib/libnetsnmp.la -ldl -lkvm 
> -lz -lcrypto -lm
> gcc -O2 -I/Volumes/NetBSD/pkgsrc/net/net-snmp/work/.buildlink/include 
> -Ddarwin -o .libs/snmpd .libs/snmpd.o 
> -L/Volumes/NetBSD/pkgsrc/net/net-snmp/work/.buildlink/lib 
> ./.libs/libnetsnmpagent.dylib ./.libs/libnetsnmpmibs.dylib 
> helpers/.libs/libnetsnmphelpers.dylib -lwrap 
> ../snmplib/.libs/libnetsnmp.dylib -ldl -lkvm -lz -lcrypto -lm
> ld: Undefined symbols:
> _get_address
> _get_in_address
> *** Error code 1
> 
> Stop.
> bmake: stopped in 
> /Volumes/NetBSD/pkgsrc/net/net-snmp/work/net-snmp-5.1.2/agent
> *** Error code 1
> 
> Stop.
> bmake: stopped in /Volumes/NetBSD/pkgsrc/net/net-snmp/work/net-snmp-5.1.2
> *** Error code 1
> 
> Stop.
> bmake: stopped in /usr/pkgsrc/net/net-snmp
> *** Error code 1
> 
> Stop.
> bmake: stopped in /usr/pkgsrc/net/net-snmp
> 
>