[mrtg-developers] Building mrtg-2.9.4 on Mac OS X PB

Chris Pepper pepper at mail.reppep.com
Sun Oct 29 05:41:32 MET 2000


Folks,

	I'm trying to build a MRTG on Mac OS X Public Beta, but it's 
not working. Tobi's out of touch, and I'd appreciate any help you can 
give me. I have the Darwin gcc from Apple, and I've installed 
zlib-1.1.3, libpng-1.0.8, and gd-1.8.3. libm does not exist in Mac OS 
X, but its functionality has been merged into something else -- both 
libpng and gd compile and pass their own tests when I remove -lm from 
their makefiles.


	Should I just remove -lm from configure??

[pepper at g4 mrtg-2.9.4]$ grep lm configure
echo $ac_n "checking for acos in -lm""... $ac_c" 1>&6
echo "configure:1045: checking for acos in -lm" >&5
LIBS="-lm  $LIBS"
     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
   LIBS="-lm $LIBS"
LDFLAGS="${LDFLAGS} -lm"
LIBS="-lgd -lpng -lz -lm $LIBS"
   LDFLAGS="$LDFLAGS -lpng -lz -lm"


	Should I use just ./configure or something more like the following?
./configure --with-gd=../gd-1.8.3 --with-z=../zlib-1.1.3 
--with-png=../libpng-1.0.8

>[pepper at g4 mrtg-2.9.4]$ ls /usr/local/lib/ /usr/local/include/
>/usr/local/include/:
>gd.h       gdcache.h  gdfontl.h  gdfonts.h  png.h      zconf.h
>gd_io.h    gdfontg.h  gdfontmb.h gdfontt.h  pngconf.h  zlib.h
>
>/usr/local/lib/:
>libgd.a   libpng.a  libz.a


	I don't see "gdImagePng" in ../gd-1.8.3 -- should it be 
there, or is the problem something else?

[pepper at g4 mrtg-2.9.4]$ ./configure
loading cache ./config.cache
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E -traditional-cpp
checking whether make sets ${MAKE}... yes
checking for a BSD compatible install... /usr/bin/install -c
checking for perl... /usr/bin/perl
checking for groff... /usr/bin/groff
checking for acos in -lm... no
checking for gdImageGif in -lgd... no
checking for gdImagePng in -lgd... no

** The GD library is required for rateup to compile.
    Get it from http://www.boutell.com, compile it and
    use either --with-gd-lib=DIR and --with-gd-inc=DIR to specify
    its location. You might also have to use --with-z-inc, --with-z-lib
    and --with-png-inc, --with-png-lib for gd versions 1.6 and higher.
    Check config.log for more information on the problem.
[pepper at g4 mrtg-2.9.4]$ more config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:548: checking for gcc
configure:661: checking whether the C compiler (gcc  ) works
configure:677: gcc -o conftest    conftest.c  1>&5
configure:703: checking whether the C compiler (gcc  ) is a cross-compiler
configure:708: checking whether we are using GNU C
configure:717: gcc -E conftest.c
configure:736: checking whether gcc accepts -g
configure:770: checking how to run the C preprocessor
configure:791: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:787: undefined type, found `Syntax'
configure:787: illegal external declaration, missing `;' after `Error'
configure: failed program was:
#line 785 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
configure:808: gcc -E -traditional-cpp  conftest.c >/dev/null 2>conftest.out
configure:850: checking whether make sets ${MAKE}
configure:907: checking for a BSD compatible install
configure:962: checking for perl
[pepper at g4 mrtg-2.9.4]$ cat config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:548: checking for gcc
configure:661: checking whether the C compiler (gcc  ) works
configure:677: gcc -o conftest    conftest.c  1>&5
configure:703: checking whether the C compiler (gcc  ) is a cross-compiler
configure:708: checking whether we are using GNU C
configure:717: gcc -E conftest.c
configure:736: checking whether gcc accepts -g
configure:770: checking how to run the C preprocessor
configure:791: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:787: undefined type, found `Syntax'
configure:787: illegal external declaration, missing `;' after `Error'
configure: failed program was:
#line 785 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
configure:808: gcc -E -traditional-cpp  conftest.c >/dev/null 2>conftest.out
configure:850: checking whether make sets ${MAKE}
configure:907: checking for a BSD compatible install
configure:962: checking for perl
configure:1008: checking for groff
configure:1045: checking for acos in -lm
configure:1064: gcc -o conftest -g -O2   conftest.c -lm   1>&5
/usr/bin/ld: can't locate file for: -lm
configure: failed program was:
#line 1053 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
char acos();

int main() {
acos()
; return 0; }
configure:1170: checking for gdImageGif in -lgd
configure:1189: gcc -o conftest -g -O2   -lgd -lm conftest.c -lgd   1>&5
/usr/bin/ld: table of contents for archive: /usr/local/lib/libgd.a is 
out of date; rerun ranlib(1) (can't load from it)
/usr/bin/ld: can't locate file for: -lm
configure: failed program was:
#line 1178 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
char gdImageGif();

int main() {
gdImageGif()
; return 0; }
configure:1213: checking for gdImagePng in -lgd
configure:1232: gcc -o conftest -g -O2   -lgd -lm conftest.c -lgd 
-lpng -lz -lm  1>&5
/usr/bin/ld: table of contents for archive: /usr/local/lib/libgd.a is 
out of date; rerun ranlib(1) (can't load from it)
/usr/bin/ld: can't locate file for: -lm
configure: failed program was:
#line 1221 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
char gdImagePng();

int main() {
gdImagePng()
; return 0; }

	Assuming I get it all working, I'll put an mrtg binary on 
<http://port.mosxsw.com/> (assuming this is okay with Tobi), for 
people who have Mac OS X but lack the build tools or inclination to 
use them.


						Thanks much for any help,


						Chris Pepper

-- 
Chris Pepper | Shooting Gallery Interactive | 212 905-2200
Mac OS X Software: <http://www.mosxsw.com/>

--
Unsubscribe mailto:mrtg-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:mrtg-developers-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/mrtg-developers



More information about the mrtg-developers mailing list