rlaager / docsis

This program encodes a DOCSIS binary configuration file from a human-readable text configuration file.
http://docsis.sourceforge.net
GNU General Public License v2.0
114 stars 70 forks source link

implicit declaration of function ‘netsnmp_init_mib’ #44

Closed nean-and-i closed 8 years ago

nean-and-i commented 8 years ago

unable to compile it at latest CentOS 5.11 version.

md5.h:45:7: warning: no newline at end of file

docsis.c: In function ‘encode_one_file’:
docsis.c:576: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
docsis.c: In function ‘setup_mib_flags’:
docsis.c:652: error: implicit declaration of function ‘netsnmp_init_mib’
[root@376a331458ca docsis]# make
cd . && /bin/sh /mnt/git/docsis/missing --run autoheader
rm -f stamp-h1
touch config.h.in
cd . && /bin/sh ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
make  all-recursive
make[1]: Entering directory `/mnt/git/docsis'
Making all in src
make[2]: Entering directory `/mnt/git/docsis/src'
if gcc -DHAVE_CONFIG_H -I. -I. -I..   -DINET6 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -g -lcrypto -DNETSNMP_NO_INLINE -Dlinux -I/usr/include/rpm -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -I. -I/usr/include/net-snmp   -Wall  -Waggregate-return -Wbad-function-cast -Wcast-align -Wdeclaration-after-statement -Wendif-labels -Werror-implicit-function-declaration -Wextra -Wno-unused-parameter -Wfloat-equal -Wformat-security -Winit-self -Wmissing-declarations -Wmissing-noreturn -Wmissing-prototypes -Wpointer-arith -Wundef -g -g -O2 -MT docsis.o -MD -MP -MF ".deps/docsis.Tpo" -c -o docsis.o docsis.c; \
    then mv -f ".deps/docsis.Tpo" ".deps/docsis.Po"; else rm -f ".deps/docsis.Tpo"; exit 1; fi
In file included from docsis.c:44:
md5.h:45:7: warning: no newline at end of file
docsis.c: In function ‘encode_one_file’:
docsis.c:576: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
docsis.c: In function ‘setup_mib_flags’:
docsis.c:652: error: implicit declaration of function ‘netsnmp_init_mib’
make[2]: *** [docsis.o] Error 1
make[2]: Leaving directory `/mnt/git/docsis/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mnt/git/docsis'
make: *** [all] Error 2
rlaager commented 8 years ago

Can you try the change I made (just pull from git)? If that doesn't fix it, we can investigate further.

nean-and-i commented 8 years ago

sorry, after the latest change I get even more errors:

docsis.c:45:25: error: openssl/sha.h: No such file or directory docsis.c: In function ‘add_mta_hash’: docsis.c:142: error: ‘SHA_CTX’ undeclared (first use in this function) docsis.c:142: error: (Each undeclared identifier is reported only once docsis.c:142: error: for each function it appears in.) docsis.c:142: error: expected ‘;’ before ‘shactx’ docsis.c:143: error: ‘SHA_DIGEST_LENGTH’ undeclared (first use in this function) docsis.c:143: warning: ISO C90 forbids mixed declarations and code docsis.c:145: error: implicit declaration of function ‘SHA1_Init’ docsis.c:145: error: ‘shactx’ undeclared (first use in this function) docsis.c:146: error: implicit declaration of function ‘SHA1_Update’ docsis.c:147: error: implicit declaration of function ‘SHA1_Final’ docsis.c:143: warning: unused variable ‘hash_value’ make[2]: * [docsis.o] Error 1 make[2]: Leaving directory `/mnt/git/docsis/src' make[1]: * [all-recursive] Error 1 make[1]: Leaving directory`/mnt/git/docsis' make: *\ [all] Error 2

On Thu, Jun 16, 2016 at 1:42 AM, Richard Laager notifications@github.com wrote:

Can you try the change I made (just pull from git)? If that doesn't fix it, we can investigate further.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rlaager/docsis/issues/44#issuecomment-226351527, or mute the thread https://github.com/notifications/unsubscribe/ABP_BU5nowKye5PCNAGgofek5U3X6CG4ks5qMI3mgaJpZM4I2cgn .