Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Dec 2010 17:42:23 +0200
From:      Shteryana Shopova <syrinx@FreeBSD.org>
To:        Garrett Cooper <gcooper@freebsd.org>
Cc:        src-committers@freebsd.org, ed@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:  <AANLkTinTeeLD80eMRPdR6tigvsSSmpAefBHvaWn_VGRS@mail.gmail.com>
In-Reply-To: <AANLkTim1r-aY1cBALEOxOms=0U==g7dwtzdpWHG5%2BPbP@mail.gmail.com>
References:  <201012081430.oB8EUP8J006067@svn.freebsd.org> <5A7A3A47-18EF-4634-AA83-1501EF433A57@gmail.com> <AANLkTim1r-aY1cBALEOxOms=0U==g7dwtzdpWHG5%2BPbP@mail.gmail.com>

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

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 and dlopen() to load its modules
runtime, but for some reason that does not work if bsnmpd(1) is
compiled with clang. Obviosly the oid_zeroDotZero OID defined in the
bsnmpd main binary is not available in the snmp_mibII(3) or any other
module that uses it. I am not sure where exactly the problems is.

cheers,
Shteryana

On 12/10/10, Garrett Cooper <gcooper@freebsd.org> wrote:
> On Fri, Dec 10, 2010 at 11:07 AM, Pawel Worach <pawel.worach@gmail.com>
> wrote:
>> On Dec 8, 2010, at 15:30, Shteryana Shopova wrote:
>>> Author: syrinx
>>> Date: Wed Dec  8 14:30:25 2010
>>> New Revision: 216295
>>> URL: http://svn.freebsd.org/changeset/base/216295
>>>
>>> Log:
>>>  Add bsnmpd(1)'s SNMP client tools (including SNMPv3 support) to the base
>>> system.
>>>
>>>  Sponsored by:   The FreeBSD Foundation (the SNMPv3 bits), Google Summer
>>> of Code 2005
>>>  Reviewed by:    philip@ (mostly), bz@ (earlier version based on p4
>>> ch124545)
>>>  Approved by:    philip@
>>>
>>> Added:
>>>  head/usr.sbin/bsnmpd/tools/libbsnmptools/Makefile   (contents, props
>>> changed)
>>
>>
>> Hi,
>>
>> In bsnmpd/tools/libbsnmptools/Makefile you set CFLAGS+= -g -Wall -Werror
>
> And it's just plain wrong in the first place; if you want to specify
> -g, etc please use DEBUG_FLAGS.
>
>> this breaks the build with clang even with NO_WERROR=1 set, you probably
>> want so this instead:
>>
>> WARNS?= <level>
>>
>> ps.
>> The warnings with clang are:
>> /data/buildslave/freebsd-clang-amd64/src-freebsd/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c:620:50:
>> error: comparison of unsigned expression < 0 is always false
>> [-Wtautological-compare]
>>                            snmp_client.cengine, SNMP_ENGINE_ID_SIZ)) < 0)
>> {
>>                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
>> /data/buildslave/freebsd-clang-amd64/src-freebsd/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c:658:38:
>> error: comparison of unsigned expression < 0 is always false
>> [-Wtautological-compare]
>>                        if (snmp_client.engine.engine_len < 0) {
>>                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
>
> Thanks,
> -Garrett
>



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