我正在尝试在Ubuntu Natty(11.04)32位上编译PDFLib。但是,我在'制作'阶段遇到了一些问题。
回顾一下:
./configure
,一切顺利但当我做make
时,我会在运行一段时间后得到你所看到的内容:
../../libtool --silent --mode=link gcc -o libpdf.la -rpath /usr/local/lib -version-info 6:5:0 ./pdflib.lo ../../libs/pdflib/libpdf_.la ../../libs/font/libfont.la ../../libs/pdcore/libpdcore.la ../../libs/png/libpng.la ../../libs/flate/libz.la ../../libs/tiff/libtiff.la ../../libs/jpeg/libjpeg.la -lm -export-dynamic
../../libtool --silent --mode=link gcc -o libs_libpdf.la ./pdflib.lo ../../libs/pdflib/libpdf_.la ../../libs/font/libfont.la ../../libs/pdcore/libpdcore.la ../../libs/png/libpng.la ../../libs/flate/libz.la ../../libs/tiff/libtiff.la ../../libs/jpeg/libjpeg.la -lm
make[2]: Leaving directory `/mnt/hgfs/src/php/pdflib-7.0.5/libs/pdflib'
make[1]: Leaving directory `/mnt/hgfs/src/php/pdflib-7.0.5/libs'
make[1]: Entering directory `/mnt/hgfs/src/php/pdflib-7.0.5/bind'
make[2]: Entering directory `/mnt/hgfs/src/php/pdflib-7.0.5/bind/pdflib'
make[3]: Entering directory `/mnt/hgfs/src/php/pdflib-7.0.5/bind/pdflib/c'
make[3]: Warning: File `../../../libs/pdflib/libs_libpdf.la' has modification time 1.2 s in the future
../../../libtool --silent --mode=compile gcc -c -I../../../libs/pdflib -I../../../libs/pdcore -O2 -g -D__NO_CTYPE -DPDC_PF_LINUX_IA32 -DASMV -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPDF_PLATFORM=\""Linux"\" -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -Wall hello.c
../../../libtool --silent --mode=link gcc -static -o hello hello.lo ../../../libs/pdflib/libs_libpdf.la ../../../libs/pdflib/libs_libpdf.la -lm
../../../libs/pdflib/.libs/libs_libpdf.a(deflate.o): In function `deflate_slow':
/mnt/hgfs/src/php/pdflib-7.0.5/libs/flate/deflate.c:1602: undefined reference to `pdf_z_longest_match'
../../../libs/pdflib/.libs/libs_libpdf.a(deflate.o): In function `deflate_fast':
/mnt/hgfs/src/php/pdflib-7.0.5/libs/flate/deflate.c:1498: undefined reference to `pdf_z_longest_match'
../../../libs/pdflib/.libs/libs_libpdf.a(deflate.o): In function `lm_init':
/mnt/hgfs/src/php/pdflib-7.0.5/libs/flate/deflate.c:1015: undefined reference to `pdf_z_match_init'
collect2: ld returned 1 exit status
make[3]: *** [hello] Error 1
make[3]: Leaving directory `/mnt/hgfs/src/php/pdflib-7.0.5/bind/pdflib/c'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/mnt/hgfs/src/php/pdflib-7.0.5/bind/pdflib'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/mnt/hgfs/src/php/pdflib-7.0.5/bind'
make: *** [all] Error 2
我不确定这个错误是什么。我在运行Ubuntu Natty 64位的云服务器上运行同样的东西,但我没有遇到任何问题。
我很感激一些指导。提前谢谢。
修改
下面是整个shell脚本(使用Ubuntu Natty 64位)
wget http://www.pdflib.com/binaries/PDFlib/705/PDFlib-Lite-7.0.5.tar.gz
tar -zxf PDFlib-Lite-7.0.5.tar.gz
mv PDFlib-Lite-7.0.5 pdflib-7.0.5
cd pdflib-7.0.5 && ./configure && make && make install
cd ..
wget http://pecl.php.net/get/pdflib-2.1.8.tgz
tar -zxf pdflib-2.1.8.tgz
mv pdflib-2.1.8 pdflib-pecl-2.1.8
cd pdflib-pecl-2.1.8
phpize && ./configure --with-pdflib && make
cp modules/pdf.so /usr/lib/php5/20090626+lfs/