make error

Help
snuffel
2006-06-01
2013-05-28
  • snuffel
    snuffel
    2006-06-01

    Is anyone familiar with the following error I get on the make instruction for docsis-0.9.5 (and docsis 0.9.4 as well):

    if gcc -DHAVE_CONFIG_H -I. -I. -I..  -g -O2 -Dlinux -I. -I/usr/local/include    -g -O2 -MT docsis_snmp.o -MD -MP -MF ".deps/docsis_snmp.Tpo" -c -o docsis_snmp.o docsis_snmp.c; \ then mv -f ".deps/docsis_snmp.Tpo" ".deps/docsis_snmp.Po"; else rm -f ".deps/docsis_snmp.Tpo"; exit 1; fi
    In file included from docsis.h:27,
                     from docsis_snmp.h:33,
                     from docsis_snmp.c:23:
    /usr/include/stdlib.h:597: error: conflicting types for 'free'
    /usr/local/include/net-snmp/library/container.h:361: error: previous implicit declaration of 'free' was here
    make[2]: *** [docsis_snmp.o] Error 1
    make[2]: Leaving directory `/root/temp/docsis-0.9.5/src'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/root/temp/docsis-0.9.5'
    make: *** [all] Error 2

    It is on a RedHat EL3 platform.
    The net-snmp version is 5.2.2

    Thanks

     
    • Erik
      Erik
      2007-01-04

      I'm getting the same error when I try compiling both 0.9.5 and 0.9.4.
      I'm using Gentoo.
      net-snmp v.5.4
      gcc v.4.1.1
      glibc v.2.5
      kernel 2.6.17.

      Error code:

      if gcc -DHAVE_CONFIG_H -I. -I. -I..  -march=pentium4 -pipe -O2 -Ulinux -Dlinux=linux -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/perl5/5.8.8/i686-linux/CORE -I. -I/usr/include    -g -O2 -MT docsis_snmp.o -MD -MP -MF ".deps/docsis_snmp.Tpo" -c -o docsis_snmp.o docsis_snmp.c; \         then mv -f ".deps/docsis_snmp.Tpo" ".deps/docsis_snmp.Po"; else rm -f ".deps/docsis_snmp.Tpo"; exit 1; fi
      In file included from docsis.h:27,
                       from docsis_snmp.h:33,
                       from docsis_snmp.c:23:
      /usr/include/stdlib.h:603: error: conflicting types for 'free'
      /usr/include/net-snmp/library/container.h:416: error: previous implicit declaration of 'free' was here
      make[2]: *** [docsis_snmp.o] Error 1
      make[2]: Leaving directory `/home/erik/apps/docsis-0.9.5/src'
      make[1]: *** [all-recursive] Error 1
      make[1]: Leaving directory `/home/erik/apps/docsis-0.9.5'
      make: *** [all] Error 2

       
    • Rick
      Rick
      2007-01-14

      To solve that i coment line "416" in  /usr/include/net-snmp/library/container.h.

      make

      and after make run ok, i uncoment line 416.

      =)