Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 29168 - php-4.3.3-r1 and mod_php-4.3.2-r4 ebuild fails with USE=SNMP
Summary: php-4.3.3-r1 and mod_php-4.3.2-r4 ebuild fails with USE=SNMP
Status: RESOLVED DUPLICATE of bug 28263
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-19 20:49 UTC by Jason Warner
Modified: 2005-07-17 13:06 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
/var/tmp/portage/php-4.3.3-r2/work/php-4.3.3/config.log (config.log,131.00 KB, text/plain)
2003-10-02 13:29 UTC, Jacques Supcik
Details
strace of php (php_strace.log,128.63 KB, text/plain)
2003-10-22 10:41 UTC, Jason Warner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Warner 2003-09-19 20:49:56 UTC
I cannot get the CLI version of PHP to install with SNMP. I have tried the 
4.3.2-r1, 4.3.2-r2, and 4.3.3-r1 ebuilds. I have net-snmp-5.0.6-r1 installed. I 
am able to emerge PHP without SNMP with no problems.


Reproducible: Always
Steps to Reproduce:
1. emerge -C php
2. emerge php (with snmp in make.conf)
3.

Actual Results:  
Build complete. 
(It is safe to ignore warnings about tempnam and tmpnam). 


>>> Install php-4.3.3-r1 into /var/tmp/portage/php-4.3.3-r1/image/ category dev-
php 
Installing shared extensions: /var/tmp/portage/php-4.3.3-
r1/image//usr/lib/php/extensions/no-debug-non-zts-20020429/ 
Installing PEAR environment: /var/tmp/portage/php-4.3.3-r1/image//usr/lib/php/ 
ACCESS DENIED open_wr: /usr/local/share/snmp/mibs/.index 
[PEAR] Archive_Tar - installed: 1.1 
[PEAR] Console_Getopt - installed: 1.0 
[PEAR] PEAR - installed: 1.2.1 
Wrote PEAR system config file at: /var/tmp/portage/php-4.3.3-
r1/image///etc/pear.conf 
You may want to add: /usr/lib/php to your php.ini include_path 
ACCESS DENIED open_wr: /usr/local/share/snmp/mibs/.index 
[PEAR] DB - installed: 1.5.0RC1 
[PEAR] HTTP - installed: 1.2.1 
[PEAR] Mail - installed: 1.1.1 
[PEAR] Net_SMTP - installed: 1.2.3 
[PEAR] Net_Socket - installed: 1.0.1 
[PEAR] XML_Parser - installed: 1.0.1 
[PEAR] XML_RPC - installed: 1.0.4 
Installing build environment: /var/tmp/portage/php-4.3.3-
r1/image//usr/lib/php/build/ 
Installing header files: /var/tmp/portage/php-4.3.3-r1/image//usr/include/php/ 
Installing helper programs: /var/tmp/portage/php-4.3.3-r1/image//usr/bin/ 
program: phpize 
program: php-config 
program: phpextdist 
make: `install-modules' is up to date. 
make: `install-pear' is up to date. 
make: `install-build' is up to date. 
make: `install-headers' is up to date. 
make: `install-programs' is up to date. 
make: `install-modules' is up to date. 
make: `install-pear' is up to date. 
make: `install-build' is up to date. 
make: `install-headers' is up to date. 
make: `install-programs' is up to date. 
make: `install-modules' is up to date. 
make: `install-pear' is up to date. 
make: `install-build' is up to date. 
make: `install-headers' is up to date. 
make: `install-programs' is up to date. 
patching file php.ini-dist 
Hunk #1 succeeded at 487 (offset -1 lines). 
man: 
prepallstrip: 
strip: 
strip: 
usr/bin/php 
>>> Completed installing into /var/tmp/portage/php-4.3.3-r1/image/ 

--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
 
LOG FILE = "/tmp/sandbox-php-4.3.3-r1-31676.log" 

open_wr: /usr/local/share/snmp/mibs/.index 
open_wr: /usr/local/share/snmp/mibs/.index 
--------------------------------------------------------------------------------

Expected Results:  
successful install

Portage 2.0.49-r3 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1, 2.4.20-lolo-
r1_pre3)
=================================================================
System uname: 2.4.20-lolo-r1_pre3 i686 Pentium III (Katmai)
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/confi
g /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="sandbox ccache autoaddcvs"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu 
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="oss arts avi crypt cups encode foomaticdb libg++ mad mikmod mpeg ncurses 
nls quicktime spell xmms xv zlib gtkhtml gdbm berkdb slang readline bonobo 
tcltk guile sdl gpm python esd imlib oggvorbis motif opengl kde qt sse -3dnow 
mmx mozilla -pdflib png samba ssl svga truetype xml xml2 x86 snmp plotutils 
libwww -java jpeg gif gd -apm aalib apache php perl mysql -X gtk gtk2 gnome -
alsa tcpd pam"
Comment 1 Jason Warner 2003-09-22 11:44:05 UTC
This bug exist for mod_php as well.  Error is as follows:

Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).


>>> Install mod_php-4.3.2-r4 into /var/tmp/portage/mod_php-4.3.2-r4/image/ category dev-php
Installing shared extensions:     /var/tmp/portage/mod_php-4.3.2-r4/image//usr/lib/php/extensions/no-debug-non-zts-20020429/
Installing PEAR environment:      /var/tmp/portage/mod_php-4.3.2-r4/image//usr/lib/php/
ACCESS DENIED  open_wr:   /usr/local/share/snmp/mibs/.index
[PEAR] Archive_Tar    - installed: 0.9
[PEAR] Console_Getopt - installed: 1.0
[PEAR] PEAR           - installed: 1.1
ACCESS DENIED  open_wr:   /usr/local/share/snmp/mibs/.index
[PEAR] DB             - installed: 1.3
[PEAR] HTTP           - installed: 1.2
[PEAR] Mail           - installed: 1.0.1
[PEAR] Net_SMTP       - installed: 1.0
[PEAR] Net_Socket     - installed: 1.0.1
[PEAR] XML_Parser     - installed: 1.0.1
[PEAR] XML_RPC        - installed: 1.0.4
Installing build environment:     /var/tmp/portage/mod_php-4.3.2-r4/image//usr/lib/php/build/
Installing header files:          /var/tmp/portage/mod_php-4.3.2-r4/image//usr/include/php/
Installing helper programs:       /var/tmp/portage/mod_php-4.3.2-r4/image//usr/bin/
  program: phpize
  program: php-config
  program: phpextdist
make: `install-modules' is up to date.
make: `install-pear' is up to date.
make: `install-build' is up to date.
make: `install-headers' is up to date.
make: `install-programs' is up to date.
make: `install-modules' is up to date.
make: `install-pear' is up to date.
make: `install-build' is up to date.
make: `install-headers' is up to date.
make: `install-programs' is up to date.
make: `install-modules' is up to date.
make: `install-pear' is up to date.
make: `install-build' is up to date.
make: `install-headers' is up to date.
make: `install-programs' is up to date.
patching file php.ini-dist
Hunk #1 succeeded at 487 (offset -1 lines).
 * Adding extra symlink to php.ini for Apache
 * Adding extra symlink to Apache extramodules for PHP
 * Installing mod_php shared object now
 * Installing a Apache config for PHP (mod_php.conf)
