[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[altq 427] Re: Altq-2.1 and rsvp tools link errors
Let me try this again without MS outlook helping me format
the message <g> Hopefully, this will be formatted better.
>> I guess you just had old object files. Try "make
clean".
I tried "make clean", no luck.
>> The rsvp package uses "log()" for logging messages. The
function is
>> defined in rsvp_debug.c.
I saw that log() exists in rsvp_debug.c
What I see the problem as it that the "calls" to OUT0, OUT1
etc. translate to calls to log(), which translate to calls to log_write()
via the rsvpd Makefile (after applying the altq patches). The log_write()
function is defined in altq-2.1/altqd/altqd.c
The problem is that the rsvp tools (in the rel4.2a4/tools
directory) do not have an obj/lib to link against to resolve log_write()
calls.
>> As you pointed out, this name conflicts with the
logarithm function
>> name in the math library, and could have nasty side
effects if you
>> want to use the math library.
>> So, I modified Makefile to rename log() to log_write()
by C
>> preprocesser to avoid the conflict.
>> If you compile rsvp_debug.c, the original log() function
should be
>> compiled as log_write().
Are you saying that the log() calls made in rsvp_debug.c are meant to become
log_write() calls and that the log_write() function defined in the file
altq-2.1/altqd/altq.c is not used?
I can live with that, especially since the rsvp distribution was built to
use its own log() call. However, in either case I have the following
problems:
1) the linker still does not resolve log_write() calls to either
altqd/altq.c(log_write) nor rsvpd/rsvp_debug.c(log)
2) the logarithm function call to log() in rsvpd_specs.c(math_log) is
now translated to log_write(), when in fact the logarithm call is needed.
Thanks,
MikeC
Cambria, Mike wrote:
> Hi,
>
> I've installed altq-2.1 on FreeBSD-3.4-Release as well as
RSVP
> (rsvpd.rel4.2a4-1.tar) from ISI as instructed in the
rsvpd-kit directory.
> After applying the patch as instructed in the README, I
get link errors in
> the tools directory. Altq itself and rsvpd (with the api
programs in the
> apitools directory) work.
>
> The link errors result from the definition of log as
log_write. Did I
> missed something? Did I screw something up? I know I can
work around these
> problems, but do others see the same thing? I so, I
wanted to call it to
> your attention. If I am the only one, I will start
looking for what I did
> wrong.
>
> The first case looks like it is simply the log() function
being redefined
> from the logarithm lib call to the log_write call.
>
> The second case is altq defining where logging is to be
done. However, altq
> never patched this function into the rsvp distribution.
The function
> log_write does exist, in altqd.c, but doesn't end up in
libaltq (which rsvpd
> does link against.)
>
> The errors are shown below:
>
> bash-2.03# make
> ../bin/loader gcc -g -Wall -I../rsvpd -DRSVP_DIAG
-L../rsvpd -o rstat
> rstat.o -lutil -lrsvp -lm
> ../rsvpd/libutil.a(rsvp_specs.o): In function `math_log':
> /usr/local/rel4.2a4/rsvpd/rsvp_specs.c(.text+0x251e):
undefined reference to
> `log_write'
> ../rsvpd/libutil.a(rsvp_print.o): In function
`rsvp_print_pkt':
> /usr/local/rel4.2a4/rsvpd/rsvp_print.c:123: undefined
reference to
> `log_write'
> /usr/local/rel4.2a4/rsvpd/rsvp_print.c:126: undefined
reference to
> `log_write'
> /usr/local/rel4.2a4/rsvpd/rsvp_print.c:128: undefined
reference to
> `log_write'
> /usr/local/rel4.2a4/rsvpd/rsvp_print.c:136: undefined
reference to
> `log_write'
>
../rsvpd/libutil.a(rsvp_print.o):/usr/local/rel4.2a4/rsvpd/rsvp_print.c:138:
> more undefined references to `log_write' follow
> *** Error code 1
>
>
> Thanks,
> MikeC
>