<env>

1. fedora 11

2. net-snmp-5.3.2


<Problem 1>


1. I copied library source files in agent/mibgroup directory


2. mib-module is  fan.c log.c 


3. fan.c and log.c call function in nex_fan.c (nex_fan.c is library source file)


4. I made library file named libnexcmd.a with library source files like as nex_fan.c  but I didn't include library in Make file and I didn't link library. 


5. I  didn't modified LD_LIBRATY_PATH, so any library didn't link 


6. But when  I make net-snmp, no error arised even though no library linked


Below is install script


===============================================================================================


./configure --host=i386-linux --build=ppc-linux --target=ppc-linux --prefix=/usr --exec-prefix=/usr --enable-shared --disable-debugging --enable-mini-agent --with-mibs="IP-MIB:IF-MIB:TCP-MIB:UDP-MIB:SNMPv2-MIB:RFC1213-MIB:NEXCOMM-FAN-MIB:NEXCOMM-LOG-MIB:NEXCOMM-MODULE-MIB" --with-mib-modules="agentx ucd-snmp/dlmod nextest/fan nextest/log nextest/module" --with-enterprise-notification-oid=.1.3.6.1.4.1.5927.99.12.1 --sysconfdir=/etc --localstatedir=/var --enable-internal-md5 --enable-snmpv1 --enable-snmpv2c --disable-embedded-perl --with-cc=ppc_82xx-gcc --with-linkcc=ppc_82xx-gcc --with-ar=ppc_82xx-ar --with-endianness=big --with-install-prefix=/home/test/install --without-rpm | tee snmp.config.l



make | tee snmp.config.log


perl -pi -e "s|^prefix=/usr|prefix=/home/psyche/sychoi/install/usr|" net-snmp-config


perl -pi -e "s|^exec_prefix=/usr|exec_prefix=/home/psyche/sychoi/install/usr|" net-snmp-config


make install | tee snmp.intall.log


==========================================================================================






<Problem 2>


1. When I add module.c in upper install script , no library error occured but problem about semaphore occur 

The problem when i didn't include semaphore.h occur,  ex) undefined reference sem_init, sem_post, sem_wait....


2. To resolve this problem, I reinstall net-snmp in new directory and copy fan.c module.c log.c and library source files in agent/mibgroup, and linked library but problem still remain 


This is error code 


============================================================================================

/bin/sh ../libtool  --mode=link ppc_82xx-gcc -g -O2 -Dlinux  -o snmpd snmpd.lo    libnetsnmpmibs.la libnetsnmpagent.la helpers/libnetsnmphelpers.la  ../snmplib/libnetsnmp.la -ldl -lcrypto -lm   

ppc_82xx-gcc -g -O2 -Dlinux -o snmpd snmpd.o  ./.libs/libnetsnmpmibs.a ./.libs/libnetsnmpagent.a helpers/.libs/libnetsnmphelpers.a ../snmplib/.libs/libnetsnmp.a -ldl -lcrypto -lm 

./.libs/libnetsnmpmibs.a(module.o): In function `moduleTable_remove':

nextest/module.c:239: undefined reference to `sem_wait'

nextest/module.c:257: undefined reference to `sem_post'

nextest/module.c:247: undefined reference to `sem_post'

./.libs/libnetsnmpmibs.a(module.o): In function `moduleTable_createEntry':

nextest/module.c:196: undefined reference to `sem_wait'

nextest/module.c:199: undefined reference to `sem_post'

./.libs/libnetsnmpmibs.a(module.o): In function `init_module':

nextest/module.c:140: undefined reference to `sem_init'

./.libs/libnetsnmpmibs.a(module.o): In function `moduleTable_removeEntry':

nextest/module.c:214: undefined reference to `sem_wait'

nextest/module.c:230: undefined reference to `sem_post'

nextest/module.c:220: undefined reference to `sem_post'

./.libs/libnetsnmpmibs.a(module.o): In function `moduleTable_get_next_data_point':

nextest/module.c:285: undefined reference to `sem_wait'

nextest/module.c:303: undefined reference to `sem_post'

nextest/module.c:300: undefined reference to `sem_post'

collect2: ld returned 1 exit status

make[1]: *** [snmpd] error1

make[1]: Leaving directory `/home/test/net-snmp-5.3.2/agent'

make: *** [subdirs] error 1

========================================================================================


sorry for my poor english

Please help me....




------------------------------------------------------------------------------
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to