net-mgmt/bsnmptools doesn't compile when CFLAGS is set

Yuri Pankov y.pankov at irbis.net.ru
Fri Jan 19 07:01:07 UTC 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I've CFLAGS variable set in /etc/make.conf, resulting errors when
compiling bsnmptools (make CFLAGS=-O2 also errors). Removing CFLAGS from
/etc/make.conf solves problem. Adding CFLAGS+= -I../../lib -L../../lib
to tools/*/Makefile helps also.

# make
===>  Vulnerability check disabled, database not found
===>  Extracting for bsnmptools-0.0.20060818_2
=> MD5 Checksum OK for bsnmptools-20060818-01.tar.
=> SHA256 Checksum OK for bsnmptools-20060818-01.tar.
===>  Patching for bsnmptools-0.0.20060818_2
===>  Configuring for bsnmptools-0.0.20060818_2
===>  Building for bsnmptools-0.0.20060818_2
===> lib (all)
Warning: Object directory not changed from original
/usr/ports/net-mgmt/bsnmptools/work/bsnmptools/lib
cc -g -pipe  -Wsystem-headers -Werror -Wall -Wno-format-y2k -W
- -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes
- -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch
- -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline
- -Wnested-externs -Wredundant-decls -c bsnmpimport.c
cc -g -pipe  -Wsystem-headers -Werror -Wall -Wno-format-y2k -W
- -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes
- -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch
- -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline
- -Wnested-externs -Wredundant-decls -c bsnmpmap.c
cc -g -pipe  -Wsystem-headers -Werror -Wall -Wno-format-y2k -W
- -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes
- -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch
- -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline
- -Wnested-externs -Wredundant-decls -c bsnmptools.c
cc -g -pipe  -Wsystem-headers -Werror -Wall -Wno-format-y2k -W
- -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes
- -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch
- -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline
- -Wnested-externs -Wredundant-decls -c bsnmptc.c
building static bsnmptools library
ranlib libbsnmptools.a
cc -fpic -DPIC -g -pipe  -Wsystem-headers -Werror -Wall -Wno-format-y2k
- -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes
- -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch
- -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline
- -Wnested-externs -Wredundant-decls -c bsnmpimport.c -o bsnmpimport.So
cc -fpic -DPIC -g -pipe  -Wsystem-headers -Werror -Wall -Wno-format-y2k
- -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes
- -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch
- -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline
- -Wnested-externs -Wredundant-decls -c bsnmpmap.c -o bsnmpmap.So
cc -fpic -DPIC -g -pipe  -Wsystem-headers -Werror -Wall -Wno-format-y2k
- -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes
- -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch
- -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline
- -Wnested-externs -Wredundant-decls -c bsnmptools.c -o bsnmptools.So
cc -fpic -DPIC -g -pipe  -Wsystem-headers -Werror -Wall -Wno-format-y2k
- -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes
- -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch
- -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline
- -Wnested-externs -Wredundant-decls -c bsnmptc.c -o bsnmptc.So
building shared library libbsnmptools.so.0
===> tools (all)
===> tools/bsnmpget (all)
Warning: Object directory not changed from original
/usr/ports/net-mgmt/bsnmptools/work/bsnmptools/tools/bsnmpget
cc -g -pipe   -c bsnmpget.c
bsnmpget.c:47:21: bsnmptc.h: No such file or directory
bsnmpget.c:48:24: bsnmptools.h: No such file or directory
bsnmpget.c: In function `parse_max_repetitions':
bsnmpget.c:122: error: invalid use of undefined type `struct snmp_toolinfo'
bsnmpget.c: In function `parse_non_repeaters':
bsnmpget.c:142: error: invalid use of undefined type `struct snmp_toolinfo'
bsnmpget.c: In function `parse_pdu_type':
bsnmpget.c:155: error: invalid use of undefined type `struct snmp_toolinfo'
bsnmpget.c:157: error: invalid use of undefined type `struct snmp_toolinfo'
bsnmpget.c:159: error: invalid use of undefined type `struct snmp_toolinfo'
bsnmpget.c: At top level:
bsnmpget.c:275: warning: "struct snmp_object" declared inside parameter list
bsnmpget.c:275: warning: its scope is only this definition or
declaration, which is probably not what you want
bsnmpget.c: In function `snmpget_parse_stroid':
bsnmpget.c:277: error: `MAXSTR' undeclared (first use in this function)
bsnmpget.c:277: error: (Each undeclared identifier is reported only once
bsnmpget.c:277: error: for each function it appears in.)
bsnmpget.c:292: warning: assignment makes pointer from integer without a
cast
bsnmpget.c:306: error: dereferencing pointer to incomplete type
bsnmpget.c:308: warning: assignment makes pointer from integer without a
cast
bsnmpget.c:310: error: dereferencing pointer to incomplete type
bsnmpget.c:310: error: invalid use of undefined type `struct snmp_toolinfo'
bsnmpget.c:311: error: dereferencing pointer to incomplete type
bsnmpget.c: At top level:
bsnmpget.c:323: warning: "struct snmp_object" declared inside parameter list
bsnmpget.c: In function `snmpget_parse_oid':
bsnmpget.c:328: error: `ISSET_NUMERIC' undeclared (first use in this
function)
bsnmpget.c:329: error: dereferencing pointer to incomplete type
bsnmpget.c: At top level:
bsnmpget.c:339: warning: "struct snmp_object" declared inside parameter list
bsnmpget.c: In function `snmpget_verify_vbind':
bsnmpget.c:341: error: dereferencing pointer to incomplete type
bsnmpget.c:346: error: `ISSET_NUMERIC' undeclared (first use in this
function)
bsnmpget.c:349: error: dereferencing pointer to incomplete type
bsnmpget.c: At top level:
bsnmpget.c:357: warning: "struct snmp_object" declared inside parameter list
bsnmpget.c: In function `snmpget_add_vbind':
bsnmpget.c:364: error: dereferencing pointer to incomplete type
bsnmpget.c:369: error: dereferencing pointer to incomplete type
bsnmpget.c: In function `main':
bsnmpget.c:434: error: `snmp_verify_inoid_f' undeclared (first use in
this function)
bsnmpget.c:434: error: syntax error before "snmpget_parse_oid"
bsnmpget.c: At top level:
bsnmpget.c:445: error: syntax error before "if"
bsnmpget.c:89: error: storage size of `snmptool' isn't known
*** Error code 1

Stop in /usr/ports/net-mgmt/bsnmptools/work/bsnmptools/tools/bsnmpget.
*** Error code 1

Stop in /usr/ports/net-mgmt/bsnmptools/work/bsnmptools/tools.
*** Error code 1

Stop in /usr/ports/net-mgmt/bsnmptools/work/bsnmptools.
*** Error code 1

Stop in /usr/ports/net-mgmt/bsnmptools.


HTH,
Yuri
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFsGoUrfDNc84wGlURAgFUAJ4m8y/WNrZuvFBb4gSiqMkdzG7I7gCfVHqG
xITk5PVqI2o44vxqNoa/YXw=
=I2Iz
-----END PGP SIGNATURE-----


More information about the freebsd-ports mailing list