|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30995 Net-SNMP5.2 causes compile failure in ext/snmp/snmp.c
Submitted: 2004-12-06 10:53 UTC Modified: 2004-12-07 01:34 UTC
From: robbat2 at gentoo dot org Assigned:
Status: Closed Package: Compile Failure
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID:
 [2004-12-06 10:53 UTC] robbat2 at gentoo dot org
(Apologies if this is a dupe, my ISP is having some issues tonight)

PHP4* and PHP5* (including the latest releases AND CVS checkouts) do NOT compile on a system with Net-SNMP 5.2*.

This is because Net-SNMP has become more standards-compliant and got rid of some AES192/AES256 stuff they had.

To conform with RFC3826, these are the changes they made:

Note the removal of the following symbols:

PHP uses the above 2 symbols.

I've got a patch for ext/snmp/snmp.c to make PHP compile properly for all versions of net-snmp now.

Patch for PHP4:
Patch for PHP5:

Reproduce code:
Install NET-SNMP-5.2*
configure with SNMP turned on
try to build.

Expected result:
should compile fine.

Actual result:
/bin/sh /var/tmp/portage/php-5.0.2-r1/work/php-5.0.2/libtool --silent --preserve-dup-deps --mode=compile gcc -I/var/tmp/portage/php-5.0.2-r1/work/php-5.0.2/ext/sqlite/libsqlite/src -Iext/sqlite/ -I/var/tmp/portage/php-5.0.2-r1/work/php-5.0.2/ext/sqlite/ -DPHP_ATOM_INC -I/var/tmp/portage/php-5.0.2-r1/work/php-5.0.2/include -I/var/tmp/portage/php-5.0.2-r1/work/php-5.0.2/main -I/var/tmp/portage/php-5.0.2-r1/work/php-5.0.2 -I/var/tmp/portage/php-5.0.2-r1/work/php-5.0.2/Zend -I/usr/include/libxml2 -I/usr/include/freetype2 -I/usr/include/imap -I/var/tmp/portage/php-5.0.2-r1/work/php-5.0.2/ext/mbstring/oniguruma -I/var/tmp/portage/php-5.0.2-r1/work/php-5.0.2/ext/mbstring/libmbfl -I/var/tmp/portage/php-5.0.2-r1/work/php-5.0.2/ext/mbstring/libmbfl/mbfl -I/usr/include/pspell  -I/var/tmp/portage/php-5.0.2-r1/work/php-5.0.2/TSRM  -O3 -march=athlon-xp -fomit-frame-pointer -pipe  -prefer-pic -c /var/tmp/portage/php-5.0.2-r1/work/php-5.0.2/ext/sqlite/sqlite.c -o ext/sqlite/sqlite.lo
/var/tmp/portage/php-5.0.2-r1/work/php-5.0.2/ext/snmp/snmp.c: In function `netsnmp_session_set_sec_protocol':
/var/tmp/portage/php-5.0.2-r1/work/php-5.0.2/ext/snmp/snmp.c:795: error: `usmAES192PrivProtocol' undeclared (first use in this function)
/var/tmp/portage/php-5.0.2-r1/work/php-5.0.2/ext/snmp/snmp.c:795: error: (Each undeclared identifier is reported only once
/var/tmp/portage/php-5.0.2-r1/work/php-5.0.2/ext/snmp/snmp.c:795: error: for each function it appears in.)
/var/tmp/portage/php-5.0.2-r1/work/php-5.0.2/ext/snmp/snmp.c:799: error: `usmAES256PrivProtocol' undeclared (first use in this function)
/var/tmp/portage/php-5.0.2-r1/work/php-5.0.2/ext/snmp/snmp.c: In function `netsnmp_session_gen_auth_key':
/var/tmp/portage/php-5.0.2-r1/work/php-5.0.2/ext/snmp/snmp.c:822: warning: initialization discards qualifiers from pointer target type
/var/tmp/portage/php-5.0.2-r1/work/php-5.0.2/ext/snmp/snmp.c: In function `netsnmp_session_gen_sec_key':
/var/tmp/portage/php-5.0.2-r1/work/php-5.0.2/ext/snmp/snmp.c:851: warning: initialization discards qualifiers from pointer target type
make: *** [ext/snmp/snmp.lo] Error 1
make: *** Waiting for unfinished jobs....


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-07 01:34 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Thu Nov 26 10:01:54 2015 UTC