Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 171939 - media-libs/libgphoto2 needs libusb
Summary: media-libs/libgphoto2 needs libusb
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Matthias Schwarzott
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-23 17:00 UTC by Goran Mekić
Modified: 2007-03-24 18:55 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Goran Mekić 2007-03-23 17:00:54 UTC
configure script from libhphoto2 says it needs libusb.

Reproducible: Always

Steps to Reproduce:
1. emerge -C libusb
2. emerge -1 libgphoto2

Actual Results:  
hecking for libusb to use... autodetect
checking for LIBUSB... checking libusb config program... libusb-config
checking for libusb-config... no
configure: error:
PKG_CONFIG_PATH=/usr/lib64/pkgconfig
LIBUSB_LIBS=
LIBUSB_CFLAGS=

* Fatal: libgphoto2 port access library by default requires libusb >= 0.1.5 to build.
*        You must explicitly disable libusb to build libgphoto2_port without it.


Expected Results:  
Emerge the libgphoto2
Comment 1 Goran Mekić 2007-03-23 17:03:10 UTC
Sorry for this. It happens if I have no cameras variable defined. Didn't try with some of them defined. Probably some USB cameras need this (logical, isn't it?).
Comment 2 Matthias Schwarzott gentoo-dev 2007-03-23 19:38:37 UTC
@alonbl:
You removed libusb, please re-add it.

Comment 3 Alon Bar-Lev (RETIRED) gentoo-dev 2007-03-23 20:20:54 UTC
Hello,

Hmmm.... I removed it since Gentoo uses udev, the libusb is not needed for packages that use udev, the usb use flag was used for the hotplug stuff.

People without this USE flag would have gotten this, so it is not my doing anyway... :)

And now for the real issue...

You should add --without-libusb to econf in order to make it work without libusb.

Please notice that if you run the configure in libgphoto2_port, which is the one which produces the error you get:

* Fatal: libgphoto2 port access library by default requires libusb >= 0.1.5 to build.
*        You must explicitly disable libusb to build libgphoto2_port without it.
*
* Possible solutions:
*   - call configure with --with-libusb=no or --without-libusb
*   - set PKG_CONFIG_PATH to adequate value
*   - call configure with LIBUSB_LIBS=.. and LIBUSB_CFLAGS=..
*   - call configure with one of the --with-libusb parameters
*   - get libusb and install it

But maybe adding back the usb? >=dev-libs/libusb-0.1.8 (I don't believe the usbutils is needed). And add $(use_with usb libusb) to econf.

Your choice.
Comment 4 Matthias Schwarzott gentoo-dev 2007-03-23 21:06:33 UTC
hmm, what does udev and libusb have together?

libgphoto2 uses no in kernel driver for accessing usb-cams, but userspace-drivers (with libusb).
Sure libusb is needed.
Comment 5 Alon Bar-Lev (RETIRED) gentoo-dev 2007-03-23 21:17:50 UTC
OK.
So add the dependency, but this time also $(use_with usb libusb).
Comment 6 Matthias Schwarzott gentoo-dev 2007-03-24 18:36:47 UTC
Readded dependency to the ebuilds.
Comment 7 Alon Bar-Lev (RETIRED) gentoo-dev 2007-03-24 18:44:22 UTC
I guess you decided to include usb support in every configuration... It is fine for my configuration, but I am not sure that anyone will feel the same.
Comment 8 Matthias Schwarzott gentoo-dev 2007-03-24 18:52:07 UTC
Yes, added it unconditionally.

Ok, looking at what port types libgphoto2 supports?
# gphoto2 --list-ports
Gefundene Geräte: 6
Pfad                             Beschreibung
------------------------------------------------------------------------
ptpip:                           PTP/IP Connection
serial:/dev/tts/0                Serieller Port 0
serial:/dev/tts/1                Serieller Port 1
serial:/dev/tts/2                Serieller Port 2
serial:/dev/tts/3                Serieller Port 3
usb:                             Universal Serial Bus

And I don't think any is widely used besides USB.
Is that related to CAMERAS setting?
If yes and someone needs it you can write code for that, but it gonna be ugly, read media-tv/linuxtv-dvb-firmware or apps-misc/lirc if you really want.
If no, you can perhaps readd usb? but I dont think it is worth.
Comment 9 Alon Bar-Lev (RETIRED) gentoo-dev 2007-03-24 18:55:08 UTC
Great!
As long as you does it on purpose I am happy!
Thanks.