views:

678

answers:

3

How can I use configure and make tools to specify to use 64 bit libraries ? I thought it was automatic, but I get wrong ELF Class

I'm trying to compile xdebug for ubuntu 64 for use with lampp (xampp for linux)

./lampp start

Failed loading /opt/lampp/lib/php/extensions/xdebug.so: /opt/lampp/lib/php/extensions/xdebug.so: wrong ELF class: ELFCLASS64

The ./configure looks ok to me, and the make works without errors, i've copied the configure in case its relevant

/xdebug-2.0.3$ ./configure

checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for a sed that does not truncate output... /bin/sed checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc and cc understand -c and -o together... yes checking for system library directory... lib checking if compiler supports -R... no checking if compiler supports -Wl,-rpath,... yes checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu checking for PHP prefix... /usr checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib checking for PHP extension directory... /usr/lib/php5/20060613 checking for PHP installed headers prefix... /usr/include/php5 checking for re2c... no configure: WARNING: You will need re2c 0.12.0 or later if you want to regenerate PHP parsers. checking for gawk... no checking for nawk... nawk checking if nawk is broken... no checking whether to enable eXtended debugging support... yes, shared checking for gettimeofday... yes checking for cos in -lm... yes checking for a sed that does not truncate output... (cached) /bin/sed checking for fgrep... /bin/grep -F checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 1572864 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking for /usr/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for ar... ar checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm -B output from gcc object... ok checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating ./config.status config.status: creating config.h config.status: config.h is unchanged config.status: executing libtool commands

A: 

Maybe the runtime linker's library path is wrong. Does the directory /opt/lampp/lib64 exist? Is lampp a shell script? If so, to what value (and whether) does it set the LD_LIBRARY_PATH variable?

zvrba
I don't have a lib64 dir. I tried sudo apt-get install ia64-libsbut the package was not found.
iterationx
Hi!So did you figure it out after all? I'm having the exact same issue on xubuntu and no leads :-(
vector
+1  A: 

Won't:

LD_LIBRARY_PATH=/lib64:$LD_LIBRARY_PATH ./lampp start

work? I don't use Ubuntu, so your path might vary. One thing to do is

ldd ./lampp

to see what the default executable points to.

xcramps
lampp$ ldd ./lampp not a dynamic executableI don't have a lib64 dir. I tried sudo apt-get install ia64-libs but the package was not found.
iterationx
A: 

I'm not sure of the error, but why are you compiling xdebug? Its available in the repositories of Ubuntu as php5-xdebug (sudo apt-get install php5-xdebug). Though you don't mention your distribution, perhaps its under a similar name?

But to answer your question, the error message looks like xdebug is 64 bit, but that's a problem (is something lampp executes a 32 bit binary?)

MighMoS
well, actually i used this page to compile lampp http://ubuntuforums.org/showthread.php?t=719110 i tried sudo apt-get install php5-xdebug and moved the xdebug.so to my /opt/lampp/lib/php/extensions/ dir but still got the elf64 error i'm using Wubi which is ubuntu on 64. I'm not sure how to figure out if lampp is executing 32 bit binaries
iterationx
So I downloaded the 32 bit xdebug from here, http://aspn.activestate.com/ASPN/Downloads/Komodo/RemoteDebuggingbecause i think if i do ./configure it will automake a 64 bit, and now it says, Xdebug requires Zend Engine API version 220090626.The Zend Engine API version 220060519 which is installed, is outdated.so thats progress. I guess I need to update my PhP version now.Thanks
iterationx