Re: intl extension on os x

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/28/09 1:40 PM, "Tom Worster" <fsb@xxxxxxxxxx> wrote:

> anyway, in the cli the command collator_create( 'en_US' ); did not provoke
> an error, so maybe that works.
> 
> but if i add extension=intl.so to php.ini and restart apache, php says: PHP
> Warning:  PHP Startup: Unable to load dynamic library
> '/usr/lib/php/extensions/no-debug-non-zts-20060613/intl.so'
> 
> so we're not done yet. if i get it done, maybe i'll blog my recipe.

i should have remembered this. the default config of apache22 on os x is a
64 bit binary. so if php is using apxs then php is also 64 bit. so loadable
modules need to be compiled for 64 bit.

i think the recipe below easily generalizes to other pecl extensions:

cd extname
phpize
MACOSX_DEPLOYMENT_TARGET=10.5 \
CFLAGS="-arch x86_64 -g -Os -pipe -no-cpp-precomp" \
CCFLAGS="-arch x86_64 -g -Os -pipe" \
CXXFLAGS="-arch x86_64 -g -Os -pipe" \
LDFLAGS="-arch x86_64 -bind_at_load" \
./configure --with-icu-dir=/sw
make
make install

the --with-icu-dir=/sw flag is because i used fink libicu36-dev to install
icu headers and it puts them under /sw. see:
http://pdb.finkproject.org/pdb/package.php/libicu36-dev

i haven't done much with it yet but the example here worked for me:
http://www.php.net/manual/en/collator.sort.php

i'm still unsure how to check the version of the ICU headers fink installed
vs the version of the ICU library that comes unsupported with os x.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux