Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Gcc xdebug-错误的ELF类:ELFCLASS64_Gcc_Xdebug - Fatal编程技术网

Gcc xdebug-错误的ELF类:ELFCLASS64

Gcc xdebug-错误的ELF类:ELFCLASS64,gcc,xdebug,Gcc,Xdebug,我试图在我的x64 Arch Linux上运行xdebug,但没有成功。我已经安装了它,现在当我尝试运行lampp时,它会说: Failed loading /opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so:/opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so: wrong ELF class: ELFCLASS64 我做了一些搜索,发

我试图在我的x64 Arch Linux上运行xdebug,但没有成功。我已经安装了它,现在当我尝试运行lampp时,它会说:

Failed loading /opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so:/opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so: wrong ELF class: ELFCLASS64
我做了一些搜索,发现我需要再次下载xdebug,为x64编译它,并将xdebug.so文件移动到lampp中的我的文件夹中

我试着根据第一个链接中的指南来编译它:

CFLAGS='-arch x86_64' ./configure --enable-xdebug
还有这些参数:

./configure --enable-xdebug "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32" --with-php-config=/opt/lampp/bin/php-config
./configure --enable-xdebug "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32" --with-php-config=/opt/lampp/bin/php-config
但我有一个问题:

configure: error: C compiler cannot create executables
See `config.log' for more details
下面是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.69.  Invocation command line was

  $ ./configure --enable-xdebug

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

hostname = michal-ntb
uname -m = x86_64
uname -r = 3.6.5-1-ARCH
uname -s = Linux
uname -v = #1 SMP PREEMPT Wed Oct 31 20:57:39 CET 2012

/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/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/local/sbin
PATH: /usr/sbin
PATH: /sbin
PATH: /usr/bin/core_perl


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2293: checking for grep that handles long lines and -e
configure:2351: result: /usr/bin/grep
configure:2356: checking for egrep
configure:2418: result: /usr/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 (GCC) 4.7.2
Copyright (C) 2012 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/x86_64-unknown-linux-gnu/4.7.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/src/gcc-4.7.2/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --enable-libstdcxx-time --enable-gnu-unique-object --enable-linker-build-id --with-ppl --enable-cloog-backend=isl --disable-ppl-version-check --disable-cloog-version-check --enable-lto --enable-gold --enable-ld=default --enable-plugin --with-plugin-ld=ld.gold --with-linker-hash-style=gnu --disable-multilib --disable-libssp --disable-build-with-cxx --disable-build-poststage1-with-cxx --enable-checking=release
Thread model: posix
gcc version 4.7.2 (GCC) 
configure:2687: $? = 0
configure:2676: cc -V >&5
cc: error: unrecognized command line option '-V'
cc: fatal error: no input files
compilation terminated.
configure:2687: $? = 1
configure:2676: cc -qversion >&5
cc: error: unrecognized command line option '-qversion'
cc: fatal error: no input files
compilation terminated.
configure:2687: $? = 1
configure:2707: checking whether the C compiler works
configure:2729: cc -arch x86_64   conftest.c  >&5
cc: error: unrecognized command line option '-arch'
cc: error: x86_64: No such file or directory
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/michal/TEMP/xdebug-2.2.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=set
ac_cv_env_CFLAGS_value='-arch x86_64'
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='/usr/bin/grep -E'
ac_cv_path_GREP=/usr/bin/grep
ac_cv_prog_ac_ct_CC=cc
lt_cv_path_SED=/bin/sed

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

AR=''
AWK=''
CC='cc'
CFLAGS='-arch x86_64'
CONFIGURE_COMMAND=' '\''./configure'\''  '\''--enable-xdebug'\'''
CONFIGURE_OPTIONS=' '\''--enable-xdebug'\'''
CPP=''
CPPFLAGS=''
DEFS=''
DSYMUTIL=''
ECHO='echo'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP='/usr/bin/grep -E'
EXEEXT=''
GREP='/usr/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/sh'
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
我已经搜索了几个小时的解决方案,找到了一些类似的主题(如),但没有帮助

感谢您的建议和建议。

问题已解决。:-)显然,在编译过程中出现了一个错误:

/usr/bin/ld: cannot find -lgcc
我通过从官方的Arch linux multilib存储库安装gcc multilib包解决了这个问题

对于编译,我使用了以下参数:

./configure --enable-xdebug "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32" --with-php-config=/opt/lampp/bin/php-config
./configure --enable-xdebug "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32" --with-php-config=/opt/lampp/bin/php-config

在互联网上快速查找后发现,当我在
64位Linux上运行时,我编译了
64位
版本的
xdebug.so

Xampp
运行
32位时,我需要的是预编译的32位版本

我找到了解决办法