man:
prepallstrip:
strip: 
strip: 
   usr/lib/apache-extramodules/libphp4.so
>>> Completed installing into /var/tmp/portage/mod_php-4.3.2-r4/image/

--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/tmp/sandbox-mod_php-4.3.2-r4-10125.log"

open_wr:   /usr/local/share/snmp/mibs/.index
open_wr:   /usr/local/share/snmp/mibs/.index
--------------------------------------------------------------------------------
Comment 2 Jacques Supcik 2003-10-02 13:29:18 UTC
Created attachment 18621 [details]
/var/tmp/portage/php-4.3.3-r2/work/php-4.3.3/config.log
Comment 3 Jason Warner 2003-10-13 10:18:12 UTC
This appears to be more of a Gentoo Portage issue than a PHP issue.  The
PHP code seems to compile ok and only fails at the end when portage is moving
files around.  I have compiled PHP with SNMP on another PC with no problems
but I still have the issue on one of my Gentoo boxes.
Comment 4 Marius Mauch (RETIRED) gentoo-dev 2003-10-13 11:03:52 UTC
don't think it's portage related: the errors come in the install stage (they
are just summarized after it), apparently from PEAR. Also /usr/local is completely
wrong there, so it's omething in the php/pear ebuild/eclass.
Comment 5 Whit Blauvelt 2003-10-19 18:44:30 UTC
Just got a failure with php-4.3.3-r2:

