#30995 [NEW]: Net-SNMP5.2 causes compile failure in ext/snmp/snmp.c
From: robbat2 at gentoo dot org
Operating system: Linux
PHP version: Irrelevant
PHP Bug Type: Compile Failure
Bug description: Net-SNMP5.2 causes compile failure in ext/snmp/snmp.c
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 bug report at http://bugs.php.net/?id=30995&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30995&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30995&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30995&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=30995&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=30995&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=30995&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=30995&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=30995&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30995&r=support
Expected behavior: http://bugs.php.net/fix.php?id=30995&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30995&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30995&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=30995&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30995&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=30995&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=30995&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30995&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=30995&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=30995&r=mysqlcfg
Thread (2 messages)
- robbat2 at gentoo dot org