2009-08-07 6 views
1

Comment utiliser configure et make tools pour spécifier l'utilisation de bibliothèques 64 bits? Je pensais que c'était automatique, mais je me trompe ELF Class.Comment utiliser "make" pour utiliser des bibliothèques 64 bits en raison d'une erreur ELFCLASS64

J'essaye de compiler Xdebug pour Ubuntu 64 pour l'utiliser avec LAMPP (XAMPP pour Linux).

./lampp start 

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

Le ./configure semble OK pour moi, et la marque fonctionne sans erreur, je l'ai copié la configuration en cas de son correspondant:

/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 
+0

Découvrez https://launchpad.net/~zend-framework/+archive/ppa pour le dernier moteur Zend (je pense) . – MighMoS

Répondre

2

Je ne suis pas sûr de l'erreur, mais pourquoi compilez-vous xdebug? Son disponible dans les dépôts d'Ubuntu comme php5-xdebug (sudo apt-get install php5-xdebug). Bien que vous ne mentionniez pas votre distribution, peut-être que c'est sous un nom similaire?

Mais pour répondre à votre question, le message d'erreur ressemble xdebug est 64 bits, mais c'est un problème (est quelque chose lampp exécute un binaire 32 bits?)

+0

bien, en fait j'ai utilisé cette page pour compiler lampp http://ubuntuforums.org/showthread.php?t=719110 j'ai essayé sudo apt-get installer php5-xdebug et déplacé le xdebug .so à mon/opt/lampp/lib/php/extensions/dir mais toujours eu l'erreur elf64 J'utilise Wubi qui est Ubuntu sur 64.Je ne suis pas sûr de savoir si lampp exécute des binaires 32 bits – 0x4f3759df

+0

J'ai donc téléchargé le 32 bits xdebug à partir d'ici, http://aspn.activestate.com/ASPN/Downloads/Komodo/RemoteDebugging parce que je pense que si je le fais ./configure il va automake un 64 bits, et maintenant il dit, Xdebug nécessite Zend Engine API version 220090626. L'API Zend Engine version 220060519 qui est installé, est obsolète. alors c'est en progression. Je suppose que je dois mettre à jour ma version PhP maintenant. Merci – 0x4f3759df

0

Peut-être que le chemin de bibliothèque de l'éditeur de liens d'exécution est faux. Est-ce que le répertoire/opt/lampp/lib64 existe? Lampp est-il un script shell? Si oui, à quelle valeur (et si) définit-il la variable LD_LIBRARY_PATH?

+0

Je n'ai pas de répertoire lib64. J'ai essayé sudo apt-get install ia64-libs mais le paquet n'a pas été trouvé. – 0x4f3759df

+0

Salut! Alors, vous l'avez compris? J'ai le même problème sur xubuntu et pas de prospects :-( – vector

1

Will not:

LD_LIBRARY_PATH=/lib64:$LD_LIBRARY_PATH ./lampp start 

travail? Je n'utilise pas Ubuntu, donc votre chemin peut varier. Une chose à faire est

ldd ./lampp 

pour voir à quoi pointe l'exécutable par défaut.

+0

lampp $ ldd ./lampp \t pas un exécutable dynamique Je n'ai pas de répertoire lib64 J'ai essayé sudo apt-get install ia64-libs mais le paquet n'a pas été trouvé – 0x4f3759df

1

Essayez de pointer les 32 libs bits, LD_LIBRARY_PATH=/lib32:LD_LIBRARY_PATH .

Si cela ne fonctionne pas, essayez les bibliothèques 64 bits, LD_LIBRARY_PATH=/lib64:LD_LIBRARY_PATH.

commande complète:

sudo ./configure --enable-xdebug --with-php-config=/opt/lampp/bin/php-config LD_LIBRARY_PATH=/lib32:LD_LIBRARY_PATH 
1

xdebug a été compilé obtenir en 32 bits. Compiler en utilisant:

CXXFLAGS="-m64" CFLAGS="-m64" LDFLAGS="-m64" ./configure --enable-xdebug 

travaillé pour moi sur SPARC Solaris 10.