Re: [bwm-tools-tech] Compile problems - math functions
Brought to you by:
nkukard
From: Kevork <ke...@cy...> - 2003-12-25 21:25:59
|
Hi !, I tried what you suggested, but I still get errors ... Regards, Kevork. FYI: [/usr/local/src/bwm_tools-0.1.7] # make for dir in lib bwm_firewall bwm_graph bwmd bwm_monitor; \ do \ make -C $dir all; \ res=3D$?; \ if [ $res !=3D '0' ]; then exit $res; fi \ done make[1]: Entering directory `/usr/local/src/bwm_tools-0.1.7/lib' cc -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include = -I/usr/include/libxml2 -Wall -I../include -D_GNU_SOURCE --depend = flow.c ipq.c libipq.c xmlConf.c autoclass.c misc.c > .deps make libbwm.a make[2]: Entering directory `/usr/local/src/bwm_tools-0.1.7/lib' cc -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include = -I/usr/include/libxml2 -Wall -I../include -D_GNU_SOURCE -c flow.c cc -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include = -I/usr/include/libxml2 -Wall -I../include -D_GNU_SOURCE -c ipq.c ipq.c: In function `queuePacket': ipq.c:141: warning: unused variable `icmph' cc -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include = -I/usr/include/libxml2 -Wall -I../include -D_GNU_SOURCE -c libipq.c cc -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include = -I/usr/include/libxml2 -Wall -I../include -D_GNU_SOURCE -c xmlConf.c cc -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include = -I/usr/include/libxml2 -Wall -I../include -D_GNU_SOURCE -c autoclass.c cc -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include = -I/usr/include/libxml2 -Wall -I../include -D_GNU_SOURCE -c misc.c ar cr libbwm.a flow.o ipq.o libipq.o xmlConf.o autoclass.o misc.o make[2]: Leaving directory `/usr/local/src/bwm_tools-0.1.7/lib' make[1]: Leaving directory `/usr/local/src/bwm_tools-0.1.7/lib' make[1]: Entering directory = `/usr/local/src/bwm_tools-0.1.7/bwm_firewall' cc -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include = -I/usr/include/libxml2 -DCONFIG_FILE=3D\"/etc/bwm_tools/firewall.xml\" = -DIPTABLES_FILE=3D\"/etc/sysconfig/iptables\" -Wall -I../include = -D_GNU_SOURCE --depend bwm_firewall.c > .deps make bwm_firewall make[2]: Entering directory = `/usr/local/src/bwm_tools-0.1.7/bwm_firewall' cc -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include = -I/usr/include/libxml2 -DCONFIG_FILE=3D\"/etc/bwm_tools/firewall.xml\" = -DIPTABLES_FILE=3D\"/etc/sysconfig/iptables\" -Wall -I../include = -D_GNU_SOURCE -c bwm_firewall.c cc -o bwm_firewall bwm_firewall.o ../lib/libbwm.a -pthread -lgthread-2.0 = -lglib-2.0 -lxml2 -lz -lm =20 make[2]: Leaving directory `/usr/local/src/bwm_tools-0.1.7/bwm_firewall' make[1]: Leaving directory `/usr/local/src/bwm_tools-0.1.7/bwm_firewall' make[1]: Entering directory `/usr/local/src/bwm_tools-0.1.7/bwm_graph' cc -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include = -DLOG_DIR=3D\"/var/bwm_tools\" -Wall -I../include -D_GNU_SOURCE --depend = bwm_graph.c graph.c > .deps make bwm_graph make[2]: Entering directory `/usr/local/src/bwm_tools-0.1.7/bwm_graph' cc -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include = -DLOG_DIR=3D\"/var/bwm_tools\" -Wall -I../include -D_GNU_SOURCE -c = bwm_graph.c cc -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include = -DLOG_DIR=3D\"/var/bwm_tools\" -Wall -I../include -D_GNU_SOURCE -c = graph.c cc -o bwm_graph bwm_graph.o graph.o ../lib/libbwm.a -pthread = -lgthread-2.0 -lglib-2.0 -L/usr/local/lib -lrrd /usr/local/lib/librrd.a(rrd_graph.o)(.text+0x15d): In function `ytr': /usr/local/src/rrdtool-1.0.45/src/rrd_graph.c:153: undefined reference = to `log10' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0x173):/usr/local/src/rrdtool-= 1.0.45/src/rrd_graph.c:153: undefined reference to `log10' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0x1e4):/usr/local/src/rrdtool-= 1.0.45/src/rrd_graph.c:161: undefined reference to `log10' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0x1fa):/usr/local/src/rrdtool-= 1.0.45/src/rrd_graph.c:161: undefined reference to `log10' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0x8d9): In function = `auto_scale': /usr/include/bits/mathinline.h:445: undefined reference to `log' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0x8f2):/usr/include/bits/mathi= nline.h:445: undefined reference to `log' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0x955): In function = `auto_scale': /usr/local/src/rrdtool-1.0.45/src/rrd_graph.c:311: undefined reference = to `pow' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0xa03): In function = `si_unit': /usr/local/src/rrdtool-1.0.45/src/rrd_graph.c:353: undefined reference = to `pow' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0xaca): In function = `si_unit': /usr/include/bits/mathinline.h:445: undefined reference to `log' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0xae0):/usr/include/bits/mathi= nline.h:445: undefined reference to `log' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0xbd8): In function = `expand_range': /usr/include/bits/mathinline.h:445: undefined reference to `log10' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0xc5b):/usr/include/bits/mathi= nline.h:504: undefined reference to `pow' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0xcc4):/usr/include/bits/mathi= nline.h:504: undefined reference to `pow' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0xd79):/usr/include/bits/mathi= nline.h:445: undefined reference to `log10' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0xdc8):/usr/include/bits/mathi= nline.h:445: undefined reference to `pow' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0x2680): In function = `data_calc': /usr/local/src/rrdtool-1.0.45/src/rrd_graph.c:1064: undefined reference = to `sin' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0x2728):/usr/local/src/rrdtool= -1.0.45/src/rrd_graph.c:1072: undefined reference to `cos' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0x274d):/usr/local/src/rrdtool= -1.0.45/src/rrd_graph.c:1096: undefined reference to `log' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0x2772):/usr/local/src/rrdtool= -1.0.45/src/rrd_graph.c:1133: undefined reference to `exp' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0x4135): In function = `horizontal_grid': /usr/include/bits/mathinline.h:445: undefined reference to `log10' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0x41ba):/usr/include/bits/math= inline.h:493: undefined reference to `log10' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0x425c): In function = `horizontal_grid': /usr/local/src/rrdtool-1.0.45/src/rrd_graph.c:1845: undefined reference = to `pow' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0x49aa): In function = `horizontal_mrtg_grid': /usr/include/bits/mathinline.h:445: undefined reference to `log10' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0x4a2d):/usr/include/bits/math= inline.h:504: undefined reference to `pow' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0x4a8a):/usr/include/bits/math= inline.h:504: undefined reference to `pow' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0x4dc8): In function = `horizontal_log_grid': /usr/local/src/rrdtool-1.0.45/src/rrd_graph.c:2011: undefined reference = to `log10' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0x4de4):/usr/local/src/rrdtool= -1.0.45/src/rrd_graph.c:2011: undefined reference to `log10' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0x4e79):/usr/local/src/rrdtool= -1.0.45/src/rrd_graph.c:2018: undefined reference to `log10' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0x4ff4):/usr/local/src/rrdtool= -1.0.45/src/rrd_graph.c:2040: undefined reference to `log10' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0x5010): In function = `horizontal_log_grid': /usr/include/bits/mathinline.h:430: undefined reference to `log10' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0x5036):/usr/include/bits/math= inline.h:430: more undefined references to `log10' follow /usr/local/lib/librrd.a(rrd_graph.o)(.text+0x506e): In function = `horizontal_log_grid': /usr/include/bits/mathinline.h:430: undefined reference to `pow' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0x5228): In function = `horizontal_log_grid': /usr/local/src/rrdtool-1.0.45/src/rrd_graph.c:2061: undefined reference = to `log10' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0x5244): In function = `horizontal_log_grid': /usr/include/bits/mathinline.h:430: undefined reference to `log10' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0x526a):/usr/include/bits/math= inline.h:430: undefined reference to `log10' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0x52a2):/usr/include/bits/math= inline.h:430: undefined reference to `pow' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0x554a): In function = `horizontal_log_grid': /usr/local/src/rrdtool-1.0.45/src/rrd_graph.c:2021: undefined reference = to `log10' /usr/local/lib/librrd.a(rrd_graph.o)(.text+0x5564):/usr/local/src/rrdtool= -1.0.45/src/rrd_graph.c:2021: undefined reference to `log10' /usr/local/lib/librrd.a(pngrtran.o)(.text+0x119c): In function = `png_init_read_transformations': /usr/local/src/rrdtool-1.0.45/libpng-1.0.9/pngrtran.c:879: undefined = reference to `pow' /usr/local/lib/librrd.a(pngrtran.o)(.text+0x11ef):/usr/local/src/rrdtool-= 1.0.45/libpng-1.0.9/pngrtran.c:881: undefined reference to `pow' /usr/local/lib/librrd.a(pngrtran.o)(.text+0x1239):/usr/local/src/rrdtool-= 1.0.45/libpng-1.0.9/pngrtran.c:883: undefined reference to `pow' /usr/local/lib/librrd.a(pngrtran.o)(.text+0x128a):/usr/local/src/rrdtool-= 1.0.45/libpng-1.0.9/pngrtran.c:885: undefined reference to `pow' /usr/local/lib/librrd.a(pngrtran.o)(.text+0x12db):/usr/local/src/rrdtool-= 1.0.45/libpng-1.0.9/pngrtran.c:887: undefined reference to `pow' /usr/local/lib/librrd.a(pngrtran.o)(.text+0x1329):/usr/local/src/rrdtool-= 1.0.45/libpng-1.0.9/pngrtran.c:889: more undefined references to `pow' = follow collect2: ld returned 1 exit status make[2]: *** [bwm_graph] Error 1 make[2]: Leaving directory `/usr/local/src/bwm_tools-0.1.7/bwm_graph' make[1]: *** [all] Error 2 make[1]: Leaving directory `/usr/local/src/bwm_tools-0.1.7/bwm_graph' make: *** [all] Error 2 ----- Original Message -----=20 From: Kobe Lenjou=20 To: bwm...@li...=20 Sent: Tuesday, December 23, 2003 1:25 PM Subject: [bwm-tools-tech] Compile problems - math functions This is indeed a problem with the bmw_tools I think (I'm not a genius = in make and other stuff) To solve the problem simply edit the = bwm_tools-0.1.7/bwm_graph/Makefile and add '-lm' to the GLIB_LIBS value, mine looks like this at the moment, = and it compiles well. GLIB_LIBS=3D-pthread -L/usr/local/lib -lgthread-2.0 -lglib-2.0 -lm =20 Greetz Kobe --- Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.553 / Virus Database: 345 - Release Date: 18/12/2003 |