[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
I tried "make clean", no luck.
>> The rsvp package uses "log()" for logging messages. The
>> 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()
>> As you pointed out, this name conflicts with the
>> 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()
>> preprocesser to avoid the conflict.
>> If you compile rsvp_debug.c, the original log() function
>> 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
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.
Cambria, Mike wrote:
> I've installed altq-2.1 on FreeBSD-3.4-Release as well as
> (rsvpd.rel4.2a4-1.tar) from ISI as instructed in the
> 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
> The first case looks like it is simply the log() function
> 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.
> 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':
undefined reference to
> ../rsvpd/libutil.a(rsvp_print.o): In function
> /usr/local/rel4.2a4/rsvpd/rsvp_print.c:123: undefined
> /usr/local/rel4.2a4/rsvpd/rsvp_print.c:126: undefined
> /usr/local/rel4.2a4/rsvpd/rsvp_print.c:128: undefined
> /usr/local/rel4.2a4/rsvpd/rsvp_print.c:136: undefined
> more undefined references to `log_write' follow
> *** Error code 1