Menu

Having issues compiling

Help
Jerry Wol
2003-10-05
2012-09-15
  • Jerry Wol

    Jerry Wol - 2003-10-05

    Hi all,

    I need some help in being able to compile netacct-mysql. This is the ./configure command I use:

    ./configure --sysconfdir=/etc --prefix=/
    sbin --with-libpcap-include=/usr/include/pcap

    it goes through fine and returns to prompt without error. Then I type "make" and the following error comes up:

    make  all-recursive
    make[1]: Entering directory `/root/netacct-mysql-0.78beta3'
    Making all in src
    make[2]: Entering directory `/root/netacct-mysql-0.78beta3/src'
    gcc -DHAVE_CONFIG_H -I. -I. -I.. -I..   -I/sbin/include         -D__FAVOR_BSD
    -I/usr/include/mysql  -g -O2 -c main.c
    In file included from main.c:12:
    netacct.h:20:18: pcap.h: No such file or directory
    make[2]: *** [main.o] Error 1
    make[2]: Leaving directory `/root/netacct-mysql-0.78beta3/src'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/root/netacct-mysql-0.78beta3'
    make: *** [all-recursive-am] Error 2

    I know I have pcap.h as I located it in:

    /usr/include/pcap/pcap.h

    I dont know why its coming up with this error. My system details are:

    P3 750
    512MB Ram
    Redhat 7.3
    libpcap-0.6.2-12
    gcc-2.96-110
    mysql-3.23.49-3

    thanks for your help in advance.

    Jerry

     
    • Wouter

      Wouter - 2004-10-07

      I'm having the same problem, did you find any solution?

       
    • Wouter

      Wouter - 2004-10-07

      I will be a bit more specific:

      I'm using Fedora Core 1, I tryed Mysql 4 and Mysql 3.23.

      This is the error I receive:

      make

      make all-recursive
      make[1]: Entering directory /usr/local/netacct-mysql-0.76' Making all in src make[2]: Entering directory/usr/local/netacct-mysql-0.76/src'
      gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I/usr/local/include -D_LINUX_ -I/usr/include/mysql -g -O2 -c process.c
      gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I/usr/local/include -D_LINUX_ -I/usr/include/mysql -g -O2 -c mysql.c
      gcc -g -O2 -L/usr/lib/mysql -lpthread -o nacctd main.o process.o config.o utils.o capture.o daemon.o collect.o mysql.o -lpcap -lnsl -lm -lmysqlclient
      /usr/lib/mysql/libmysqlclient.a(my_compress.o)(.text+0xaa): In function my_uncompress': : undefined reference touncompress'
      /usr/lib/mysql/libmysqlclient.a(my_compress.o)(.text+0x13c): In function my_compress_alloc': : undefined reference tocompress'
      collect2: ld returned 1 exit status
      make[2]: [nacctd] Error 1
      make[2]: Leaving directory /usr/local/netacct-mysql-0.76/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/usr/local/netacct-mysql-0.76'
      make:
      [all-recursive-am] Error 2

       
      • Nikolay Hristov

        Nikolay Hristov - 2004-10-08

        install zlib or libz package

         
    • Nikolay Hristov

      Nikolay Hristov - 2004-10-08

      if libpcap headers are in /usr/include/pcap/
      then use --with-libpcap-include=/usr/include because in *.c files it is included like this

      include <pcap/pcap.h>

      anyway you need this option in case when you have installed libpcap library at non-default place .. by default configure script looks in: /usr/include and /usr/local/include so you do not need to pass this option to configure script

      on other unix systems like solaris pcap may be installed anywhere so this is why i have added such option

       

Log in to post a comment.