gcc  -Iext/sockets/ -I/var/tmp/portage/php-4.3.3-r2/work/php-4.3.3/ext/sockets/
-DPHP_ATOM_INC -I/var/tmp/portage/php-4.3.3-r2/work/php-4.3.3/include -I/var/tmp/portage/php-4.3.3-r2/work/php-4.3.3/main
-I/var/tmp/portage/php-4.3.3-r2/work/php-4.3.3 -I/var/tmp/portage/php-4.3.3-r2/work/php-4.3.3/Zend
-I/usr/include/libxml2 -I/usr/include/mysql -I/usr/include/pspell -I/usr/qt/3/include
-I/var/tmp/portage/php-4.3.3-r2/work/php-4.3.3/ext/xml/expat  -I/var/tmp/portage/php-4.3.3-r2/work/php-4.3.3/TSRM
 -march=pentium3 -O3 -pipe  -c /var/tmp/portage/php-4.3.3-r2/work/php-4.3.3/ext/sockets/sockets.c
-o ext/sockets/sockets.o  && echo > ext/sockets/sockets.lo
In file included from /usr/include/net-snmp/utilities.h:39,
                 from /usr/include/net-snmp/net-snmp-includes.h:64,
                 from /var/tmp/portage/php-4.3.3-r2/work/php-4.3.3/ext/snmp/snmp.c:80:
/usr/include/net-snmp/library/data_list.h:29: syntax error before "netsnmp_data_list"
/usr/include/net-snmp/library/data_list.h:41: syntax error before "void"
/var/tmp/portage/php-4.3.3-r2/work/php-4.3.3/ext/snmp/snmp.c: In function
`netsnmp_session_gen_auth_key':
/var/tmp/portage/php-4.3.3-r2/work/php-4.3.3/ext/snmp/snmp.c:803: warning:
initialization discards qualifiers from pointer target type
/var/tmp/portage/php-4.3.3-r2/work/php-4.3.3/ext/snmp/snmp.c: In function
`netsnmp_session_gen_sec_key':
/var/tmp/portage/php-4.3.3-r2/work/php-4.3.3/ext/snmp/snmp.c:832: warning:
initialization discards qualifiers from pointer target type
make: *** [ext/snmp/snmp.lo] Error 1
make: *** Waiting for unfinished jobs....

!!! ERROR: dev-php/php-4.3.3-r2 failed.
!!! Function php_src_compile, Line 423, Exitcode 2
!!! compile problem
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-10-19 23:13:06 UTC
Whit: please see bug #30336 as that is your problem.
Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-10-19 23:14:16 UTC
Jason/Marius: I can't reproduce this, does it still occur for you? Esp if
you upgrade to net-snmp-5.0.9-r1 ?
Comment 8 Jason Warner 2003-10-20 19:07:31 UTC
Robin,

I still get this error with net-snmp-5.0.9-r1.  I do not have ucd-snmp installed.

jwarner@sequoia jwarner $ epm -q net-snmp
net-snmp-5.0.9-r1
jwarner@sequoia jwarner $ epm -q ucd-snmp
package ucd-snmp is not installed
Comment 9 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-10-20 19:15:37 UTC
jason:
please run the emerge mod_php
then right when it fails, tar up the entire directory (/var/tmp/portage/mod_php-something
where 'something' is the version that just tried to build), and put the file
up somewhere and post a link here so I can examine it.
Comment 10 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-10-21 19:36:29 UTC
whoa, even with that, still no luck in reproducing it. The source of the
problem call is that a standard run of the php opens up the snmp stuff, which
looks for it's mibs files in a few locations (/usr/local/... is NOT one of
them on my machine). I also don't see why it's trying to open it read-write
for you, as it opens them read-only for me (/usr/share/snmp/mibs/.index)

does /usr/local/share/snmp or anything of that sort exist on your machine?
or do you have an snmp config file that points to there?

