LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 922|回复: 9

在gentoo2005.1中安装php5出现的问题

[复制链接]
发表于 2006-6-6 21:15:07 | 显示全部楼层 |阅读模式
提示如下:
[PHP]checking whether the C compiler (gcc -O2 -mcpu=i686 -pipe -mieee ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.

!!! Please attach the config.log to your bug report:
!!! /var/tmp/portage/t1lib-5.0.2/work/t1lib-5.0.2/config.log

!!! ERROR: media-libs/t1lib-5.0.2 failed.
!!! Function econf, Line 485, Exitcode 0
!!! econf failed
!!! If you need support, post the topmost build error, NOT this status message.
[/PHP]

/var/tmp/portage/t1lib-5.0.2/work/t1lib-5.0.2/config.log内容如下:
[PHP]
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:726: checking whether make sets ${MAKE}
configure:755: checking for gcc
configure:868: checking whether the C compiler (gcc -O2 -mcpu=i686 -pipe -mieee ) works
configure:884: gcc -o conftest -O2 -mcpu=i686 -pipe -mieee   conftest.c  1>&5
cc1: error: invalid option `ieee'
configure: failed program was:

#line 879 "configure"
#include "confdefs.h"

main(){return(0);}
[/PHP]


我知道这是一个老问题,我也找到了一些解决方法,如下:
缺省地,configure挑选c++作为编译器名字并用-lg++选项的GNU c++链接。如果你正在使用gcc,这个特性在配置期间导致如下问题:
[PHP]
configure: error: installation or configuration problem:
C++ compiler cannot create executables.
[/PHP]
你可能也在编译期间看到g++、libg++或libstdc++相关的问题。这些问题的一个原因是你可能没有g++,或你可能有g++但无libg++或libstdc++。看一下“config.log”文件。它应该包含你的c++编译器不能工作的准确原因!为了解决这些问题,你可以使用gcc作为你的C++编译器。试试设置环境变量CXX为"gcc -O3"。例如:
[PHP]
shell>CXX="gcc -O3" ./configure
[/PHP]
它能工作,因为gcc象g++一样编译C++源代码,但缺省地它不链接libg++或libstdc++。解决这些问题的其他方法当然是安装g++、libg++和libstdc++。

可是我还是不知道咋解决?
我是用的gentoo2005.1,g++有,libg++和libstdc++没有
装软件包都是直接emerge的,怎么知道libg++和libstdc++是在哪些软件包里头呢?
用了CXX="gcc -O3" ./configure,好像不行,呜呜

哪位知道怎么解决的给个明白的解决方法好吗?谢谢了
发表于 2006-6-7 01:40:40 | 显示全部楼层
把你的emerge info的结果贴出来看看。
你怎么会有-mieee呢?估计/etc/make.conf中CFLAGS的设置有问题。
回复 支持 反对

使用道具 举报

发表于 2006-6-7 08:19:46 | 显示全部楼层
你干吗不连php也直接emerge?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-6-7 09:04:43 | 显示全部楼层
Post by shpchp
把你的emerge info的结果贴出来看看。
你怎么会有-mieee呢?估计/etc/make.conf中CFLAGS的设置有问题。



emerge info如下:
[php]
Portage 2.0.51.22-r2 (default-linux/x86/2005.1, gcc-3.3.5-20050130, glibc-2.3.4. 20041102-r1, 2.6.12-gentoo-r6 i686)
=================================================================
System uname: 2.6.12-gentoo-r6 i686 Intel(R) Pentium(R) 4 Mobile CPU 1.50GHz
Gentoo Base System version 1.6.12
dev-lang/python:     2.3.5
dev-python/pycrypto: [Not Present]
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.11
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -mcpu=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shu tdown /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS=""
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/ distributions/gentoo"
LANG="en_US.UTF-8"
LC_ALL="zh_CN.GBK"
LINGUAS="zh_CN"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X alpha alsa apache2 apm arts audiofile avi berkdb bitmap-fonts bzip2 c dr cjk cli crypt cups curl dri dvd eds emboss encode esd exif expat fam foomatic db fortran gdbm gif glut gnome gpm gstreamer gtk gtk2 gtkhtml icc icc-pgo imlib ipv6 isdnlog java jpeg kde lcms ldap libg++ libwww mad mikmod mng motif mozilla mp3 mpeg mysql mysqli ncurses nls nsplugin ogg oggvorbis opengl oss pam pcre pdf lib perl php png pppd python qt quicktime readline reflection ruby sdl session s pell spl ssl tcltk tcpd tiff truetype truetype-fonts type1-fonts udev vorbis xml 2 xmms xorg xv zlib linguas_zh_CN userland_GNU kernel_linux elibc_glibc"
Unset:  CTARGET, INSTALL_MASK, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTAGE_RSYNC_ OPTS, PORTDIR_OVERLAY
[/php]
有哪里设置不当的吗?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-6-7 09:08:15 | 显示全部楼层
Post by druggo
你干吗不连php也直接emerge?

就是直接emerge的啊,然后到了安装media-libs/t1lib-5.0.2 的时候就出现上面的错误提示了
回复 支持 反对

使用道具 举报

发表于 2006-6-7 12:54:17 | 显示全部楼层
你的CFLAGS 为什么不用march ?
下面是我的log
CFLAGS="-march=pentium3 -Os -fomit-frame-pointer -pipe"
  1. >>> Source unpacked.
  2. >>> Compiling source in /var/tmp/portage/t1lib-5.0.2/work/t1lib-5.0.2 ...
  3. * econf: updating t1lib-5.0.2/ac-tools/config.guess with /usr/share/gnuconfig/config.guess
  4. * econf: updating t1lib-5.0.2/ac-tools/config.sub with /usr/share/gnuconfig/config.sub
  5. ./configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/
  6. creating cache ./config.cache
  7. checking whether make sets ${MAKE}... yes
  8. checking for gcc... gcc
  9. checking whether the C compiler (gcc -march=pentium3 -Os -fomit-frame-pointer -pipe -Wl,-O1) works... yes
  10. checking whether the C compiler (gcc -march=pentium3 -Os -fomit-frame-pointer -pipe -Wl,-O1) is a cross-compiler...
  11. checking whether we are using GNU C... yes
  12. checking whether gcc accepts -g... yes
  13. checking how to run the C preprocessor... gcc -E
  14. checking for X... disabled
  15. checking for Athena... libraries in default path, headers in default path
  16. checking host system type... i686-pc-linux-gnu
  17. checking build system type... i686-pc-linux-gnu
  18. checking for ranlib... ranlib
  19. checking for ld used by GCC... /usr/i686-pc-linux-gnu/bin/ld
  20. checking if the linker (/usr/i686-pc-linux-gnu/bin/ld) is GNU ld... yes
  21. checking for BSD-compatible nm... /usr/bin/nm -B
  22. checking whether ln -s works... yes
  23. updating cache ./config.cache
  24. loading cache ./config.cache within ltconfig
复制代码
回复 支持 反对

使用道具 举报

发表于 2006-6-7 13:23:31 | 显示全部楼层
druggo说得对应该在CFLAGS中设置-march

另外,你的问题出在USE中,为何USE中设置有alpha?去掉就行了。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-6-7 14:16:06 | 显示全部楼层
嗯,我的make.conf内容如下:
[PHP]
CFLAGS="-O2 -march=pentium4 -pipe"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j2"
USE="gtk gtk2 gnome qt dvd alsa cjk icc icc-pgo gtkhtml java mozilla mysql mysqli nls php apache2 X nsplugin"
LINGUAS="zh_CN"
ALSA_CARDS="intel8x0"
FEATURES="keepwork"
PORTAGE_BINHOST="http://chinstrap.alternating.net/files/2005.1/grp/i686/"
PKGDIR="/mnt/iso"
[/PHP]

上面那个问题是装php的依赖包t1lib-5.0.2遇到的,也在其它站找到N多资料都没解决
后来采用二制包解决了

现在真正到了装php的时候,装的是php-5.1.4,又遇到问题了,我晕....
提示如下:
[PHP]
checking for curl_easy_perform in -lcurl... no
configure: error: There is something wrong. Please check config.log for more information.

!!! ERROR: dev-lang/php-5.1.4 failed.
!!! Function php5_1-sapi_src_compile, Line 573, Exitcode 1
!!! configure failed
!!! If you need support, post the topmost build error, NOT this status message.
[/PHP]


curl_easy_perform是什么?-lcurl呢?
google里好像也很少这方面的资料。。。
该咋解决呢?

我的gentoo版本2005.1
gcc-3.4.6
回复 支持 反对

使用道具 举报

发表于 2006-6-7 14:55:14 | 显示全部楼层
USE="-* xxx xxx xxx"emerge php
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-6-7 23:15:08 | 显示全部楼层
呵,解决了
我升级了下curl就ok了

谢谢各位
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表