Hi all,

 

I was trying to compile the sample SubAgent from the totorial
(http://net-snmp.sourceforge.net/wiki/index.php/TUT:Writing_a_Subagent)
using static linking of net-snmp libraries. But for some reason, its
giving me errors.

Dynamic linking of the same works for me..

I' m working on a NetBSD machine where I could compile
Net-SNMP(net-snmp-5.4.2.1) using static linking by the following steps.

 

      ./configure --enable-static --enable-shared=no
--disable-embedded-perl --with-ldflags=-Bstatic

      make 

      make install

 

Please help...Following is the error message i got.

 

gcc -I. `net-snmp-config --cflags`  -c example-demon.c

gcc -I. `net-snmp-config --cflags`  -c nstAgentSubagentObject.c

gcc -o example-demon example-demon.o nstAgentSubagentObject.o
`net-snmp-config --agent-libs`

/usr/local/lib/libnetsnmpagent.a(kernel.o)(.text+0x1a): In function
`init_kmem':

/home/renju/netsnmp/net-snmp-5.4.2.1/agent/kernel.c:50: undefined
reference to `kvm_openfiles'

/usr/local/lib/libnetsnmpagent.a(kernel.o)(.text+0x8b): In function
`klookup':

/home/renju/netsnmp/net-snmp-5.4.2.1/agent/kernel.c:85: undefined
reference to `kvm_read'

/usr/local/lib/libnetsnmpagent.a(kernel.o)(.text+0xa7):/home/renju/netsn
mp/net-snmp-5.4.2.1/agent/kernel.c:88: undefined reference to
`kvm_geterr'

/usr/local/lib/libnetsnmp.a(keytools.o)(.text+0xa1): In function
`generate_Ku':

/home/renju/netsnmp/net-snmp-5.4.2.1/snmplib/keytools.c:135: undefined
reference to `EVP_md5'

/usr/local/lib/libnetsnmp.a(keytools.o)(.text+0xac):/home/renju/netsnmp/
net-snmp-5.4.2.1/snmplib/keytools.c:135: undefined reference to
`EVP_DigestInit'

/usr/local/lib/libnetsnmp.a(keytools.o)(.text+0xd9):/home/renju/netsnmp/
net-snmp-5.4.2.1/snmplib/keytools.c:154: undefined reference to
`EVP_DigestUpdate'

/usr/local/lib/libnetsnmp.a(keytools.o)(.text+0xff):/home/renju/netsnmp/
net-snmp-5.4.2.1/snmplib/keytools.c:167: undefined reference to
`EVP_DigestFinal'

/usr/local/lib/libnetsnmp.a(keytools.o)(.text+0x12d):/home/renju/netsnmp
/net-snmp-5.4.2.1/snmplib/keytools.c:139: undefined reference to
`EVP_sha1'

/usr/local/lib/libnetsnmp.a(scapi.o)(.text+0x103): In function
`sc_random':

/home/renju/netsnmp/net-snmp-5.4.2.1/snmplib/scapi.c:208: undefined
reference to `RAND_bytes'

/usr/local/lib/libnetsnmp.a(scapi.o)(.text+0x22b): In function
`sc_generate_keyed_hash':

/home/renju/netsnmp/net-snmp-5.4.2.1/snmplib/scapi.c:313: undefined
reference to `EVP_md5'

/usr/local/lib/libnetsnmp.a(scapi.o)(.text+0x233):/home/renju/netsnmp/ne
t-snmp-5.4.2.1/snmplib/scapi.c:313: undefined reference to `HMAC'

/usr/local/lib/libnetsnmp.a(scapi.o)(.text+0x29b):/home/renju/netsnmp/ne
t-snmp-5.4.2.1/snmplib/scapi.c:317: undefined reference to `EVP_sha1'

/usr/local/lib/libnetsnmp.a(scapi.o)(.text+0x36a): In function
`sc_hash':

/home/renju/netsnmp/net-snmp-5.4.2.1/snmplib/scapi.c:431: undefined
reference to `EVP_md5'

/usr/local/lib/libnetsnmp.a(scapi.o)(.text+0x37f):/home/renju/netsnmp/ne
t-snmp-5.4.2.1/snmplib/scapi.c:448: undefined reference to `SSLeay'

/usr/local/lib/libnetsnmp.a(scapi.o)(.text+0x3a3):/home/renju/netsnmp/ne
t-snmp-5.4.2.1/snmplib/scapi.c:455: undefined reference to
`EVP_DigestInit'

/usr/local/lib/libnetsnmp.a(scapi.o)(.text+0x3b2):/home/renju/netsnmp/ne
t-snmp-5.4.2.1/snmplib/scapi.c:460: undefined reference to
`EVP_DigestUpdate'

/usr/local/lib/libnetsnmp.a(scapi.o)(.text+0x3b7):/home/renju/netsnmp/ne
t-snmp-5.4.2.1/snmplib/scapi.c:467: undefined reference to `SSLeay'

/usr/local/lib/libnetsnmp.a(scapi.o)(.text+0x3cd):/home/renju/netsnmp/ne
t-snmp-5.4.2.1/snmplib/scapi.c:468: undefined reference to
`EVP_DigestFinal'

/usr/local/lib/libnetsnmp.a(scapi.o)(.text+0x3f0):/home/renju/netsnmp/ne
t-snmp-5.4.2.1/snmplib/scapi.c:472: undefined reference to
`EVP_DigestFinal_ex'

/usr/local/lib/libnetsnmp.a(scapi.o)(.text+0x3fd):/home/renju/netsnmp/ne
t-snmp-5.4.2.1/snmplib/scapi.c:474: undefined reference to
`EVP_MD_CTX_cleanup'

/usr/local/lib/libnetsnmp.a(scapi.o)(.text+0x408):/home/renju/netsnmp/ne
t-snmp-5.4.2.1/snmplib/scapi.c:454: undefined reference to
`EVP_MD_CTX_init'

/usr/local/lib/libnetsnmp.a(scapi.o)(.text+0x42e):/home/renju/netsnmp/ne
t-snmp-5.4.2.1/snmplib/scapi.c:435: undefined reference to `EVP_sha1'

/usr/local/lib/libnetsnmp.a(scapi.o)(.text+0x7dd): In function
`sc_encrypt':

/home/renju/netsnmp/net-snmp-5.4.2.1/snmplib/scapi.c:751: undefined
reference to `DES_key_sched'

/usr/local/lib/libnetsnmp.a(scapi.o)(.text+0x815):/home/renju/netsnmp/ne
t-snmp-5.4.2.1/snmplib/scapi.c:757: undefined reference to
`DES_ncbc_encrypt'

/usr/local/lib/libnetsnmp.a(scapi.o)(.text+0x84f):/home/renju/netsnmp/ne
t-snmp-5.4.2.1/snmplib/scapi.c:763: undefined reference to
`DES_ncbc_encrypt'

/usr/local/lib/libnetsnmp.a(scapi.o)(.text+0x899):/home/renju/netsnmp/ne
t-snmp-5.4.2.1/snmplib/scapi.c:773: undefined reference to
`AES_set_encrypt_key'

/usr/local/lib/libnetsnmp.a(scapi.o)(.text+0x8d0):/home/renju/netsnmp/ne
t-snmp-5.4.2.1/snmplib/scapi.c:779: undefined reference to
`AES_cfb128_encrypt'

/usr/local/lib/libnetsnmp.a(scapi.o)(.text+0xada): In function
`sc_decrypt':

/home/renju/netsnmp/net-snmp-5.4.2.1/snmplib/scapi.c:996: undefined
reference to `AES_set_encrypt_key'

/usr/local/lib/libnetsnmp.a(scapi.o)(.text+0xb11):/home/renju/netsnmp/ne
t-snmp-5.4.2.1/snmplib/scapi.c:1002: undefined reference to
`AES_cfb128_encrypt'

/usr/local/lib/libnetsnmp.a(scapi.o)(.text+0xb45):/home/renju/netsnmp/ne
t-snmp-5.4.2.1/snmplib/scapi.c:986: undefined reference to
`DES_key_sched'

/usr/local/lib/libnetsnmp.a(scapi.o)(.text+0xb74):/home/renju/netsnmp/ne
t-snmp-5.4.2.1/snmplib/scapi.c:989: undefined reference to
`DES_cbc_encrypt'

*** Error code 1

 

"home/renju/netsnmp/net-snmp-5.4.2.1/" is the path where I have the
net-snmp source.

 

Thanks & Regards,

Renju

 

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to