Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.10.18

Request #5527 alternative approach to determining glibc version
Submitted: 2005-09-26 21:04 UTC
From: bertrand at togg dot com Assigned: cellog
Status: Closed Package: PEAR
PHP Version: 4.3.11 OS: FC3
Roadmaps: (Not assigned)    
Subscription  


 [2005-09-26 21:04 UTC] bertrand at togg dot com
Description: ------------ I loosed cpp: # mv /usr/bin/cpp /usr/bin/cpp.sav # hash -d cpp # pear uninstall HTML_Template_Sigma sh: /usr/bin/cpp: No such file or directory pear/html_menu can be optionally used by installed package "pear/HTML_Template_Sigma" pear/HTML_Template_Sigma (version >= 1.1.2) can be optionally used by installed package "pear/html_progress" uninstall ok: channel://pear.php.net/HTML_Template_Sigma-1.1.3 [root@ancilla tw19]# pear install HTML_Template_Sigma sh: /usr/bin/cpp: No such file or directory downloading HTML_Template_Sigma-1.1.3.tgz ... Starting to download HTML_Template_Sigma-1.1.3.tgz (27,068 bytes) .........done: 27,068 bytes install ok: channel://pear.php.net/HTML_Template_Sigma-1.1.3 What is this cpp complain ? Where is pear needing that ? Should I try to install raw pear in this state ? (HTML_Template_Sigma is just an example here) (reported on irc #pear , forward to the person possible)

Comments

 [2005-09-27 02:55 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2005-09-27 22:01 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2005-09-28 16:03 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2005-10-09 01:24 UTC] soporte at onfocus dot cl
I have yet another aproach for the popen() and cpp stuff: Index: Guess.php =================================================================== RCS file: /repository/pear-core/OS/Guess.php,v retrieving revision 1.19 diff -u -a -r1.19 Guess.php --- Guess.php 27 Sep 2005 02:55:26 -0000 1.19 +++ Guess.php 9 Oct 2005 01:17:14 -0000 @@ -74,7 +74,7 @@ // Darwin home-eden.local 7.5.0 Darwin Kernel Version 7.5.0: Thu Aug 5 19:26:16 PDT 2004; root:xnu/xnu-517.7.21.obj~3/RELEASE_PPC Power Macintosh // // Mac OS X early versions -// +// // }}} @@ -207,6 +207,27 @@ if (!file_exists('/usr/bin/cpp') || !is_executable('/usr/bin/cpp')) { return $glibc = ''; } + if ($features_file = @fopen('/usr/include/features.h','rb') ) { + + while (!feof($features_file)) { + + $line = fgets($features_file, 4096); + + if ( strpos($line,'define') && strpos ($line,'__GLIBC__') ) { + //major version number + $glibc_major = substr($line ,17); + + } elseif ( strpos($line,'define') && strpos ($line,'__GLIBC_MINOR__') ) { + // got the minor version number + $glibc_minor = substr($line ,23); + + } + } + fclose($features_file); + + return 'glibc' . trim($glibc_major) . "." . trim($glibc_minor) ; + + } $tmpfile = System::mktemp("glibctest"); $fp = fopen($tmpfile, "w"); fwrite($fp, "#include <features.h>\n__GLIBC__ __GLIBC_MINOR__\n"); of course your folks can to this better, you can think adding that patch as an alternative, or simple remove that "tricky" popen() call (BTW.. a warning is issued when popen() is forbidden ( listed on disable_functions) )
 [2005-10-09 03:03 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2005-10-09 06:45 UTC] soporte at onfocus dot cl
_detectGlibcVersion() is affected by open_basedir (AFAIK) cellog: Why the glibc _version_ is specifically needed (???) what's done with that information ? probably I'm missing something...
 [2005-10-26 19:34 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!