免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2082 | 回复: 0
打印 上一主题 下一主题

php的src.rpm包编译支持oracle出现:ccannot run C compiled programs. [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-12-23 15:11 |只看该作者 |倒序浏览
Cenos5.2环境, php-5.1.6.src.rpm,不改SPEC文件编译没的问题,会生成php-*
但我想加入oracle支持,修改了SPEC文件,rpmbuild一直提示checking whether the C compiler works... configure: error: cannot run C compiled programs.
网上google了一下,一种是权限问题,另一种说是PATH中没有gcc
但我是以root运行的,另外PATH中有/usr/bin/gcc.编译一般的C程序也没的问题.
谢谢!
添加内容如下:
#%if %{with_oci8}
%package oci8
Group: Development/Languages
Summary: A module for PHP applications that use OCI8 databases.
Provides: php_database
BuildRequires: oracle-instantclient-devel >= 10
Requires: php = %{version}-%{release}
Provides: php_database
AutoReq: 0
Requires: oracle-instantclient-basic >= 10

%description oci8
The php-oci8 package contains a dynamic shared object that will add
support for accessing OCI8 databases to PHP.
#%endif




%build
# Force use of system libtool:
libtoolize --force --copy
cat `aclocal --print-ac-dir`/libtool.m4 > build/libtool.m4

# Regenerate configure scripts (patches change config.m4's)
./buildconf --force

CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Wno-pointer-sign"
CPPFLAGS="-DLDAP_DEPRECATED=1"
export CFLAGS CPPFLAGS
# added by peter for Oracle support
LDFLAGS="-L/usr/lib/oracle/11.1.0.1/client/lib"
LIBS="-lnnz11 -lclntsh"
CC=gcc
export CC
export LDFLAGS
export LIBS



build --enable-force-cgi-redirect \
      --enable-pcntl \
      --with-imap=shared --with-imap-ssl \
      --enable-mbstring=shared --enable-mbstr-enc-trans \
      --enable-mbregex \
      --with-ncurses=shared \
      --with-gd=shared \
      --enable-bcmath=shared \
      --enable-dba=shared --with-db4=%{_prefix} \
      --with-xmlrpc=shared \
      --with-ldap=shared --with-ldap-sasl \
      --with-mysql=shared,%{_prefix} \
      --with-mysqli=shared,%{_bindir}/mysql_config \
      --enable-dom=shared \
      --with-dom-xslt=%{_prefix} --with-dom-exslt=%{_prefix} \
      --with-pgsql=shared \
      --with-snmp=shared,%{_prefix} \
      --enable-soap=shared \
      --with-xsl=shared,%{_prefix} \
      --enable-xmlreader=shared --enable-xmlwriter=shared \
      --enable-fastcgi \
      --enable-pdo=shared \
      --with-pdo-odbc=shared,unixODBC,%{_prefix} \
      --with-pdo-mysql=shared,%{_prefix} \
      --with-pdo-pgsql=shared,%{_prefix} \
      --with-pdo-sqlite=shared,%{_prefix} \
      --enable-dbase=shared \
      --with-oci8=shared,instantclient,/usr/lib/oracle/11.1.0.1/client/lib
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP