2009-08-07 23 views
1

如何使用configure和make工具來指定使用64位庫?我認爲這是自動的,但我得到錯誤的ELF類。如何使用「make」使用64位庫,因爲ELFCLASS64錯誤

我想爲Ubuntu 64編譯Xdebug與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 

./configure看起來沒給我,廠名工作無差錯,我已經複製了配置的情況下,其相關:

/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

退房https://launchpad.net/~zend-framework/+archive/ppa最新的Zend引擎(我認爲) 。 – MighMoS 2009-08-12 13:53:32

回答

2

我不確定錯誤,但你爲什麼要編譯xdebug?它可以在Ubuntu的存儲庫中作爲php5-xdebug(sudo apt-get install php5-xdebug)使用。雖然你沒有提及你的發行版,可能它的名字是?

但是,爲了回答你的問題,該錯誤信息是這樣的XDebug 64位,但是這是一個問題(是什麼LAMPP執行32位二進制?)

+0

好吧,其實我用這個頁面編譯lampp http://ubuntuforums.org/showthread.php?t=719110 我試過sudo apt-get安裝php5-xdebug並移動了xdebug .so到我的/ opt/lampp/lib/php/extensions/dir但仍然得到了elf64錯誤 我使用的是64位上的ubuntu的五筆。我不知道如何弄清楚lampp是否正在執行32位二進制文​​件 – 0x4f3759df 2009-08-11 19:27:18

+0

因此,我從這裏下載了32位xdebug,http://aspn.activestate.com/ASPN/Downloads/Komodo/RemoteDebugging 因爲我認爲如果我做./configure它會automake一個64位,現在它說, Xdebug需要Zend引擎API版本220090626. 已安裝的Zend引擎API版本220060519已過時。 因此,這一進展。我想我現在需要更新我的PhP版本。 謝謝 – 0x4f3759df 2009-08-11 22:33:12

0

或許運行時鏈接程序庫的路徑是錯誤的。/opt/lampp/lib64目錄是否存在? lampp是shell腳本嗎?如果是這樣,它是否設置了LD_LIBRARY_PATH變量的值(以及是否)?

+0

我沒有lib64目錄。我試過sudo apt-get安裝ia64-libs ,但沒有找到該軟件包。 – 0x4f3759df 2009-08-10 19:43:53

+0

嗨! 那麼你是否知道它呢?我在上Xubuntu上完全相同的問題,:-( – vector 2009-10-04 04:05:58

1

不會:

LD_LIBRARY_PATH=/lib64:$LD_LIBRARY_PATH ./lampp start 

工作?我不使用Ubuntu,所以你的路徑可能會有所不同。有一件事要做的是

ldd ./lampp 

看看默認的可執行文件指向什麼。

+0

LAMPP $ LDD ./lampp無引線 \t不是一個動態可執行文件 我沒有lib64的目錄。我試着命令和apt-get安裝IA64-庫但沒有找到包 – 0x4f3759df 2009-08-10 19:45:05

1

嘗試指向32個庫,LD_LIBRARY_PATH=/lib32:LD_LIBRARY_PATH

如果這不起作用,請嘗試64位庫,LD_LIBRARY_PATH=/lib64:LD_LIBRARY_PATH

完成命令:

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

Xdebug的是越來越編譯32位。使用編譯:

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

爲我工作的SPARC Solaris 10