title: xdebug - wrong ELF class: ELFCLASS64
body: <p>I'm trying to run xdebug on my x64 Arch Linux, but without success. I've installed it and now when I try to run lampp it says:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>I did some search and found that I need to download xdebug again, compile it for x64 and move the xdebug.so file to my folder in lampp.</p>
  
  <p><a href="http://www.designified.com/blog/article/60/compiling-installing-xdebug-for-php-525-entropych-build-on-os-x-105" rel="nofollow noreferrer">http://www.designified.com/blog/article/60/compiling-installing-xdebug-for-php-525-entropych-build-on-os-x-105</a></p>
  
  <p><a href="https://stackoverflow.com/questions/1242400/how-to-use-make-to-use-64-bit-libs-because-of-elfclass64-error">How to use &quot;make&quot; to use 64 bit libs because of ELFCLASS64 error</a></p>
  
  <p>I've tried to compile it according to the guide from the first link:</p>
  
  <pre><code>CFLAGS='-arch x86_64' ./configure --enable-xdebug
  </code></pre>
  
  <p>and also with these parameters:</p>
  
  <pre><code>./configure --enable-xdebug "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32" --with-php-config=/opt/lampp/bin/php-config
  </code></pre>
  
  <p>But I've got this problem:</p>
  
  <pre><code>configure: error: C compiler cannot create executables
  See `config.log' for more details
  </code></pre>
  
  <p>Here's the config.log file:</p>
  
  <pre><code>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 &gt;&amp;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 &gt;&amp;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 &gt;&amp;5
  cc: error: unrecognized command line option '-V'
  cc: fatal error: no input files
  compilation terminated.
  configure:2687: $? = 1
  configure:2676: cc -qversion &gt;&amp;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  &gt;&amp;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
  </code></pre>
  
  <p>I've been searching for solution for couple of hours, found some similar topics (like <a href="https://bbs.archlinux.org/viewtopic.php?id=143181" rel="nofollow noreferrer">this</a>), but it didn't help.</p>
  
  <p>Thanks for suggestions and advices.</p>