[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[altq 426] Re: Altq-2.1 and rsvp tools link errors
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
defined in rsvp_debug.c.
I saw that log() exists in rsvp_debug,c
What I see the problem is that OUT0, OUT1 etc. translates to
log(), which translates to log_write() via the rsvpd Makefile (after
applying altq patches). The log_write() function is defined in
The problem is that the rsvp tools do not have an obj/lib to
link against to resolve log_write() calls.
As you pointed out, this name conflicts with the logarithm
name in the math library, and could have nasty side effects
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
compiled as log_write().
Are you saying that the log() calls made in rsvp_debug.c are
meant to become log_write() and that the log_write() call in the file
altq-2.1/altqd/altqd.c is not used?
I can live with that, especially since rsvp was built to use
its own log() call. However, in either case:
1) the linker still does not resolve to either altqd/altq.c(log_write)
2) the logarithm function call in rsvpd_specs.c(math_log) is now
translated to log_write
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