Wednesday, January 4, 2012
phpize error: unknown type name 'pval'
got this error ? suddenly unknown pval type ? because upgrading from php 5.3 to php 5.4 ?, sucks right ?
yeah, pval has been changed to zval, so if we find any source that use pval type, we need to find the newer source that has been updated to zval, if we unlucky to find one, edit the source by our self.
I got this problem when I tried to do 'pecl install stats' under php 5.4, the error was beginning with :
/var/tmp/stats/statistics.c:165:2: error: unknown type name 'pval'
well, then manually replace all pval with zval under statistics.c file (total 5 replacement, using %s vi command), but with one trick, since PECL will always reload from the source and delete any temporary local file, we have to make our updated file unwriteable, by issuing chattr +ui /var/tmp/stats/statistics.c., and the trick to get that statistic.c at the first time, press ctrl break on the first stage of pecl install when it decompressing the source, then update and lock the file with above trick.
Posted by arpol at 12:41 PM