From netramet-owner Thu Dec 10 11:27:35 1998
Received: by mailhost.auckland.ac.nz (8.9.1/8.9.1/8.9.1-ua) id LAA07665
for netramet-outgoing; Thu, 10 Dec 1998 11:23:23 +1300 (NZDT)
Received: from fep2-orange.clear.net.nz (fep2-orange.clear.net.nz [203.97.32.2])
by mailhost.auckland.ac.nz (8.9.1/8.9.1/8.9.1-ua) with ESMTP id LAA07650
for <
[email protected]>; Thu, 10 Dec 1998 11:23:19 +1300 (NZDT)
Received: from buddha.clear.net.nz (buddha.clear.net.nz [192.168.24.106]) by fep2-orange.clear.net.nz (1.5/1.9) with ESMTP id LAA05499; Thu, 10 Dec 1998 11:22:47 +1300 (NZDT)
Received: (from jabley@localhost)
by buddha.clear.net.nz (8.9.1/8.9.1) id LAA06912;
Thu, 10 Dec 1998 11:22:47 +1300 (NZDT)
Message-ID: <
[email protected]>
Date: Thu, 10 Dec 1998 11:22:47 +1300
From: Joe Abley <
[email protected]>
To:
[email protected]
Cc:
[email protected]
Subject: NeTraMet 4.22 compile problem on Solaris 2.5.1
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 0.93.2i
Sender:
[email protected]
Precedence: bulk
Hi,
I've just found a problem building NeTraMet from source, using autoconf
on a SunOS 5.5.1 (sparc) machine. Configured using
./configure --prefix=/opt/NeTraMet
It appears that snmplib.a makes reference to the function "log_msg", which is
defined in ~src/manager/nmc_pars.c - and which is not linked into snmplib.a.
This causes the apps/snmptest.c to fail at the link stage:
make[1]: Entering directory `/opt/clearnet/tst/src/NeTraMet-4.22/src/NeTraMet422/autoconf/apps'
gcc -o snmptest snmptest.o -lresolv -lnsl -lsocket -lm -L/opt/NeTraMet/lib ../snmplib/libsnmp.a
Undefined first referenced
symbol in file
log_msg ../snmplib/libsnmp.a(mib.o)
ld: fatal: Symbol referencing errors. No output written to snmptest
Sure enough:
nm libsnmp.a | grep log
[65] | 0| 0|NOTY |GLOB |0 |UNDEF |log_msg
[52] | 0| 0|NOTY |GLOB |0 |UNDEF |log_msg
[64] | 0| 0|NOTY |GLOB |0 |UNDEF |log_msg
I was about to link in a copy of nmc_pars.o, when it occurred to me that
the log_msg function makes use of the global pointer "logfile", which
wouldn't exist in snmptest's world.
This looks like a problem - is it? Or am I being stupid?
jabley@intdev[297]% uname -a
SunOS intdev 5.5.1 Generic_103640-08 sun4u sparc SUNW,Ultra-1
jabley@intdev[298]% gcc --version
2.5.8
Joe
From netramet-owner Tue Dec 15 23:23:33 1998
Received: by mailhost.auckland.ac.nz (8.9.1/8.9.1/8.9.1-ua) id XAA21029
for netramet-outgoing; Tue, 15 Dec 1998 23:17:32 +1300 (NZDT)
Received: from taurus.cus.cam.ac.uk (
[email protected] [131.111.8.48])
by mailhost.auckland.ac.nz (8.9.1/8.9.1/8.9.1-ua) with ESMTP id XAA21024
for <
[email protected]>; Tue, 15 Dec 1998 23:17:27 +1300 (NZDT)
Received: from ajms by taurus.cus.cam.ac.uk with local-smtp (Exim 2.054 #1)
id 0zprXg-0004gG-00
for
[email protected]; Tue, 15 Dec 1998 10:17:24 +0000
To:
[email protected]
From: "Tony Stoneley" <
[email protected]>
Subject: srl: save attr=0
Date: Tue, 15 Dec 1998 10:17:23 +0100
Message-Id: <
[email protected]>
Sender:
[email protected]
Precedence: bulk
It appears that the SRL compiler (from the 4.2 distribution) treats
the value zero specially in "save attribute = value", generating
the same code as for plain "save attribute" rather than as for
non-zero value. E.g.
save sourcetransaddress = 0;
save sourcetransaddress = 1;
produces
vvv
sourcetransaddress & 255.255 = 0.0: pushpkttoact, next;
sourcetransaddress & 255.255 = 0.1: pushtoact, next;
Is this a bug or a feature? I can't immediately spot any mention
of special case in draft-ietf-rtfm-ruleset-language-03.
[It's not a problem to me - I was simply trying to use 0 as a special
value myself - but having tripped up I'd like to know how the land
lies.]
--
Tony Stoneley Email:
[email protected]
Computing Service Phone: +44 1223 334710
Cambridge University
From netramet-owner Wed Dec 16 16:03:49 1998
Received: by mailhost.auckland.ac.nz (8.9.1/8.9.1/8.9.1-ua) id QAA25803
for netramet-outgoing; Wed, 16 Dec 1998 16:02:04 +1300 (NZDT)
Received: from n.browlee5.itss.auckland.ac.nz (n.brownlee5.itss.auckland.ac.nz [130.216.4.79])
by mailhost.auckland.ac.nz (8.9.1/8.9.1/8.9.1-ua) with SMTP id QAA25770;
Wed, 16 Dec 1998 16:01:53 +1300 (NZDT)
From: Nevil Brownlee <
[email protected]>
To: Tony Stoneley <
[email protected]>
Cc:
[email protected]
Subject: Re: srl: save attr=0
Message-ID: <
[email protected]>
Date: Wed, 16 Dec 1998 16:16:38 +1300 (New Zealand Daylight Time)
Priority: NORMAL
X-Mailer: Simeon for Win32 Version 4.1.4 Build (40)
X-Authentication: none
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Sender:
[email protected]
Precedence: bulk
Hello Tony:
> save sourcetransaddress = 0;
> save sourcetransaddress = 1;
>
> produces
> vvv
> sourcetransaddress & 255.255 = 0.0: pushpkttoact, next;
> sourcetransaddress & 255.255 = 0.1: pushtoact, next;
>
> Is this a bug or a feature? I can't immediately spot any mention
> of special case in draft-ietf-rtfm-ruleset-language-03.
This was a bug - the compiler wasn't distinguishing between
save sourcetransaddress;
and
save sourcetransaddress = 0;
I'll correct this on the next release (which will be 4.3b6).
Thanks very much, Nevil
+---------------------------------------------------------------------+
| Nevil Brownlee Director, Technology Development |
| Phone: +64 9 373 7599 x8941 ITSS, The University of Auckland |
| FAX: +64 9 373 7021 Private Bag 92019, Auckland, New Zealand |
+---------------------------------------------------------------------P