#27979 closed defect (fixed)
ports requiring libusb should allow libusb-devel to satisfy the dependency
Reported by: | njbutko@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.9.2 |
Keywords: | Cc: | al-libnfcport@…, brett@…, ecronin (Eric Cronin), jt.burgess@…, jtomshine@…, mail@…, michaelld (Michael Dickens), ghosthound, rmstonecipher@…, ryandesign (Ryan Carsten Schmidt), tobypeterson, tomldavis@…, sean@…, cooljeanius (Eric Gallager) | |
Port: | libnfc libdc1394 libfreespace libusb-compat usbmuxd libgpod gpsd py26-pyusb-devel py27-pyusb-devel indi usrp iguanaIR nut |
Description
I just tried to run port upgrade outdated. libdc1394 now seems to depend on libusb.
libusb is notoriously buggy and out of date, and there has been a lot of active, recent development in libusb-devel.
If libdc1394 requires usb support, it should use libusb-devel, at least for now.
Attaching a patch.
Attachments (3)
Change History (22)
Changed 14 years ago by njbutko@…
Attachment: | Portfile-libdc1394.patch added |
---|
comment:1 Changed 14 years ago by jmroot (Joshua Root)
Owner: | changed from macports-tickets@… to mail@… |
---|---|
Port: | libdc1394 added |
Please remember to fill in the Port field and cc the maintainer.
comment:2 Changed 14 years ago by jmroot (Joshua Root)
Could you point out specific problems that are caused by not using libusb-devel?
comment:3 follow-up: 5 Changed 14 years ago by njbutko@…
libusb has been under a lot of active development lately, because of interest in the kinect. It turns out that libusb was not widely used or well tested until suddenly everybody wanted to use kinects. Then many problems were found. They have been patched, but only in the development port.
For example,
http://www.kinect-hacks.com/kinect-guides/12-17-10/install-openkinect-using-libfreenect-and-libusb-mac-osx
http://www.freenect.com/how-to-get-the-kinect-working-on-mac-os-x
comment:4 Changed 14 years ago by mail@…
Patch works fine :), thanks.
BTW: would it be better to change all Ports to libusb-devel? Or to use the name libusb instead of libusb-devel?
comment:5 follow-up: 6 Changed 14 years ago by jmroot (Joshua Root)
Replying to njbutko@…:
libusb has been under a lot of active development lately, because of interest in the kinect. It turns out that libusb was not widely used or well tested until suddenly everybody wanted to use kinects. Then many problems were found. They have been patched, but only in the development port.
OK, so "problems with the kinect" is a little less vague. But can you point out the specific problems?
comment:6 Changed 14 years ago by njbutko@…
Replying to jmr@…:
OK, so "problems with the kinect" is a little less vague. But can you point out the specific problems?
Unfortunately, I don't really know the specifics of the problems. I only have a vague idea based on talking to the developers of libfreenect a few months ago. Their opinion was that libusb was buggy in many of its more advanced features. Specifically, they were finding that Apple's IOKit had a lot of poorly documented specifications that were difficult to follow correctly, and that libusb didn't follow them correctly. So, they patched up the parts of libusb that needed patching to get the Kinect to work. They submitted the patches, and then were frustrated by libusb's slow release schedule. They got the patches pushed into the development branch, and the development branch is currently required for anyone working with a kinect.
There is a lot of overlap with people using kinect and libdc1394 (basically anyone doing computer vision), and it would be nice for them to be compatible.
I'm not sure what a good general policy for this sort of thing is. On the one hand, development versions are inherently unstable, because new features are being added. However, it sucks when the "stable" version has bugs that make it unusable.
comment:7 follow-up: 8 Changed 14 years ago by mail@…
So basically i see 3 possible solutions:
- We remove the dependency to libusb: everyone can build libdc1394 with some features turned off when there is no libusb installed before libdc1394.The user has the choice of installing either libusb or libusb-devel before libdc1394.
- We set the dependency to libusb: all users of the kinect will be very unhappy and have to build ouside macports.
- We set the dependency to libusb-devel: kinect users will be happy, all people which use a port depending on libusb will be unhappy.
I personally favor solution 1 :). If that is OK for everyone, i will change the port to this setting...
:q! Uwe
comment:8 Changed 14 years ago by njbutko@…
I personally favor solution 1 :). If that is OK for everyone, i will change the port to this setting...
Uwe, solution 1 is acceptable for me, but I would propose a 4th option. Just have a "libusbdevel" variant for libdc1394. This will let users decide between stable and unstable, and in the future, when the fixes get propagated to the main branch, we won't really have to fix anything.
So to be clear, what I am proposing is that I would install lib1394 in the following way:
sudo port install lib1394 +libusbdevel
and someone not using kinect could install lib1394 as before.
I'll attach a new patch for this solution.
Changed 14 years ago by njbutko@…
Attachment: | libdc1394_variant_Portfile.patch added |
---|
libusbdevel variant patch
comment:9 Changed 14 years ago by njbutko@…
Alright, I attached a patch which implements my proposal, and seems to work on my computer.
Just a correction to the command before, of course this is the command:
sudo port install libdc1394 +libusbdevel
comment:11 follow-up: 12 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | al-libnfcport@… brett@… ecronin@… jt.burgess@… jtomshine@… mail@… michaelld@… ricci@… rmstonecipher@… ryandesign@… toby@… tomldavis@… added |
---|---|
Port: | libnfc libfreespace libusb-compat usbmuxd libgpod gpsd py26-pyusb-devel py27-pyusb-devel indi usrp iguanaIR nut added |
Summary: | libdc1394 requires libusb, conflicts with libusb-devel, which is more stable. → ports requiring libusb should allow libusb-devel to satisfy the dependency |
The correct solution is not to add variants or add new ports, but to declare the dependency in such a way that either libusb or libusb-devel could satisfy it. This is how all ports should declare dependencies on all ports having -devel versions. That is, the dependency should not be "port:libusb" (nor "port:libusb-devel") but instead "path:lib/pkgconfig/libusb-1.0.pc:libusb". See #14540 for further documentation. Cc'ing maintainers of all ports that depend on libusb.
comment:12 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to ryandesign@…:
That is, the dependency should not be "port:libusb" (nor "port:libusb-devel") but instead "path:lib/pkgconfig/libusb-1.0.pc:libusb".
Or alternately, if it is decided that libusb-devel should be the default for now until a new release of libusb is made, then it should be "path:lib/pkgconfig/libusb-1.0.pc:libusb-devel".
Changed 14 years ago by mail@…
Attachment: | Portfile_pkgconfig.diff added |
---|
Portfile change for depends on pkgconfig
comment:13 Changed 14 years ago by mail@…
Added a Portfile depending on the installed libusb/libusb-devel in pkgconfig.
comment:15 Changed 13 years ago by jmroot (Joshua Root)
Owner: | changed from mail@… to macports-tickets@… |
---|
Committed the change to libdc1394 in r86996. All the other ports have yet to be done (if you're getting this in an email, that probably means one or more of them is your responsibility).
comment:16 Changed 13 years ago by ecronin (Eric Cronin)
py{26,27}-pyusb-devel taken care of in r86997
comment:17 Changed 13 years ago by adfernandes (Andrew Fernandes)
Just FYI, libusb-devel
will be going away shortly, replaced by an updated version of libusb
.
comment:18 Changed 13 years ago by adfernandes (Andrew Fernandes)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Patched portfile