make is failing

"mn kh" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Dear all,

I am trying to write an agentx subagent using net-snmp 5.4.1.2. It uses the
libraries
libnetsnmp.so, libnetsnmpagent.so,libnetsnmpmibs.so,libnetsnmphelpers.so,
libnetsnmp.so.15,libnetsnmpagent.so.15,libnetsnmpmibs.so.15,libnetsnmphelpers.so.15
all symbolic links to their corresponding *.so.15.1.1
my first questionis the following:
is it possible to use the binary made using net-snmp 5.4.1.2 with dynamic
libraries already installed on the system meaning:
 libnetsnmp.so, libnetsnmpagent.so,libnetsnmpmibs.so,libnetsnmphelpers.so,
libnetsnmp.so.5,libnetsnmpagent.so.5,libnetsnmpmibs.so.5,libnetsnmphelpers.so.5
all symbolic links to their corresponding *.so.5.0.9

if this is possible can anyone tell me how can it be done?

On another notice, I developped my subagent in 5.1.4.2 then i decided to use
the netsnmp present on my redhat cd (5.0.9)
When I try to remake my agentx i get the following:
gcc  -o jagentx_subagent jagentx_subagent.o jagentx.o jagentx_util.o
../obj/jcounters.o ../obj/error.o ../obj/util.o ../obj/search.o
../obj/semutil.o `net-snmp-config --agent-libs` -lutil -lcrypt
jagentx_subagent.o(.text+0xaf): In function `main':
/home/jinny/jconsole2.0/jagentx_subagent.c:37: undefined reference to
`netsnmp_daemonize'
/usr/local/lib/libnetsnmp.so: undefined reference to `EVP_DigestInit'
/usr/local/lib/libnetsnmpmibs.so: undefined reference to `rpmdbClose'
/usr/local/lib/libnetsnmp.so: undefined reference to `EVP_DigestFinal'
/usr/local/lib/libnetsnmp.so: undefined reference to `EVP_DigestFinal_ex'
/usr/local/lib/libnetsnmpmibs.so: undefined reference to
`rpmdbGetIteratorOffset'
/usr/local/lib/libnetsnmp.so: undefined reference to `AES_set_encrypt_key'
/usr/local/lib/libnetsnmp.so: undefined reference to `EVP_md5'
/usr/local/lib/libnetsnmpagent.so: undefined reference to `hosts_ctl'
/usr/local/lib/libnetsnmp.so: undefined reference to `HMAC'
/usr/local/lib/libnetsnmp.so: undefined reference to `EVP_MD_CTX_cleanup'
/usr/local/lib/libnetsnmp.so: undefined reference to `SSLeay'
/usr/local/lib/libnetsnmpmibs.so: undefined reference to `rpmdbOpen'
/usr/local/lib/libnetsnmpmibs.so: undefined reference to `rpmdbInitIterator'
/usr/local/lib/libnetsnmp.so: undefined reference to `EVP_sha1'
/usr/local/lib/libnetsnmpmibs.so: undefined reference to `rpmdbNextIterator'
/usr/local/lib/libnetsnmp.so: undefined reference to `EVP_MD_CTX_init'
/usr/local/lib/libnetsnmpmibs.so: undefined reference to `rpmGetPath'
/usr/local/lib/libnetsnmp.so: undefined reference to `EVP_DigestUpdate'
/usr/local/lib/libnetsnmp.so: undefined reference to `RAND_bytes'
/usr/local/lib/libnetsnmp.so: undefined reference to `DES_cbc_encrypt'
/usr/local/lib/libnetsnmpmibs.so: undefined reference to
`rpmReadConfigFiles'
/usr/local/lib/libnetsnmp.so: undefined reference to `DES_ncbc_encrypt'
/usr/local/lib/libnetsnmp.so: undefined reference to `DES_key_sched'
/usr/local/lib/libnetsnmpmibs.so: undefined reference to `rpmdbFreeIterator'
/usr/local/lib/libnetsnmp.so: undefined reference to `AES_cfb128_encrypt'
collect2: ld returned 1 exit status
make: *** [jagentx_subagent] Error 1

if i add -lssl -lrpm i get the following output:
gcc  -o jagentx_subagent jagentx_subagent.o jagentx.o jagentx_util.o
../obj/jcounters.o ../obj/error.o ../obj/util.o ../obj/search.o
../obj/semutil.o `net-snmp-config --agent-libs` -lssl -lrpm -lutil -lcrypt
jagentx_subagent.o(.text+0xaf): In function `main':
/home/jinny/jconsole2.0/jagentx_subagent.c:37: undefined reference to
`netsnmp_daemonize'
/usr/local/lib/libnetsnmpagent.so: undefined reference to `hosts_ctl'
collect2: ld returned 1 exit status
make: *** [jagentx_subagent] Error 1

my question is am i right by adding -lssl and -lrpm, if so, what can i do
for the last undefined references ('netsnmp_daemonize' and 'hosts_ctl')

Thanks in advance
Regards

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.