Building for php5 or php5-extensions

Development 의견 남기기

잘동작하던 서버에 apache 모듈을 추가하면서 다시 컴파일 하려고 하는데 되지 않는다.
결국 포트가 엉켜서 일부 포트를 삭제하고 다시설치하면서 조정하고 있는 중 PHP의 익스텐션들이 제대로 로드되지 않는다. 자세히 보니 php5-filter 에 관련된 오류였다.

자세한 오류내용은 대략 다음과 같다.

In file included from /usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:25:
/usr/local/include/php/ext/pcre/php_pcre.h:29:18: error: pcre.h: No such file or directory
In file included from /usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:25:
/usr/local/include/php/ext/pcre/php_pcre.h:37: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
/usr/local/include/php/ext/pcre/php_pcre.h:38: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
/usr/local/include/php/ext/pcre/php_pcre.h:44: error: expected specifier-qualifier-list before 'pcre'
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c: In function 'php_filter_validate_regexp':
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:412: error: 'pcre' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:412: error: (Each undeclared identifier is reported only once
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:412: error: for each function it appears in.)
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:412: error: 're' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:413: error: 'pcre_extra' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c: In function 'php_filter_validate_email':
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:500: error: 'pcre' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:500: error: 're' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:501: error: 'pcre_extra' undeclared (first use in this function)
*** Error code 1
1 error
*** Error code 1
 
Stop in /usr/ports/security/php5-filter.

결국 아래와 같이 해결할 수 있었다.

$cd /usr/ports/lang/php5/
$make extract
$cp /usr/ports/lang/php5/work/php-5.3.2/ext/pcre/pcrelib/pcre.h /usr/local/include/php/ext/pcre/

덕분에 정신없는 와중 4시간에 걸쳐 시스템 리빌드 완료.

의견을 남겨주세요

Trackback URL : http://blueruin.org/archives/421/trackback

WP Theme & Icons by N.Design Studio
Entries RSS Log in