#30995 [Opn->Csd]: Net-SNMP5.2 causes compile failure in ext/snmp/snmp.c
ID: 30995
Updated by: iliaa@php.net
Reported By: robbat2 at gentoo dot org
-Status: Open
+Status: Closed
Bug Type: Compile Failure
Operating System: Linux
PHP Version: Irrelevant
New Comment:
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
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2004-12-06 10:53:11] robbat2 at gentoo dot org
Description:
------------
(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:
http://cvs.sourceforge.net/viewcvs.py/net-snmp/net-snmp/snmplib/snmpusm.c?r1=5.10&r2=5.11&only_with_tag=MAIN
http://cvs.sourceforge.net/viewcvs.py/net-snmp/net-snmp/snmplib/snmpv3.c?r1=5.9&r2=5.10&only_with_tag=MAIN
http://www.ietf.org/rfc/rfc3826.txt
Note the removal of the following symbols:
usmAES192PrivProtocol
usmAES256PrivProtocol
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:
http://dev.gentoo.org/~robbat2/php4-netsnmp52-aes.diff
Patch for PHP5:
http://dev.gentoo.org/~robbat2/php5-netsnmp52-aes.diff
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....
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30995&edit=1
Thread (2 messages)