Chinaunix

标题: 【求助】编译安装php make时出错。。。 [打印本页]

作者: BugsMusic    时间: 2008-08-12 21:50
标题: 【求助】编译安装php make时出错。。。
./configure --disable-debug --enable-force-cgi-redirect --enable-bcmath --enable-calendar --enable-discard-path --with-gd --with-openssl --with-zlib --enable-magic-quotes --enable-gd-native-ttf --with-ttf --with-gdbm --with-gettext --with-iconv --enable-exif --enable-sockets --enable-wddx --enable-shmop --enable-soap --enable-fastcgi --disable-rpath --enable-inline-optimization --with-gmp --with-regex=system  --enable-ctype --enable-dbase --enable-pcntl --enable-ftp --enable-mbstring --enable-sigchild --enable-sysvsem --enable-sysvshm --enable-zend-multibyte  --with-xsl --with-ldap --with-ncurses --with-curl --enable-mbregex --with-bz2 --with-libxml-dir --with-mime-magic --with-jpeg-dir --with-png-dir --with-freetype-dir --with-zlib-dir --enable-fpm --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc


make时候出错 提示如下:

ext/standard/browscap.o(.text+0x499): In function `browser_reg_compare':
/home/php-5.2.6/ext/standard/browscap.c:218: undefined reference to `php_regcomp'
ext/standard/browscap.o(.text+0x4bd):/home/php-5.2.6/ext/standard/browscap.c:221: undefined reference to `php_regexec'
ext/standard/browscap.o(.text+0x4da):/home/php-5.2.6/ext/standard/browscap.c:273: undefined reference to `php_regfree'
ext/standard/browscap.o(.text+0x598):/home/php-5.2.6/ext/standard/browscap.c:230: undefined reference to `php_regfree'
ext/standard/reg.o(.text+0x53): In function `_php_regcomp':
/home/php-5.2.6/ext/standard/reg.c:62: undefined reference to `php_regcomp'
ext/standard/reg.o(.text+0x193): In function `php_reg_eprint':
/home/php-5.2.6/ext/standard/reg.c:150: undefined reference to `php_regerror'
ext/standard/reg.o(.text+0x1ba):/home/php-5.2.6/ext/standard/reg.c:155: undefined reference to `php_regerror'
ext/standard/reg.o(.text+0x1ca):/home/php-5.2.6/ext/standard/reg.c:160: undefined reference to `php_regerror'
ext/standard/reg.o(.text+0x239):/home/php-5.2.6/ext/standard/reg.c:173: undefined reference to `php_regerror'
ext/standard/reg.o(.text+0x392): In function `php_ereg':
/home/php-5.2.6/ext/standard/reg.c:236: undefined reference to `php_regexec'
ext/standard/reg.o(.text+0x82c): In function `php_reg_replace':
/home/php-5.2.6/ext/standard/reg.c:337: undefined reference to `php_regexec'
ext/standard/reg.o(.text+0x10b1): In function `php_split':
/home/php-5.2.6/ext/standard/reg.c:558: undefined reference to `php_regexec'
ext/standard/reg.o(.text+0xf1): In function `_free_reg_cache':
/home/php-5.2.6/ext/standard/reg.c:97: undefined reference to `php_regfree'
collect2: ld returned 1 exit status
*** Error code 1

Stop in /home/php-5.2.6 (line 284 of Makefile).
:em14:
作者: yoursmile    时间: 2008-08-13 08:43
./configure ...
之后有什么提示?
作者: BugsMusic    时间: 2008-08-13 08:57
.......checking if gcc supports -fno-rtti -fno-exceptions... (cached) no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... openbsd4.3 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes

creating libtool
appending configuration tag "CXX" to libtool

Generating files
creating ./config.status
creating php5.spec
creating main/build-defs.h
creating scripts/phpize
creating scripts/man1/phpize.1
creating scripts/php-config
creating scripts/man1/php-config.1
creating sapi/cli/php.1
creating sapi/cgi/fpm/fpm_autoconf.h
creating sapi/cgi/fpm/php-fpm.conf
creating sapi/cgi/fpm/php-fpm
creating main/php_config.h
creating main/internal_functions.c
creating main/internal_functions_cli.c
+--------------------------------------------------------------------+
| License:                                                           |
| This software is subject to the PHP License, available in this     |
| distribution in the file LICENSE.  By continuing this installation |
| process, you are bound by the terms of this license agreement.     |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point.                            |
+--------------------------------------------------------------------+

Thank you for using PHP.
./configure ...通过了
就是make时候提示了上面的错误:wink:

[ 本帖最后由 BugsMusic 于 2008-8-13 09:04 编辑 ]
作者: yoursmile    时间: 2008-08-13 10:51
make clean
然后再make
看一看
如果还是这样,
你就换个php版本装装看
作者: BugsMusic    时间: 2008-08-13 13:32
原帖由 yoursmile 于 2008-8-13 10:51 发表
make clean
然后再make
看一看
如果还是这样,
你就换个php版本装装看

谢谢yoursmile !问题解决了  用make clean ; 改用了gmake取代make    gmake&&gmake install
安装成功了
。。。。。。main/php_sprintf.o(.text+0x15): In function `php_sprintf':
/home/php-5.2.6/main/php_sprintf.c:38: warning: vsprintf() is often misused, please use vsnprintf()
ext/calendar/calendar.o(.text+0x9d8): In function `heb_number_to_chars':
/home/php-5.2.6/ext/calendar/calendar.c:533: warning: strcpy() is almost always misused, please use strlcpy()
ext/mbstring/oniguruma/regerror.o(.text+0x527): In function `onig_snprintf_with_pattern':
/home/php-5.2.6/ext/mbstring/oniguruma/regerror.c:312: warning: sprintf() is often misused, please use snprintf()
ext/mbstring/oniguruma/regerror.o(.text+0x4ab):/home/php-5.2.6/ext/mbstring/oniguruma/regerror.c:289: warning: strcat() is almost always misused, please use strlcat()

Build complete.
Don't forget to run 'make test'.


Installing PHP SAPI module:       cgi
Installing PHP CGI binary: /usr/local/php/bin/
Installing FPM config:            /usr/local/php/etc/php-fpm.conf
Installing init.d script:         /usr/local/php/sbin/php-fpm
Installing PHP CLI binary:        /usr/local/php/bin/
Installing PHP CLI man page:      /usr/local/php/man/man1/
Installing build environment:     /usr/local/php/lib/php/build/
Installing header files:          /usr/local/php/include/php/
Installing helper programs:       /usr/local/php/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/local/php/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /usr/local/php/lib/php/
[PEAR] Console_Getopt - already installed: 1.2.3
[PEAR] Archive_Tar    - already installed: 1.3.2
[PEAR] Structures_Graph- already installed: 1.0.2
[PEAR] PEAR           - already installed: 1.7.1
Wrote PEAR system config file at: /usr/local/php/etc/pear.conf
You may want to add: /usr/local/php/lib/php to your php.ini include_path
Installing PDO headers:          /usr/local/php/include/php/ext/pdo/

./configure的时候 提示缺少freetype2 等 。。lib
采用了gmake编译安装 不知道和这个有关系。。:em14:

[ 本帖最后由 BugsMusic 于 2008-8-13 13:39 编辑 ]
作者: yoursmile    时间: 2008-08-13 16:29
缺少freetype2 等 lib,以后如果使用图形库,可能会有问题
不用图形库不影响使用




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2