please do:
emerge -u strace
strace /var/tmp/portage/mod_php-4.3.3-r1/work/php-4.3.3/sapi/cli/php -i
(log that output to a file and attach it here please)
Comment 11 Jason Warner 2003-10-22 10:41:54 UTC
Created attachment 19625 [details]
strace of php
Comment 12 Jason Warner 2003-10-22 10:43:13 UTC
I have files snmp files in both places....

jwarner@sequoia jwarner $ ls -l /usr/local/share/snmp/
total 96
-rwxr-xr-x    1 root     root        36612 Jun  1 04:56 mib2c.array-user.conf
-rwxr-xr-x    1 root     root          397 Jun  1 04:56 mib2c.column_defines.conf
-rwxr-xr-x    1 root     root          499 Jun  1 04:56 mib2c.column_enums.conf
-rwxr-xr-x    1 root     root         1758 Jun  1 04:56 mib2c.conf
-rwxr-xr-x    1 root     root         3640 Jun  1 04:56 mib2c.create-dataset.conf
-rwxr-xr-x    1 root     root         3047 Jun  1 04:56 mib2c.int_watch.conf
-rwxr-xr-x    1 root     root         8872 Jun  1 04:56 mib2c.iterate.conf
-rwxr-xr-x    1 root     root         8772 Jun  1 04:56 mib2c.old-api.conf
-rwxr-xr-x    1 root     root         4949 Jun  1 04:56 mib2c.scalar.conf
drwxrwxrwx    3 root     root         4096 Oct 13 01:43 mibs
drwxr-xr-x    5 root     root         4096 Jun  1 04:56 snmpconf-data

jwarner@sequoia jwarner $ ls -l /usr/share/snmp/
total 96
-rwxr-xr-x    1 root     users       36612 Oct 13 01:06 mib2c.array-user.conf
-rwxr-xr-x    1 root     users         397 Oct 13 01:06 mib2c.column_defines.conf
-rwxr-xr-x    1 root     users         499 Oct 13 01:06 mib2c.column_enums.conf
-rwxr-xr-x    1 root     users        1758 Oct 13 01:06 mib2c.conf
-rwxr-xr-x    1 root     users        3640 Oct 13 01:06 mib2c.create-dataset.conf
-rwxr-xr-x    1 root     users        3047 Oct 13 01:06 mib2c.int_watch.conf
-rwxr-xr-x    1 root     users        8920 Oct 13 01:06 mib2c.iterate.conf
-rwxr-xr-x    1 root     users        8772 Oct 13 01:06 mib2c.old-api.conf
-rwxr-xr-x    1 root     users        4949 Oct 13 01:06 mib2c.scalar.conf
drwxr-xr-x    2 root     root         4096 Oct 13 01:06 mibs
drwxr-xr-x    5 root     root         4096 Sep 19 08:07 snmpconf-data

I do not have a snmp.conf file on my system.

Comment 13 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-10-22 11:38:28 UTC
why do you have net-snmp-5.0.8 installed in /usr/local ?
unless you have particullar need of it custom installed there (which i don't
think you do based on the lack of snmp.conf)

the snmp startup is doing:
open("/usr/local/share/snmp/mibs/.index", O_WRONLY|O_CREAT|O_TRUNC, 0666)
= 4
to update it's index file!

sandbox is blocking this.

unless you need net-snmp-5.0.8 in /usr/local, you should remove it.
Comment 14 Jason Warner 2003-10-22 17:13:10 UTC
Robin,

I removed the /usr/local/share directory and now both mod_php and php install
with snmp.  I'm not sure how or why the snmp files were there or why the
php/snmp install was trying to use them rather than the valid files at /usr/share/snmp.

Thanks for getting to the bottom of this!
Comment 15 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-10-22 17:27:23 UTC
i'd strongly suggest you browse around /usr/local and clean out the rest
of the snmp that is probably lurking there.

i've also updated the eclass (will be in cvs soon) to ensure that it tries
the /usr copy of [net|ucd]-snmp first instead of trying to detect where it
is.
Comment 16 Martin Holzer (RETIRED) gentoo-dev 2003-11-24 06:38:11 UTC
not fixed
Comment 17 Martin Holzer (RETIRED) gentoo-dev 2003-11-24 06:38:21 UTC

*** This bug has been marked as a duplicate of 28263 ***