libphonenumber

https://github.com/adyromantika/vagrant-libphonenumber-build

Built a new C++ PHP extension referencing libphonenumber, crashed with segmentation fault. Might have something to do with x86_64, still investigating. The annoying part is that the block that crashes it is:

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &num) == FAILURE)
     RETURN_NULL();

If argument parsing is omitted and parameters hardcoded, the function is able to return expected result.

Attempted to use 32 bit machine, but libphonenumber build fails:

[ 74%] Building CXX object CMakeFiles/libphonenumber_test.dir/test/phonenumbers/geocoding/phonenumber_offline_geocoder_test.cc.o
/home/vagrant/libphonenumber-read-only/cpp/test/phonenumbers/geocoding/phonenumber_offline_geocoder_test.cc:61:5: error: this decimal constant is unsigned only in ISO C90 [-Werror]
/home/vagrant/libphonenumber-read-only/cpp/test/phonenumbers/geocoding/phonenumber_offline_geocoder_test.cc:63:5: error: this decimal constant is unsigned only in ISO C90 [-Werror]
cc1plus: all warnings being treated as errors
make[2]: *** [CMakeFiles/libphonenumber_test.dir/test/phonenumbers/geocoding/phonenumber_offline_geocoder_test.cc.o] Error 1
make[1]: *** [CMakeFiles/libphonenumber_test.dir/all] Error 2
make: *** [all] Error 2

Also, Ubuntu precise has PHP 5.3

Advertisements