我正在尝试使用最新版本的libgphoto2(2.5.12)和gphoto2(2.5.11)来处理Debian Jessie。我从git下载并解压缩了源文件,并按照安装说明进行操作:
autoreconf --install --symlink
./configure --prefix=/usr/local
配置工作没有任何重大问题。我唯一注意到的是它提到了#lib ;bus-1.0 no"但" libusb是"。我尝试重新安装libusb-1.0-0(-dev),但没有改变。
以下是make输出的摘录:
make[4]: Entering directory '/home/max/Downloads/libgphoto2-2.5.12/libgphoto2_port'
/bin/bash ./libtool --tag=CC --mode=link gcc -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -module -no-undefined -avoid-version -export-dynamic -export-symbols ./iolib.sym -rpath '/usr/local/lib/libgphoto2_port/0.12.0' -o usb1.la libusb1/usb1_la-libusb1.lo ./libgphoto2_port/libgphoto2_port.la -L/usr/local/lib -lusb-1.0 -lpthread
libtool: link: rm -fr .libs/usb1.ver
libtool: link: echo "{ global:" > .libs/usb1.ver
libtool: link: cat ./iolib.sym | sed -e "s/\(.*\)/\1;/" >> .libs/usb1.ver
libtool: link: echo "local: *; };" >> .libs/usb1.ver
libtool: link: gcc -shared -fPIC -DPIC libusb1/.libs/usb1_la-libusb1.o -Wl,-rpath -Wl,/home/max/Downloads/libgphoto2-2.5.12/libgphoto2_port/libgphoto2_port/.libs ./libgphoto2_port/.libs/libgphoto2_port.so -L/usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/libltdl.so -ldl -L/usr/local/lib /usr/local/lib/libusb-1.0.a -ludev -lpthread -g -O2 -pthread -Wl,-soname -Wl,usb1.so -Wl,-version-script -Wl,.libs/usb1.ver -o .libs/usb1.so
/usr/bin/ld: /usr/local/lib/libusb-1.0.a(libusb_1_0_la-core.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libusb-1.0.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:820: recipe for target 'usb1.la' failed
make[4]: *** [usb1.la] Error 1
...并停下来。我根本就不知道该做什么作为" -fPIC"在gcc选项中提到。
如果我能向您提供进一步的信息,请告诉我。