When accessing ganglia web pages I get: Fatal error: Call to undefined function xml_parser_create() in /var/www/localhost/htdocs/ganglia/ganglia.php on line 291 This seems to be related to bug #213061. # emerge -pv php These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] dev-lang/php-5.2.10-r1 USE="apache2 berkdb bzip2 cgi crypt gdbm kerberos ncurses pcre readline ssl unicode zlib (-adabas) -bcmath (-birdstep) -calendar -cdb -cjk -cli -concurrentmodphp -ctype -curl -curlwrappers -db2 -dbase (-dbmaker) -debug -discard-path -doc (-empress) (-empress-bcs) (-esoob) -exif -fastbuild (-fdftk) -filter (-firebird) -flatfile -force-cgi-redirect (-frontbase) -ftp -gd -gd-external -gmp -hash -iconv -imap -inifile -interbase -iodbc -ipv6 (-java-external) -json -kolab -ldap -ldap-sasl -libedit -mcve -mhash -msql -mssql -mysql -mysqli -nls -oci8 -oci8-instant-client -odbc -pcntl -pdo -pic -posix -postgres -qdbm -recode -reflection -sapdb -session -sharedext -sharedmem -simplexml -snmp -soap -sockets (-solid) -spell -spl -sqlite -suhosin (-sybase) (-sybase-ct) -sysvipc -threads -tidy -tokenizer -truetype -wddx -xml -xmlreader -xmlrpc -xmlwriter -xpm -xsl -yaz -zip" 0 kB # And the "fix" for me was to force the USE flag as in $subject.
Can you make sure you're using the stable 3.1.2 ebuild from portage? Unless I'm using depend.php.eclass incorrectly, this should be getting checked in pkg_setup().
Yes, I do use it from the official portage tree only.
Works fine for me. Can you check again on your side? Perhaps you rebuilt php with different USE flags after installing ganglia? I'll admit that ganglia could make use of USE-deps, which I plan on doing in the next version bump. >>> Installing (1 of 2) dev-lang/php-5.2.10 >>> Emerging (2 of 2) sys-cluster/ganglia-3.1.2 >>> Failed to emerge sys-cluster/ganglia-3.1.2, Log file: >>> '/var/tmp/portage/sys-cluster/ganglia-3.1.2/temp/build.log' >>> Jobs: 1 of 2 complete, 1 failed Load avg: 1.62, 1.12, 0.57 * * Using dev-lang/php-5.2.10 * * * Using dev-lang/php-5.2.10 * * Checking for required PHP feature(s) ... * Discovered missing USE flag: xml * Discovered missing USE flag: ctype * * dev-lang/php-5.2.10 needs to be re-installed with all of the following * USE flags enabled: * * xml ctype pcre
# emerge -pv ganglia These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] sys-cluster/ganglia-3.1.2 USE="python -minimal -vhosts" 0 kB Total: 1 package (1 reinstall), Size of downloads: 0 kB * IMPORTANT: 2 news items need reading for repository 'gentoo'. * Use eselect news to read news items. # ls -la /nfslarge/usr/portage/sys-cluster/ganglia/ganglia-3.1.2.ebuild -rw-r--r-- 1 root root 5443 Jun 20 20:36 /nfslarge/usr/portage/sys-cluster/ganglia/ganglia-3.1.2.ebuild # md5sum /nfslarge/usr/portage/sys-cluster/ganglia/ganglia-3.1.2.ebuild 4d07f10fc9f1e44ed01066b666f9327a /nfslarge/usr/portage/sys-cluster/ganglia/ganglia-3.1.2.ebuild # head /nfslarge/usr/portage/sys-cluster/ganglia/ChangeLog # ChangeLog for sys-cluster/ganglia # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 # $Header: /var/cvsroot/gentoo-x86/sys-cluster/ganglia/ChangeLog,v 1.33 2009/07/13 18:53:12 jsbronder Exp $ 13 Jul 2009; Justin Bronder <jsbronder@gentoo.org> files/gmetad.rc, files/gmond.rc: Start ganglia services after ntp{d,-client}. http://thread.gmane.org/gmane.comp.monitoring.ganglia.general/202/ 20 Jun 2009; Justin Bronder <jsbronder@gentoo.org> ganglia-3.1.2.ebuild: # find /nfslarge/usr/portage -name ganglia /nfslarge/usr/portage/sys-cluster/ganglia # # cat /etc/portage/package.use # enable only on nfssrv, on nodes it is not necessary as it does not run ganglia =dev-lang/php-5.2.9-r2 cli cgi apache2 gd xml ctype net-fs/nfs-utils -kerberos dev-libs/openssl -kerberos app-editors/vim -minimal python -acl bash-completion cscope gpm -nls perl -ruby vim-pager -vim-with-x # do this only on nfssrv on nodes keep all sys-cluster/torque server mail-client/mutt vanilla x11-base/xorg-server -minimal # avoid getting error Fatal error: Call to undefined function preg_match() in /var/www/localhost/htdocs/ganglia/class.TemplatePower.inc.php on line 169 # when accessing http://darwin.natur.cuni.cz/ganglia/ . The function is internal to php and appears when no PCRE support is enabled or when broken # Similarly force xml, see bug #213061 dev-lang/php pcre xml # Maybe because I have two lines for dev-lang/php in package.use file?
And for completeness: # emerge -pv dev-lang/php These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] dev-lang/php-5.2.10-r1 USE="apache2 berkdb bzip2 cgi crypt gdbm kerberos ncurses pcre readline ssl unicode xml zlib (-adabas) -bcmath (-birdstep) -calendar -cdb -cjk -cli -concurrentmodphp -ctype -curl -curlwrappers -db2 -dbase (-dbmaker) -debug -discard-path -doc (-empress) (-empress-bcs) (-esoob) -exif -fastbuild (-fdftk) -filter (-firebird) -flatfile -force-cgi-redirect (-frontbase) -ftp -gd -gd-external -gmp -hash -iconv -imap -inifile -interbase -iodbc -ipv6 (-java-external) -json -kolab -ldap -ldap-sasl -libedit -mcve -mhash -msql -mssql -mysql -mysqli -nls -oci8 -oci8-instant-client -odbc -pcntl -pdo -pic -posix -postgres -qdbm -recode -reflection -sapdb -session -sharedext -sharedmem -simplexml -snmp -soap -sockets (-solid) -spell -spl -sqlite -suhosin (-sybase) (-sybase-ct) -sysvipc -threads -tidy -tokenizer -truetype -wddx -xmlreader -xmlrpc -xmlwriter -xpm -xsl -yaz -zip" 0 kB
Closing, this works as intended. pkg_setup() { if ! use minimal ; then require_gd require_php_with_use xml ctype pcre webapp_pkg_setup fi }