Problem with compiling Net-SNMP - SNMP

This is a discussion on Problem with compiling Net-SNMP - SNMP ; Hello Wes et all, For quite some time I am bumping into a problem with compiling Net-SNMP, now I finally decided to report it, so that you may try to fixed it in your sources,... The problem is as follows: ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Problem with compiling Net-SNMP

  1. Problem with compiling Net-SNMP

    Hello Wes et all,

    For quite some time I am bumping into a problem with compiling
    Net-SNMP, now I finally decided to report it, so that you may
    try to fixed it in your sources,... The problem is as follows:

    I am compiling Net-SNMP package without v1 and v2c support,
    disabling DES and AES, more precisely, running the following
    configuration command line:

    ../configure --with-sys-contact="netadmin@mg-soft.si" --with-sys-location="MG-SOFT d.o.o., Strma ulica 8, SI-2000 Maribor, Slovenia" --with-mib-modules="host if-mib" --disable-snmpv1 --disable-snmpv2c --disable-des --disable-md5 --with-openssl="/usr/local/ssl" --with-transports="UDP" --with-default-snmp-version="3" --with-persistent-directory="/var/net-snmp" --with-logfile="/var/log/snmpd.log" --with-copy-persistent-files="yes" --disable-snmptrapd-subagent

    Afterwards, when running make, compiler fails in

    apps/snmptrapd_log.c

    in line 1091, on undefined constants:

    SNMP_VERSION_1 and SNMP_VERSION_2c

    I solve this by simply commenting out that line:

    if ( pdu->version == SNMP_VERSION_1 || pdu->version == SNMP_VERSION_2c ) {

    and inserting the following line:

    if ( pdu->version != SNMP_VERSION_3 ) {

    so that the whole code looks like:

    ....
    case CHR_SNMP_USER:
    // if ( pdu->version == SNMP_VERSION_1 || pdu->version == SNMP_VERSION_2c ) {
    if ( pdu->version != SNMP_VERSION_3 ) {
    while ((*out_len + pdu->community_len + 1) >= *buf_len) {
    if (!(allow_realloc && snmp_realloc(buf, buf_len))) {
    return 0;
    }
    }

    for (i = 0; i < pdu->community_len; i++) {
    if (isprint(pdu->community[i])) {
    ....

    I am not sure how the change would affect the compilation/execution,
    if SNMPv1 and SNMPv2c were not disabled,... in my case, when using
    only SNMPv3, it works fine.


    Please do not hesitate to contact me if you need any additional
    information.


    Thank you and best regards,

    Matjaz

    --
    Matjaz Vrecko
    MG-SOFT Corporation, Strma ulica 8, SI-2000 Maribor, Slovenia
    Internet: http://www.mg-soft.si/ E-mail:
    Phone: +386 2 2506565, Fax: +386 2 2506566

    -------------------------------------------------------------------------
    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.p...r_id=100&url=/
    _______________________________________________
    Net-snmp-coders mailing list
    Net-snmp-coders@lists.sourceforge.net
    https://lists.sourceforge.net/lists/...et-snmp-coders


  2. Re: Problem with compiling Net-SNMP

    Matjaz Vrecko wrote:
    > apps/snmptrapd_log.c
    >
    > in line 1091, on undefined constants:
    >
    > SNMP_VERSION_1 and SNMP_VERSION_2c


    What net-snmp version are you using? I can't find this problem in current SVN.
    Can you please retest with 5.4.2.pre2?


    +Thomas

    --
    Thomas Anders (thomas.anders at blue-cable.de)

    -------------------------------------------------------------------------
    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.p...r_id=100&url=/
    _______________________________________________
    Net-snmp-coders mailing list
    Net-snmp-coders@lists.sourceforge.net
    https://lists.sourceforge.net/lists/...et-snmp-coders


  3. Re: Problem with compiling Net-SNMP

    Hello Thomas,

    >> apps/snmptrapd_log.c
    >>
    >> in line 1091, on undefined constants:
    >>
    >> SNMP_VERSION_1 and SNMP_VERSION_2c

    >
    > What net-snmp version are you using? I can't find this problem in current SVN.
    > Can you please retest with 5.4.2.pre2?


    I am using NET-SNMP version: 5.4.1.2
    The same problem has been present quite a few versions back.

    I will download 5.4.2.pre2 and try to build it with my set
    of parameters,... will let you know.

    Best regards,

    Matjaz

    --
    Matjaz Vrecko
    MG-SOFT Corporation, Strma ulica 8, SI-2000 Maribor, Slovenia
    Internet: http://www.mg-soft.si/ E-mail:
    Phone: +386 2 2506565, Fax: +386 2 2506566

    -------------------------------------------------------------------------
    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.p...r_id=100&url=/
    _______________________________________________
    Net-snmp-coders mailing list
    Net-snmp-coders@lists.sourceforge.net
    https://lists.sourceforge.net/lists/...et-snmp-coders


  4. Re: Problem with compiling Net-SNMP

    2008/7/28 Matjaz Vrecko :
    > I am compiling Net-SNMP package without v1 and v2c support


    >
    > Afterwards, when running make, compiler fails in
    > apps/snmptrapd_log.c
    > in line 1091, on undefined constants:
    >
    > SNMP_VERSION_1 and SNMP_VERSION_2c


    This problem was fixed last December, in SVN revision 16766
    See http://net-snmp.svn.sourceforge.net/...revision=16766
    for details

    As Thomas has indicated, this fix will be in the upcoming 5.4.2
    release.

    Dave

    -------------------------------------------------------------------------
    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.p...r_id=100&url=/
    _______________________________________________
    Net-snmp-coders mailing list
    Net-snmp-coders@lists.sourceforge.net
    https://lists.sourceforge.net/lists/...et-snmp-coders


  5. Re: Problem with compiling Net-SNMP

    Thank you, Dave!

    Best regards,

    Matjaz

    Dave Shield wrote:
    > 2008/7/28 Matjaz Vrecko :
    >> I am compiling Net-SNMP package without v1 and v2c support

    >
    >> Afterwards, when running make, compiler fails in
    >> apps/snmptrapd_log.c
    >> in line 1091, on undefined constants:
    >>
    >> SNMP_VERSION_1 and SNMP_VERSION_2c

    >
    > This problem was fixed last December, in SVN revision 16766
    > See http://net-snmp.svn.sourceforge.net/...revision=16766
    > for details
    >
    > As Thomas has indicated, this fix will be in the upcoming 5.4.2
    > release.
    >
    > Dave


    --
    Matjaz Vrecko
    MG-SOFT Corporation, Strma ulica 8, SI-2000 Maribor, Slovenia
    Internet: http://www.mg-soft.si/ E-mail:
    Phone: +386 2 2506565, Fax: +386 2 2506566

    -------------------------------------------------------------------------
    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.p...r_id=100&url=/
    _______________________________________________
    Net-snmp-coders mailing list
    Net-snmp-coders@lists.sourceforge.net
    https://lists.sourceforge.net/lists/...et-snmp-coders


+ Reply to Thread