Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Dec 2010 16:18:43 +0100
From:      Dimitry Andric <dim@FreeBSD.org>
To:        syrinx@FreeBSD.org
Cc:        src-committers@freebsd.org, Pawel Worach <pawel.worach@gmail.com>, ed@freebsd.org, Garrett Cooper <gcooper@freebsd.org>, svn-src-head@freebsd.org, svn-src-all@freebsd.org, rdivacky@freebsd.org
Subject:   Re: svn commit: r216295 - in head/usr.sbin/bsnmpd: . tools tools/bsnmptools tools/libbsnmptools
Message-ID:  <4D04E7D3.3060308@FreeBSD.org>
In-Reply-To: <AANLkTinTeeLD80eMRPdR6tigvsSSmpAefBHvaWn_VGRS@mail.gmail.com>
References:  <201012081430.oB8EUP8J006067@svn.freebsd.org>	<5A7A3A47-18EF-4634-AA83-1501EF433A57@gmail.com>	<AANLkTim1r-aY1cBALEOxOms=0U==g7dwtzdpWHG5%2BPbP@mail.gmail.com> <AANLkTinTeeLD80eMRPdR6tigvsSSmpAefBHvaWn_VGRS@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On 2010-12-11 16:42, Shteryana Shopova wrote:
> This is now fixed. However I wouldn't expect bsnmpd(1) compiled with
> clang to work - it didn't run last time I checked several months ago,
> and I still get the same error -
>
> udo /usr/sbin/bsnmpd -d -c /root/snmpd.config
> snmpd[80050]: lm_load: open /usr/lib/snmp_mibII.so: Undefined symbol
> "oid_zeroDotZero"
> snmpd[80050]: init dep failed: 13 1.3.6.1.4.1.12325.1.1.1.6 5.109.105.98.73.73
> snmpd[80050]: error in config file
>
> bsnmpd(1) uses export-dynamic flag

Can you please try the attached patch, which makes clang pass the
-export-dynamic flag to the linker properly?

[-- Attachment #2 --]
diff --git a/usr.sbin/bsnmpd/bsnmpd/Makefile b/usr.sbin/bsnmpd/bsnmpd/Makefile
index f7e9b23..80b14e2 100644
--- a/usr.sbin/bsnmpd/bsnmpd/Makefile
+++ b/usr.sbin/bsnmpd/bsnmpd/Makefile
@@ -31,7 +31,7 @@ CFLAGS+= -DHAVE_STDINT_H -DHAVE_INTTYPES_H -DHAVE_ERR_H -DHAVE_STRLCPY
 DPADD=	${LIBBEGEMOT} ${LIBBSNMP} ${LIBWRAP}
 LDADD=	-lbegemot -lbsnmp -lwrap
 
-LDFLAGS= -export-dynamic
+LDFLAGS= -Wl,-export-dynamic
 
 .if ${MK_OPENSSL} != "no"
 CFLAGS+= -DHAVE_LIBCRYPTO

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D04E7D3.3060308>