Squid-1.2beta7 - undeclared variable + link failure

From: Dancer <dancer@dont-contact.us>
Date: Tue, 25 Nov 1997 11:42:40 +1000

The variable (intended to be a char *, I believe) snmp_agentinfo is used
in a debug statement but never declared.
Obviously fatal to the compilation.

I don't have any of the following enabled.

#SQUID_SNMP = -DSQUID_SNMP=1
#SQUID_MIB = mib.txt
#SQUID_SNMP_LIBS = -L../snmplib -lsnmp

Just supplying a declaration for it, allows the compile to proceed,
which brings us to the BIG failure:

snmp_agent.o: In function `snmp_agent_parse':
snmp_agent.o(.text+0x1e2): undefined reference to `snmp_auth_parse'
snmp_agent.o(.text+0x1f2): undefined reference to `increment_stat'
snmp_agent.o(.text+0x230): undefined reference to `increment_stat'
snmp_agent.o(.text+0x2ff): undefined reference to `increment_stat'
snmp_agent.o(.text+0x30d): undefined reference to `asn_parse_header'
snmp_agent.o(.text+0x32b): undefined reference to `asn_parse_int'
snmp_agent.o(.text+0x3aa): undefined reference to `create_report'
snmp_agent.o(.text+0x3e9): undefined reference to `increment_stat'
snmp_agent.o(.text+0x413): undefined reference to `increment_stat'
snmp_agent.o(.text+0x439): undefined reference to `snmp_inbadversions'
snmp_agent.o(.text+0x44a): undefined reference to `asn_parse_header'
snmp_agent.o(.text+0x45a): undefined reference to `increment_stat'
snmp_agent.o(.text+0x492): undefined reference to `snmp_intotalreqvars'
snmp_agent.o(.text+0x4a0): undefined reference to `snmp_ingetrequests'
snmp_agent.o(.text+0x4ab): undefined reference to `snmp_ingetnexts'
snmp_agent.o(.text+0x4b6): undefined reference to `snmp_insetrequests'
snmp_agent.o(.text+0x4f7): undefined reference to `asn_parse_int'
snmp_agent.o(.text+0x507): undefined reference to `increment_stat'
snmp_agent.o(.text+0x54d): undefined reference to `asn_parse_int'
snmp_agent.o(.text+0x55d): undefined reference to `increment_stat'
snmp_agent.o(.text+0x5a0): undefined reference to `asn_parse_int'
snmp_agent.o(.text+0x5b0): undefined reference to `increment_stat'
snmp_agent.o(.text+0x641): undefined reference to `snmp_auth_build'
snmp_agent.o(.text+0x66e): undefined reference to
`snmp_inasnparseerrors'
snmp_agent.o(.text+0x690): undefined reference to `asn_build_sequence'
snmp_agent.o(.text+0x6e5): undefined reference to `asn_build_int'
snmp_agent.o(.text+0x734): undefined reference to `asn_build_int'
snmp_agent.o(.text+0x781): undefined reference to `asn_build_int'
snmp_agent.o(.text+0x962): undefined reference to `asn_build_sequence'
snmp_agent.o(.text+0x9c5): undefined reference to `snmp_auth_build'
snmp_agent.o(.text+0x9e2): undefined reference to `snmp_intoobigs'
snmp_agent.o(.text+0xa3b): undefined reference to `md5Digest'
snmp_agent.o: In function `parse_var_op_list':
snmp_agent.o(.text+0xa8c): undefined reference to `asn_parse_header'
snmp_agent.o(.text+0xb06): undefined reference to `asn_build_sequence'
snmp_agent.o(.text+0xb90): undefined reference to `snmp_parse_var_op'
snmp_agent.o(.text+0xcf1): undefined reference to `snmp_inbadvalues'
snmp_agent.o(.text+0xe3a): undefined reference to `snmp_inbadvalues'
snmp_agent.o(.text+0xeb5): undefined reference to `snmp_build_var_op'
snmp_agent.o(.text+0xf00): undefined reference to `asn_build_sequence'
snmp_agent.o: In function `create_identical':
snmp_agent.o(.text+0xf97): undefined reference to `snmp_auth_parse'
snmp_agent.o(.text+0xfbe): undefined reference to `asn_parse_header'
snmp_agent.o(.text+0xfe3): undefined reference to `asn_parse_int'
snmp_agent.o(.text+0xfff): undefined reference to `asn_parse_int'
snmp_agent.o(.text+0x101b): undefined reference to `asn_parse_int'
snmp_agent.o(.text+0x103a): undefined reference to `asn_build_header'
snmp_agent.o(.text+0x1060): undefined reference to `asn_build_int'
snmp_agent.o(.text+0x107c): undefined reference to `asn_build_int'
snmp_agent.o(.text+0x10e6): undefined reference to `parse_parameters'
snmp_agent.o(.text+0x1230): undefined reference to `md5Digest'
snmp_agent.o(.text+0x1362): undefined reference to
`snmp_inbadcommunitynames'
snmp_agent.o: In function `setVariable':
snmp_agent.o(.text+0x150f): undefined reference to `asn_parse_int'
snmp_agent.o(.text+0x152f): undefined reference to `asn_parse_string'
snmp_agent.o(.text+0x154f): undefined reference to `asn_parse_objid'
snmp_agent.o(.text+0x15af): undefined reference to `asn_parse_header'
snmp_agent.o(.text+0x1636): undefined reference to `asn_build_sequence'
snmp_agent.o(.text+0x16e8): undefined reference to `snmp_parse_var_op'
snmp_agent.o(.text+0x1777): undefined reference to `snmp_build_var_op'
snmp_agent.o(.text+0x180a): undefined reference to `snmp_parse_var_op'
snmp_agent.o(.text+0x18c3): undefined reference to `snmp_build_var_op'
snmp_agent.o(.text+0x1a53): undefined reference to `snmp_build_var_op'
snmp_agent.o(.text+0x1b1a): undefined reference to `asn_build_sequence'
snmp_agent.o(.text+0x1b32): undefined reference to
`snmp_inasnparseerrors'
snmp_config.o: In function `create_view':
snmp_config.o(.text+0x248): undefined reference to `read_objid'
snmp_config.o: In function `create_user':
snmp_config.o(.text+0x632): undefined reference to
`v2md5auth_password_to_key'
snmp_config.o(.text+0x732): undefined reference to
`v2md5auth_password_to_key'
snmp_config.o: In function `read_config':
snmp_config.o(.text+0x903): undefined reference to `init_mib'
snmp_config.o(.text+0x90c): undefined reference to `snmp_configfile'
snmp_config.o(.text+0x934): undefined reference to `snmp_configfile'
snmp_config.o(.text+0x94c): undefined reference to `snmp_configfile'
make[1]: *** [squid] Error 1
make[1]: Leaving directory `/usr/src/squid-1.2.beta7/src'
make: *** [all] Error 1

I suspect that the snmp objects shouldn't be being included in the link,
or that their contents should have largely been #ifdef'ed out.

Wrapping the following source files with #if SQUID_SNMP yielded a
properly linked executable:
snmp_agent.c
snmp_config.c
snmp_vars.c

With those changes, squid-1.2beta7 appears to function (but since I was
typing this as I did it all, I don't claim that it really works
properly).

D

--
Note to evil sorcerers and mad scientists: don't ever, ever summon
powerful
demons or rip holes in the fabric of space and time. It's never a good
idea.
ICQ UIN: 3225440
Received on Mon Nov 24 1997 - 17:55:54 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:37:43 MST