[mrtg] MRTG 2.9.27 Fails to Build on Digital Unix 4.0D and Tru64 5.1A

Vic Summerour vicsum at swbell.net
Tue Apr 1 01:29:45 MEST 2003

When attempting to build the latest MRTG, 2.9.27, on either Digital Unix 
4.0 or Tru64 5.1A, the following messages are displayed from configure as 
it halts.

checking for unistd.h... yes
checking for unsigned long long... yes
checking for long long... yes
checking for strtoll... no
checking for sqrt in -lm... yes
checking for acos in -lm... yes
checking if long long works here... nope

** Ooops, your compiler seems to have issues with long long:

    figure out how to get long long, printf with %lld and
    strtoll working on your platform.
    probably the  config.log file can give you a hint.

Since Digital Unix aka Tru64 aka OSF/1 is a real 64 bit OS, there is no 
%lld format or no strtoll routine as they are not necessary (except for 
compatibility).  The Digital compiler(s) do allow for "long long" and it is 
equivalent to "long", i.e., both are 64 bits.  I have not tried using gcc, 
but I would suspect the same thing.

Both %ld and strtol support 64 bit words.

A change in the configure script as indicated below allowed the script to 
complete successfully.

<    i=strtoll(val,NULL,10);
<    if (sprintf(x,"%lld",i) < 0) {
 > /* i=strtoll(val,NULL,10); */
 >    i=strtol(val,NULL,10);
 > /* if (sprintf(x,"%lld",i) < 0) { */
 >    if (sprintf(x,"%ld",i) < 0) {

With the following change in rateup.c, it will successfully compile, link, 
and run.

< #define LLD "%lld"
 > #define LLD "%ld"
 > # define strtoll(a, b, c)        strtol((a), (b), (c))

Of course the way these changes have been done, the build process on 32 bit 
would break.

Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

More information about the mrtg mailing list