[uClibc] build php-4.3.8 with uclibc buildroot. configure failed

I HOLLO ihollo at tom.com
Thu Jul 22 08:43:40 UTC 2004


Hi,

I am trying to build php-4.3.8 with the buildroot tool, so I wrote a php.mk file and placed it in the make directory of buildroot. 
then I typed #make php in buildroot directory but configure failed with error message: 
checking for fopencookie... yes
configure: error: can not run test program while cross compiling

Can anyone help me to solve this problem? any help will be appreciated. thanks very much.
 
buildroot/make/php.mk
#############################################################
#
# php
#
#############################################################
PHP_SOURCE:=php-4.3.8.tar.bz2
PHP_SITE:=http://cn.php.net/get
PHP_DIR:=$(BUILD_DIR)/php-4.3.8
PHP_BINARY:=$(PHP_DIR)/php
PHP_TARGET_BINARY:=$(TARGET_DIR)/usr/local/bin/php

$(DL_DIR)/$(PHP_SOURCE):
	 $(WGET) -P $(DL_DIR) $(PHP_SITE)/$(PHP_SOURCE)/from/this/mirror

php-source: $(DL_DIR)/$(PHP_SOURCE)

$(PHP_DIR)/.unpacked: $(DL_DIR)/$(PHP_SOURCE)
	bzcat $(DL_DIR)/$(PHP_SOURCE) | tar -C $(BUILD_DIR) -xvf -
	touch $(PHP_DIR)/.unpacked

$(PHP_DIR)/.configured: $(PHP_DIR)/.unpacked
	(cd $(PHP_DIR); rm -rf config.cache; \
		$(TARGET_CONFIGURE_OPTS) \
		./configure \
		--target=$(GNU_TARGET_NAME) \
		--host=$(GNU_TARGET_NAME) \
		--build=$(GNU_HOST_NAME) \
		--prefix=/usr/local \
		--exec-prefix=/ \
		--bindir=/usr/local/bin \
		--sbindir=/usr/local/sbin \
		--libexecdir=/usr/local/lib \
		--sysconfdir=/etc \
		--datadir=/usr/share/misc \
		--localstatedir=/var \
		--mandir=/usr/local/man \
		--infodir=/usr/local/info \
		--disable-cli \
		--disable-ipv6 \
		--without-pear \
		--disable-all \
	);
	touch  $(PHP_DIR)/.configured

$(PHP_BINARY): $(PHP_DIR)/.configured
	$(MAKE) CC=$(TARGET_CC) -C $(PHP_DIR) PHP_SOURCE_DIR=$(PHP_DIR)

$(PHP_TARGET_BINARY): $(PHP_BINARY)
	$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(PHP_DIR) PHP_SOURCE_DIR=$(PHP_DIR)
	$(STRIP) $(PHP_DIR)/sapi/cgi/php
	install -D $(PHP_DIR)/sapi/cgi/php $(PHP_TARGET_BINARY)

php: uclibc $(PHP_TARGET_BINARY)

php-clean:
	$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(PHP_DIR) uninstall
	-$(MAKE) -C $(PHP_DIR) clean

php-dirclean:
	rm -rf $(PHP_DIR)

here is the output of configure phase:
(cd /opt/project/buildfarm/build_i386/php-4.3.8; rm -rf config.cache; \
	PATH=/opt/project/buildfarm/build_i386/staging_dir/bin:/bin:/sbin:/usr/bin:/usr/sbin AR=/opt/project/buildfarm/build_i386/staging_dir/bin/i386-linux-uclibc-ar AS=/opt/project/buildfarm/build_i386/staging_dir/bin/i386-linux-uclibc-as LD=/opt/project/buildfarm/build_i386/staging_dir/bin/i386-linux-uclibc-ld NM=/opt/project/buildfarm/build_i386/staging_dir/bin/i386-linux-uclibc-nm CC=/opt/project/buildfarm/build_i386/staging_dir/bin/i386-linux-uclibc-gcc GCC=/opt/project/buildfarm/build_i386/staging_dir/bin/i386-linux-uclibc-gcc CXX=/opt/project/buildfarm/build_i386/staging_dir/bin/i386-linux-uclibc-g++ RANLIB=/opt/project/buildfarm/build_i386/staging_dir/bin/i386-linux-uclibc-ranlib \
	./configure \
	--target=i386-linux \
	--host=i386-linux \
	--build=i386-pc-linux-gnu \
	--prefix=/usr/local \
	--exec-prefix=/ \
	--bindir=/usr/local/bin \
	--sbindir=/usr/local/sbin \
	--libexecdir=/usr/local/lib \
	--sysconfdir=/etc \
	--datadir=/usr/share/misc \
	--localstatedir=/var \
	--mandir=/usr/local/man \
	--infodir=/usr/local/info \
	--disable-cli \
	--disable-ipv6 \
	--without-pear \
	--disable-all \
);
creating cache ./config.cache
checking host system type... i386-pc-linux-gnu
checking for gcc... /opt/project/buildfarm/build_i386/staging_dir/bin/i386-linux-uclibc-gcc
checking whether the C compiler (/opt/project/buildfarm/build_i386/staging_dir/bin/i386-linux-uclibc-gcc  ) works... yes
checking whether the C compiler (/opt/project/buildfarm/build_i386/staging_dir/bin/i386-linux-uclibc-gcc  ) is a cross-compiler... yes
checking whether we are using GNU C... yes
checking whether /opt/project/buildfarm/build_i386/staging_dir/bin/i386-linux-uclibc-gcc accepts -g... yes
checking whether /opt/project/buildfarm/build_i386/staging_dir/bin/i386-linux-uclibc-gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... /opt/project/buildfarm/build_i386/staging_dir/bin/i386-linux-uclibc-gcc -E
checking for AIX... no
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking for re2c... exit 0;
checking for ranlib... /opt/project/buildfarm/build_i386/staging_dir/bin/i386-linux-uclibc-ranlib
checking whether ln -s works... yes
checking for mawk... mawk
checking for bison... bison -y
checking bison version... 1.875 (ok)
checking for flex... flex
checking for yywrap in -lfl... no
checking lex output file root... lex.yy
checking whether yytext is a pointer... no
checking for working const... yes
checking flex version... 2.5.31 (ok)
checking for pthreads_cflags... 
checking for pthreads_lib... 

