RE: 5.4.1 / Cygwin / SNMP perl module installation / Building libTrapReceiver.ddl.a failed

"Landry Caroline" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <BD939068A237684292AF8E6FFB365F1302305123@CESSSMAIL01.eu.thmulti.com>
Hi Dave,

I am impressed by your time response... :-D

I tried your first solution, but it seems that I had the same problem:

gcc -shared -o  TrapReceiver.dll -Wl,--out-implib=libTrapReceiver.dll.a
-Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--stack,8388608
-Wl,--enable-auto-image-base \
-s -L/usr/local/lib TrapReceiver.o
/usr/lib/perl5/5.8/cygwin/CORE/libperl.dll.a -L/usr/local/lib
-lnetsnmptrapd -lnetsnmpagent -lnetsnmp
/usr/local/lib/libnetsnmptrapd.a(snmptrapd_handlers.o): In function
`syslog_handler':
/cygdrive/c/Temp/net-snmp-5.4.1/apps/snmptrapd_handlers.c:592: undefined
reference to `_SyslogTrap'
/cygdrive/c/Temp/net-snmp-5.4.1/apps/snmptrapd_handlers.c:592: undefined
reference to `_SyslogTrap'
/usr/local/lib/libnetsnmptrapd.a(snmptrapd_handlers.o): In function
`print_handler':
/cygdrive/c/Temp/net-snmp-5.4.1/apps/snmptrapd_handlers.c:679: undefined
reference to `_dropauth'
/usr/local/lib/libnetsnmptrapd.a(snmptrapd_handlers.o): In function
`event_handler':
/cygdrive/c/Temp/net-snmp-5.4.1/apps/snmptrapd_handlers.c:962: undefined
reference to `_event_input'
/cygdrive/c/Temp/net-snmp-5.4.1/apps/snmptrapd_handlers.c:962: undefined
reference to `_event_input'
/usr/local/lib/libnetsnmptrapd.a(snmptrapd_handlers.o): In function
`notification_handler':
/cygdrive/c/Temp/net-snmp-5.4.1/apps/snmptrapd_handlers.c:1032:
undefined reference to `_log_notification'
/cygdrive/c/Temp/net-snmp-5.4.1/apps/snmptrapd_handlers.c:1032:
undefined reference to `_log_notification'
/usr/local/lib/libnetsnmpagent.a(agent_registry.o): In function
`netsnmp_subtree_load':
/cygdrive/c/Temp/net-snmp-5.4.1/agent/agent_registry.c:415: undefined
reference to `_netsnmp_register_null_context'
/cygdrive/c/Temp/net-snmp-5.4.1/agent/agent_registry.c:417: undefined
reference to `_netsnmp_register_null_context'
/cygdrive/c/Temp/net-snmp-5.4.1/agent/agent_registry.c:419: undefined
reference to `_netsnmp_register_null_context'
/usr/local/lib/libnetsnmpagent.a(agent_registry.o): In function
`setup_tree':
/cygdrive/c/Temp/net-snmp-5.4.1/agent/agent_registry.c:1606: undefined
reference to `_netsnmp_register_null'
/cygdrive/c/Temp/net-snmp-5.4.1/agent/agent_registry.c:1607: undefined
reference to `_netsnmp_register_null'
/cygdrive/c/Temp/net-snmp-5.4.1/agent/agent_registry.c:1608: undefined
reference to `_netsnmp_register_null'
/usr/local/lib/libnetsnmpagent.a(agent_registry.o): In function
`register_mib_context':
/cygdrive/c/Temp/net-snmp-5.4.1/agent/agent_registry.c:838: undefined
reference to `_netsnmp_register_old_api'
/usr/local/lib/libnetsnmpagent.a(snmp_vars.o): In function `init_agent':
/cygdrive/c/Temp/net-snmp-5.4.1/agent/snmp_vars.c:307: undefined
reference to `_netsnmp_init_helpers'
/usr/local/lib/libnetsnmpagent.a(agent_handler.o): In function
`netsnmp_register_handler':
/cygdrive/c/Temp/net-snmp-5.4.1/agent/agent_handler.c:246: undefined
reference to `_netsnmp_get_bulk_to_next_handler'
/usr/local/lib/libnetsnmpagent.a(master.o): In function
`agentx_got_response':
/cygdrive/c/Temp/net-snmp-5.4.1/agent/mibgroup/agentx/master.c:408:
undefined reference to `_netsnmp_bulk_to_next_fix_requests'
Creating library file: libTrapReceiver.dll.a
collect2: ld returned 1 exit status
perlld: *** system() failed to execute
gcc -shared -o  TrapReceiver.dll -Wl,--out-implib=libTrapReceiver.dll.a
-Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--stack,8388608
-Wl,--enable-auto-image-base \
-s -L/usr/local/lib TrapReceiver.o
/usr/lib/perl5/5.8/cygwin/CORE/libperl.dll.a -L/usr/local/lib
-lnetsnmptrapd -lnetsnmpagent -lnetsnmp

make[1]: *** [../blib/arch/auto/NetSNMP/TrapReceiver/TrapReceiver.dll]
Error 2
make[1]: Leaving directory
`/cygdrive/c/Temp/net-snmp-5.4.1/perl/TrapReceiver'
make: *** [subdirs] Error 2


For the second solution, I tried:
configure \
   --with-mib-modules="host agentx disman/event-mib examples/example" \
   --with-out-mib-modules=host/hr_network --with-libs="-lws2_32" \
   --prefix="/usr/local"

Maybe it does the same than the "--with-perl-modules" option? But the
build of net-snmp failed in this case. Unfortunately I do not have the
traces of this try anymore.
So I will run your second option and let you know the result, probably
tomorrow.

Thanks again!

Caroline

-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of Dave Shield
Sent: jeudi 31 janvier 2008 16:03
To: Landry Caroline
Cc: [email protected]
Subject: Re: 5.4.1 / Cygwin / SNMP perl module installation / Building
libTrapReceiver.ddl.a failed

On 31/01/2008, Landry Caroline <[email protected]> wrote:
> I am working on Cygwin, I installed net-snmp 5.4.1 and I want to use
mib2c,
> but for this I need to install the SNMP perl module and this fails.


> cd /cygdrive/c/Temp/net-snmp-5.4.1/perl
> perl Makefile.PL -NET-SNMP-IN-SOURCE=true
> make

What happens if you try

    perl Makefile.PL
    make

?
I.e. using the installed version of the Net-SNMP suite, rather
than the source tree?



> configure \
>    --with-mib-modules="host agentx disman/event-mib examples/example"
\
>    --with-out-mib-modules=host/hr_network --with-libs="-lws2_32" \
>    --prefix="/usr/local" \
>    --disable-embedded-perl --without-perl-modules

What happens if you configure the original source using
   "--with-perl-modules"
?
I.e. building everything in one go, rather than building the perl
modules separately

Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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.