Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 413251

Summary: www-client/chromium-9999: third-party/libusb
Product: Gentoo Linux Reporter: Julien Sanchez <julien.sanchez>
Component: Current packagesAssignee: Chromium Project <chromium>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: http://code.google.com/p/chromium/issues/detail?id=124803
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Chromium-9999 ebuild patch
Log file when trying to compile with system's libusb library

Description Julien Sanchez archtester 2012-04-23 13:20:38 UTC
chromium-9999 depends on libusb now. To be built, bundled library should be kept in the ebuild or chromium should depend on and use dev-libs/libusb:1
Comment 1 Julien Sanchez archtester 2012-04-23 13:24:58 UTC
I have just tested and built it with the usual trivial workaround: keeping third_party/libusb is OK.
I don't know if it is easy to use system's libusb package.
Comment 2 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2012-04-23 16:25:01 UTC
I added a comment on http://codereview.chromium.org/9826025/ . Let's see what happens.
Comment 3 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2012-04-26 07:27:30 UTC
I've used the workaround to keep bundled libusb.

Let's keep the bug open until it's fixed correctly, by using system libusb.
Comment 4 Julien Sanchez archtester 2012-05-11 09:29:48 UTC
Created attachment 311411 [details, diff]
Chromium-9999 ebuild patch

System libusb library support has been finally commited.

I tried to compile it with attached own patched ebuild but it fails with:

In file included from ./chrome/browser/usb/usb_device.h:15:0,
                 from ./chrome/browser/usb/usb_service.h:15,
                 from chrome/browser/extensions/api/usb/usb_api.cc:14:
./third_party/libusb/libusb.h:11:50: fatal error: third_party/libusb/src/libusb/libusb.h: No such file or directory
compilation terminated.

It seems USE_SYSTEM_LIBUSB is not defined by the build system despite of -Duse_system_libusb=1 added to the patched ebuild.

I can't figure out why...
Comment 5 Julien Sanchez archtester 2012-05-11 09:33:29 UTC
Created attachment 311413 [details]
Log file when trying to compile with system's libusb library
Comment 6 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2012-05-11 10:07:12 UTC
(In reply to comment #4)
> It seems USE_SYSTEM_LIBUSB is not defined by the build system despite of
> -Duse_system_libusb=1 added to the patched ebuild.

This is a good diagnosis. I think that chromium/src/chrome/chrome_browser_extensions.gypi does not depend on libusb.gyp, see my latest comment on http://codereview.chromium.org/10332075/
Comment 7 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2012-05-14 19:51:11 UTC
(In reply to comment #6)
> (In reply to comment #4)
> > It seems USE_SYSTEM_LIBUSB is not defined by the build system despite of
> > -Duse_system_libusb=1 added to the patched ebuild.
> 
> This is a good diagnosis. I think that
> chromium/src/chrome/chrome_browser_extensions.gypi does not depend on
> libusb.gyp, see my latest comment on http://codereview.chromium.org/10332075/

Upstream fix https://chromiumcodereview.appspot.com/10389096 has landed, feel free to do another test.
Comment 8 Julien Sanchez archtester 2012-05-15 07:59:16 UTC
It compiles and seems to work flawlessly.

Chrome is correctly linked to system's libusb:
$ ldd /usr/lib/chromium-browser-live/chrome
-- snip --
	libusb-1.0.so.0 => /usr/lib64/libusb-1.0.so.0 (0x00007f5dd2ae1000)
-- snip --

I would also like to thank you Paweł for your extensive upstream explanation about making shim headers. It was very enlightening to me.
Comment 9 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2012-05-22 19:58:39 UTC
Fixed. We're using system libusb in chromium-21.x now.