Configuring SAPI modules
checking for AOLserver support... no
checking for Apache 1.x module support via DSO through APXS... no
checking for Apache 1.x module support... no
checking for member fd in BUFF *... no
checking for mod_charset compatibility option... no
checking for Apache 2.0 filter-module support via DSO through APXS... no
checking for Apache 2.0 handler-module support via DSO through APXS... no
checking for Caudium support... no
checking for CLI build... no
checking for embedded SAPI library support... no
checking for Zeus ISAPI support... no
checking for NSAPI support... no
checking for PHTTPD support... no
checking for Pi3Web support... no
checking for Roxen/Pike support... no
checking for Servlet support... no
checking for thttpd... no
checking for TUX... no
checking for webjames... no
checking for CGI build... yes
checking whether writing to stdout works... no
checking whether to force Apache CGI redirect... no
checking whether to discard path_info + path_translated... no
checking whether to enable path info checking... yes
checking whether to enable fastcgi support... no
checking for chosen SAPI module... cgi

Running system checks
checking for missing declarations of reentrant functions... done
checking for sendmail... no
checking whether system uses EBCDIC... no
checking for socket... yes
checking for htonl... yes
checking for gethostname... yes
checking for gethostbyaddr... yes
checking for yp_get_default_domain... no
checking for __yp_get_default_domain... no
checking for yp_get_default_domain in -lnsl... no
checking for __yp_get_default_domain in -lnsl... no
checking for dlopen... no
checking for __dlopen... no
checking for dlopen in -ldl... yes
checking for sin in -lm... yes
checking for res_search... no
checking for __res_search... yes
checking for inet_aton... yes
checking for dn_skipname... no
checking for __dn_skipname... no
checking for dn_skipname in -lresolv... no
checking for __dn_skipname in -lresolv... no
checking for dn_skipname in -lbind... no
checking for __dn_skipname in -lbind... no
checking for ANSI C header files... yes
checking for dirent.h that defines DIR... yes
checking for opendir in -ldir... no
checking for fclose declaration... ok
checking for dirent.h... yes
checking for ApplicationServices/ApplicationServices.h... no
checking for sys/param.h... yes
checking for sys/types.h... yes
checking for sys/time.h... yes
checking for netinet/in.h... yes
checking for alloca.h... yes
checking for arpa/inet.h... yes
checking for arpa/nameser.h... yes
checking for assert.h... yes
checking for crypt.h... yes
checking for fcntl.h... yes
checking for grp.h... yes
checking for ieeefp.h... no
checking for langinfo.h... yes
checking for limits.h... yes
checking for locale.h... yes
checking for monetary.h... no
checking for mach-o/dyld.h... no
checking for netdb.h... yes
checking for pwd.h... yes
checking for resolv.h... yes
checking for signal.h... yes
checking for stdarg.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for syslog.h... yes
checking for sysexits.h... yes
checking for sys/file.h... yes
checking for sys/mman.h... yes
checking for sys/mount.h... yes
checking for sys/poll.h... yes
checking for sys/resource.h... yes
checking for sys/select.h... yes
checking for sys/socket.h... yes
checking for sys/statfs.h... yes
checking for sys/statvfs.h... yes
checking for sys/vfs.h... yes
checking for sys/sysexits.h... no
checking for sys/varargs.h... no
checking for sys/wait.h... yes
checking for unistd.h... yes
checking for unix.h... no
checking for utime.h... yes
checking for sys/utsname.h... yes
checking for sys/ipc.h... yes
checking for dlfcn.h... yes
checking for fopencookie... yes
configure: error: can not run test program while cross compiling


        Zhuang Yuyao
        ihollo at tom.com
          2004-07-22





More information about the uClibc mailing list