php.net |  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: None
 [2004-12-06 10:53 UTC] 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....


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-07 01:34 UTC] iliaa@php.net
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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC