рУССКИЙ
ИДИ НАХУЙ

Решил я как-то попробовать установить рядом две версии php. Программ, которые это делают около 10 штук. Я начал настировать phpswitch http://jubianchi.github.io/phpswitch/ . С установкой проблем не возникло. А вот с компиляция прошла не с первого раза.
configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
Ладно, это решается быстро
sudo apt-get install libxslt-dev
Дальше больше
Error Output: ================ /home/romcom/.phpswitch/sources/php-5.3.0/ext/dom/node.c: In function 'dom_canonicalization': /home/romcom/.phpswitch/sources/php-5.3.0/ext/dom/node.c:1903:21: error: dereferencing pointer to incomplete type 'xmlBuf {aka struct _xmlBuf}' ret = buf->buffer->use; ^ make: *** [ext/dom/node.lo] Error 1 Error Output: ================ /home/romcom/.phpswitch/sources/php-5.3.0/ext/dom/documenttype.c: In function 'dom_documenttype_internal_subset_read': /home/romcom/.phpswitch/sources/php-5.3.0/ext/dom/documenttype.c:209:42: error: dereferencing pointer to incomplete type 'xmlBuf {aka struct _xmlBuf}' strintsubset = xmlStrndup(buff->buffer->content, buff->buffer->use); ^ make: *** [ext/dom/documenttype.lo] Error 1
И дургие подобные ошибки. Дело в том, что в последних версиях libxml изменили доступ к объекту. Теперь вместо
buff->buffer->content
нужно писать
xmlOutputBufferGetContent(buff)
В общем, подправил я это все руками и компиляций прошла успешно. Спустя дня 3 обнаружил ресурс с патчами для решения данных проблем.
https://github.com/hnw/phpall/blob/master/patches/patch-to-php-5.3.0-with-libxml2-2.9.txt
#ifdef LIBXML2_NEW_BUFFER strintsubset = xmlStrndup(xmlOutputBufferGetContent(buff), xmlOutputBufferGetSize(buff)); #else strintsubset = xmlStrndup(buff->buffer->content, buff->buffer->use); #endif
#ifdef LIBXML2_NEW_BUFFER RETVAL_STRINGL((char *)xmlOutputBufferGetContent(outbuf), xmlOutputBufferGetSize(outbuf), 1); #else RETVAL_STRINGL((char *)outbuf->buffer->content, outbuf->buffer->use, 1); #endif
рУССКИЙ
ИДИ НАХУЙ
Добавить комментарий