PHP PDO_ODBC configure: error: компилятор C не может создать исполняемые файлы

Я пытаюсь установить PHP PDO_ODBC, который я скачал с PECL, и я получаю следующую ошибку при запуске команды configure с помощью

  ./configure --with-apxs=/opt/lampp/bin/apxs --with-php-config=/opt/lampp/bin/php-config --with-pdo-odbc=ibm-db2,/opt/ibm/db2/V9.7/

Я запускаю команду от имени пользователя root и нахожусь на

Linux trisquel6 3.2.0-52-generic-pae # 0trisquel1 SMP четверг, 22 августа
22:04:28 UTC 2013 i686 i686 i386 GNU / Linux

Мой файл config.log вставлен ниже

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.68.  Invocation command line was

$ ./configure --with-php-config=/opt/lampp/bin/php-config --with-pdo-odbc=ibm-db2,/opt/ibm/db2/V9.7/

## --------- ##
## Platform. ##
## --------- ##

hostname = trisquel6
uname -m = i686
uname -r = 3.2.0-52-generic-pae
uname -s = Linux
uname -v = #0trisquel1 SMP Thu Aug 22 22:04:28 UTC 2013

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin## ----------- ##
## Core tests. ##
## ----------- ##

configure:2293: checking for grep that handles long lines and -e
configure:2351: result: /bin/grep
configure:2356: checking for egrep
configure:2418: result: /bin/grep -E
configure:2423: checking for a sed that does not truncate output
configure:2477: result: /bin/sed
configure:2609: checking for cc
configure:2625: found /usr/bin/cc
configure:2636: result: cc
configure:2667: checking for C compiler version
configure:2676: cc --version >&5
cc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2687: $? = 0
configure:2676: cc -v >&5
Using built-in specs.
COLLECT_GCC=cc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.6/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configure:2687: $? = 0
configure:2676: cc -V >&5
cc: error: unrecognized option '-V'
cc: fatal error: no input files
compilation terminated.
configure:2687: $? = 4
configure:2676: cc -qversion >&5
cc: error: unrecognized option '-qversion'
cc: fatal error: no input files
compilation terminated.
configure:2687: $? = 4
configure:2707: checking whether the C compiler works
configure:2729: cc    conftest.c  >&5
/usr/local/bin/ld: this linker was not configured to use sysroots
collect2: ld returned 1 exit status
configure:2733: $? = 1
configure:2771: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""| #define PACKAGE_TARNAME ""| #define PACKAGE_VERSION ""| #define PACKAGE_STRING ""| #define PACKAGE_BUGREPORT ""| #define PACKAGE_URL ""| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:2776: error: in `/home/joshua/Downloads/PDO_ODBC-1.0.1/PDO_ODBC-1.0.1':
configure:2778: error: C compiler cannot create executables
See `config.log' for more details

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_path_EGREP='/bin/grep -E'
ac_cv_path_GREP=/bin/grep
ac_cv_prog_ac_ct_CC=cc
lt_cv_path_SED=/bin/sed

## ----------------- ##
## Output variables. ##
## ----------------- ##

AR=''
AWK=''
CC='cc'
CFLAGS=''
CONFIGURE_COMMAND=' '\''./configure'\''  '\''--with-php-config=/opt/lampp/bin/php-config'\'' '\''--with-pdo-odbc=ibm-db2,/opt/ibm/db2/V9.7/'\'''
CONFIGURE_OPTIONS=' '\''--with-php-config=/opt/lampp/bin/php-config'\'' '\''--with-pdo-odbc=ibm-db2,/opt/ibm/db2/V9.7/'\'''
CPP=''
CPPFLAGS=''
DEFS=''
DSYMUTIL=''
ECHO='echo'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP='/bin/grep -E'
EXEEXT=''
GREP='/bin/grep'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LN_S=''
LTLIBOBJS=''
NMEDIT=''
OBJEXT=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_URL=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
RANLIB=''
RE2C=''
SED='/bin/sed'
SHELL='/bin/bash'
SHLIB_DL_SUFFIX_NAME=''
SHLIB_SUFFIX_NAME=''
STRIP=''
ac_ct_CC='cc'
bindir='${exec_prefix}/bin'
build=''
build_alias=''
build_cpu=''
build_os=''
build_vendor=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='NONE'
host=''
host_alias=''
host_cpu=''
host_os=''
host_vendor=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target=''
target_alias=''
target_cpu=''
target_os=''
target_vendor=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME ""#define PACKAGE_TARNAME ""#define PACKAGE_VERSION ""#define PACKAGE_STRING ""#define PACKAGE_BUGREPORT ""#define PACKAGE_URL ""
configure: exit 77

0

Решение

Ответ на этот вопрос предоставляется по этой ссылке

configure: error: компилятор C не может создавать исполняемые файлы при установке Ruby 1.9.3

дела

sudo apt-get install clang

а потом

./configure --with-apxs=/opt/lampp/bin/apxs --with-php-config=/opt/lampp/bin/php-config --with-pdo-odbc=ibm-db2,/opt/ibm/db2/V9.7/ --with-gcc=clang

Работает отлично!

0

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector