Linux世界: January 2008的归档

Web压力测试工具介绍

| 暂无评论

x64平台的一些问题

| 暂无评论
在x64位机器上使用libxml动态库时,发现从源码安装php时候老是make不上,即时指定libxml的安装路径也是无效果,make错误如下
ext/libxml/.libs/libxml.o(.text+0x555): In function `_php_libxml_free_error':
/home/lijunlia/opt/src/php-5.2.5/ext/libxml/libxml.c:441: undefined reference to `xmlResetError'
ext/libxml/.libs/libxml.o(.text+0x5a9): In function `_php_list_set_error_structure':
/home/lijunlia/opt/src/php-5.2.5/ext/libxml/libxml.c:455: undefined reference to `xmlCopyError'
ext/libxml/.libs/libxml.o(.text+0xf6a): In function `zm_activate_libxml':
/home/lijunlia/opt/src/php-5.2.5/ext/libxml/libxml.c:651: undefined reference to `xmlParserInputBufferCreateFilenameDefault'
ext/libxml/.libs/libxml.o(.text+0xf76):/home/lijunlia/opt/src/php-5.2.5/ext/libxml/libxml.c:652: undefined reference to `xmlOutputBufferCreateFilenameDefault'
...
/home/lijunlia/opt/src/php-5.2.5/ext/xmlwriter/php_xmlwriter.c:1523: undefined reference to `xmlNewTextWriterMemory'
ext/xmlwriter/.libs/php_xmlwriter.o(.text+0x1e7d): In function `php_xmlwriter_flush':
/home/lijunlia/opt/src/php-5.2.5/ext/xmlwriter/php_xmlwriter.c:1581: undefined reference to `xmlTextWriterFlush'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
进入libxml安装目录,直接查看lib库中是否有xmlTextWriterFlush这个引用:
$nm libxml2.so |grep xmlTextWriterFlush
00000000000f3060 T xmlTextWriterFlush
为什么有上面这个错误呢?查了好久,发现x64的平台寻找lib时,首先会寻找/usr/lib64这个目录,我发现这个目录里面有一个libxml2.so,是一个老版本,导致一些东西没有定义:
$nm libxml2.so.2.5.10  |grep xmlTextWriterFlush
nm: libxml2.so.2.5.10: no symbols
$nm libxml2.so.2.6.30 |grep xmlTextWriterFlush
00000000000f3060 T xmlTextWriterFlush
郁闷了老半天,知道错误后,然后删除lib64目录下的一些老版本的libxml2.so,然后重新configure:
./configure --prefix=/home/lijunlia/opt/usr/local/php --with-apxs2=/home/lijunlia/opt/usr/local/apache2/bin/apxs --with-mysql=/home/lijunlia/opt/usr/local/mysql --with-config-file-path=/home/lijunlia/opt/etc --with-gd --with-zlib --with-jpeg-dir=/usr/local/jpeg --with-libxml-dir=/usr --enable-sockets --with-iconv --enable-mbstring --enable-soap --with-curl --with-freetype-dir=/usr/local --with-pgsql=/home/lijunlia/opt/usr --enable-zend-multibyte
终于出现了:
Build complete.
Don't forget to run 'make test'.
作此笔记,以儆效尤。

关于VirtualBox

| 暂无评论
似乎目前虚拟化的东西很流行,我的机器也作了一次半虚拟化,用的是VirtualBox。

虚拟化的好处就是尽可能的减少机器的资源消耗和浪费,达到最佳使用状态。

本来我机器是512M的内存,后来因为XP太慢加了1G的内存和120G硬盘,平时Fedora8用到的内存根本不到512M,况且硬盘富富有余,于是开始了我本本的虚拟计划。

由于本本是ATI MoBILITY RADEON X700的显卡,从某种角度来说(专门测试了一个月的3d效果,效果不太理想),根本无法正常的使用3d效果,如果我虚拟出一个别的显卡、装上其驱动,是否能够解决该问题呢?

我分别作了WinXP、Ubuntu、FreeBSD三种操作系统的虚拟化。

1,WinXP:尽管某些牛人宣称自己已经从来不用Windows、不用微软的系统,但是我还是要用的,因为一些证书的问题,还非得ie浏览器核心的浏览器,尽管我装了crossover安装了ie6,但是一些问题还是无法彻底的解决或者解决得不是很完美。
2,Ubuntu:据称是解决驱动最牛的操作系统,桌面功能强大,我想是否3d的问题能否有希望在这里面解决。
3,FreeBSD:我最早使用的Unix系统,虽然目前一直使用fedora系列,但是对freebsd还是情有独钟,目前雅虎公司开发机使用的大部分都是freebsd系统。

肚子饿了,先吃完饭然后说说心得吧~