gonzalo / gphoto2-updater

Gphoto2 compiler and installer script. This script was initially created for Raspbian and Raspberry Pi but it is also tested for Ubuntu and Debian Jessie & Wheezy.
http://github.com/gonzalo/gphoto2-updater
292 stars 71 forks source link

When attempting to build libgphoto2 it fails #11

Closed glyons closed 9 years ago

glyons commented 9 years ago

When attempting to build libgphoto2 it fails

Makefile :902 recipe for target 'usb1_la-libusb1.lo' failed Make 1004 recipe for target 'install-recursive' failed.

any ideas ?

Thanks Gavin

gonzalo commented 9 years ago

Please confirm your OS with "$uname -a"

glyons commented 9 years ago

Raspbian 7 wheezy

I use the following script to upgrade to 2.5.2 which ran and installed gphoto2.5.2 apt-get install -y libltdl-dev libusb-dev libexif-dev libpopt-dev cd/ mkdir gphoto-working-directory cd gphoto-working-directory/ wget http://ftp.de.debian.org/debian/pool/main/libu/libusbx/libusbx_1.0.11.orig.tar.bz2 tar xjvf libusbx_1.0.11.orig.tar.bz2 cd libusbx-1.0.11/ ./configure make make install cd .. wget http://downloads.sourceforge.net/project/gphoto/libgphoto/2.5.2/libgphoto2-2.5.2.tar.bz2 tar xjf libgphoto2-2.5.2.tar.bz2 cd libgphoto2-2.5.2 ./configure make make install cd .. wget http://downloads.sourceforge.net/project/gphoto/gphoto/2.5.2/gphoto2-2.5.2.tar.gz tar xzvf gphoto2-2.5.2.tar.gz cd gphoto2-2.5.2 ./configure make make install cd .. ldconfig

gonzalo commented 9 years ago

Very similar to current installation process. Unfortunately I cannot test scritp because my RPI failed some months ago. Just testing it with Ubuntu 14.04 with no issues.

Are you using a fresh Raspian installation or you have been using it for a while?

glyons commented 9 years ago

It's fresh Raspian installation, which I updated.

I've got it running on 2.5.5 now. Works well

apt-get install -y libltdl-dev libusb-dev libexif-dev libpopt-dev cd/ mkdir gphoto-working-directory cd gphoto-working-directory/ wget http://ftp.de.debian.org/debian/pool/main/libu/libusbx/libusbx_1.0.11.orig.tar.bz2 tar xjvf libusbx_1.0.11.orig.tar.bz2 cd libusbx-1.0.11/ ./configure make make install cd .. wget http://downloads.sourceforge.net/project/gphoto/libgphoto/2.5.5/libgphoto2-2.5.5.tar.bz2 tar xjf libgphoto2-2.5.5.tar.bz2 cd libgphoto2-2.5.5 ./configure make make install cd .. wget http://downloads.sourceforge.net/project/gphoto/gphoto/2.5.5/gphoto2-2.5.5.tar.gz tar xzvf gphoto2-2.5.5.tar.gz cd gphoto2-2.5.5 ./configure make make install cd .. ldconfig

iMagoo commented 9 years ago

Hi I've got it running on 2.5.5. Everything works fine after a couple of hours I got a PTP Error, are you aware of this issue ? Its still working tho, and continue to take picture whenever it can.

gonzalo commented 9 years ago

Thanks for feedback Mat,

why are you using libusbx_1.0.11 instead of libusbx_1.0.17?

Gonzalo

2014-11-24 9:28 GMT+01:00 Mat notifications@github.com:

Hi I've got it running on 2.5.5. Everything works fine after a couple of hours I got a PTP Error, are you aware of this issue ? Its still working tho, and continue to take picture whenever it can.

— Reply to this email directly or view it on GitHub https://github.com/gonzalo/gphoto2-updater/issues/11#issuecomment-64163784 .

iMagoo commented 9 years ago

For my case I'm not using libusbx_1.0.11

OutdoorMe commented 9 years ago

glyons thank you very much for the Info you posted about the older libusbx_1.0.11.orig.tar.bz2 it fixed my problem compiling libgphoto2 / gphoto2 on Raspbian

With libusbx 1.0.17 / 1.0.18 I received this error:

libtool: compile: gcc -DHAVE_CONFIG_H -I. -DLOCALEDIR=\"/usr/local/share/locale\" -DIOLIBS=\"/usr/local/lib/libgphoto2_port/0.12.0\" -D_GPHOTO2_INTERNAL_CODE -I. -I/usr/local/include/libusb-1.0 -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -MT usb1_la-libusb1.lo -MD -MP -MF .deps/usb1_la-libusb1.Tpo -c libusb1/libusb1.c -fPIC -DPIC -o .libs/usb1_la-libusb1.o libusb1/libusb1.c:70:20: error: static declaration of 'libusb_strerror' follows non-static declaration /usr/local/include/libusb-1.0/libusb.h:1307:26: note: previous declaration of 'libusb_strerror' was here Makefile:902: recipe for target 'usb1_la-libusb1.lo' failed make[4]: *\ [usb1_la-libusb1.lo] Error 1

Going back to libusbx_1.0.11.orig.tar.bz2 fixed my problem and the latest gphoto2-2.5.7 and gphoto2-2.5.6 compiled successfully.

I have configured the libusbx with ./configure --prefix=/usr because I found that I already had the file /usr/include/libusb-1.0/libusb.h available in my Raspbian installed from some package ...

gonzalo commented 9 years ago

seems to be some problem with libusbx_1.0.17 currently unavailable in official debian repositories. new version of script released please test it.