WIP: Add extra check for libusb-1.0
#125
Draft
selk
wants to merge 1 commits from feat/pkg-config
into master
pull from: feat/pkg-config
merge into: TDE:master
TDE:r14.1.x
TDE:master
TDE:fix/kxkb-450
TDE:feat/shutdownd-dialog-border
TDE:feat/whatever
TDE:feat/kdesktop
TDE:feat/layouts
TDE:issue/270/tdebase
TDE:r14.0.x
TDE:v3.5.13-sru
TDE:issue/227
TDE:fix/kicker-clock-build-dependency
TDE:branding/kde_to_tde2
TDE:feat/fix-suspend-code
Reviewers
Request review
No reviewers
Labels
General - need additional info from contributor PR/keep-branch
Pull request - do not delete branch after merging PR/not-ok
Pull request - need fixing PR/rfc
Pull request - request for comments PR/update-trans
Pull request - update to translation files needed PR/wip
Pull request - work in progress RS/R14.0.x
Related to R14.0.x series RS/R14.1.x
Related to R14.1.x series SL/critical
Severity level - critical SL/major
Severity level - major SL/minor
Severity level - minor SL/normal
Severity level - normal SL/regression
Severity level - regression from previous version SL/trivial
Severity level - trivial SL/wishlist
Severity level - wishlist request ST/duplicate
Status - duplicate of another issue ST/invalid
Status - invalid report ST/notourproblem
Status - not our problem ST/rejected
Status - rejected ST/wontfix
Status - won't fix ST/worksforme
Status - works for me, unable to reproduce
Apply labels
Clear labels
GE/need-info
General - need additional info from contributor PR/keep-branch
Pull request - do not delete branch after merging PR/not-ok
Pull request - need fixing PR/rfc
Pull request - request for comments PR/update-trans
Pull request - update to translation files needed PR/wip
Pull request - work in progress RS/R14.0.x
Related to R14.0.x series RS/R14.1.x
Related to R14.1.x series SL/critical
Severity level - critical SL/major
Severity level - major SL/minor
Severity level - minor SL/normal
Severity level - normal SL/regression
Severity level - regression from previous version SL/trivial
Severity level - trivial SL/wishlist
Severity level - wishlist request ST/duplicate
Status - duplicate of another issue ST/invalid
Status - invalid report ST/notourproblem
Status - not our problem ST/rejected
Status - rejected ST/wontfix
Status - won't fix ST/worksforme
Status - works for me, unable to reproduce
No Label
GE/need-info
PR/keep-branch
PR/not-ok
PR/rfc
PR/update-trans
PR/wip
RS/R14.0.x
RS/R14.1.x
SL/critical
SL/major
SL/minor
SL/normal
SL/regression
SL/trivial
SL/wishlist
ST/duplicate
ST/invalid
ST/notourproblem
ST/rejected
ST/wontfix
ST/worksforme
Milestone
Set milestone
Clear milestone
No items
No Milestone
Assignees
Assign users
Clear assignees
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.
No due date set.
Dependencies
No dependencies set.
Reference: TDE/tdebase#125
Reference in new issue
There is no content yet.
Delete Branch 'feat/pkg-config'
Deleting a branch is permanent. It CANNOT be undone. Continue?
No
Yes
Add extra check for libusb-1.0to WIP: Add extra check for libusb-1.0 4 years agoSo I will add some summary here, so someone who not knows about the IRC discussions is knowing the background:
So the PR is about finding some concept/fix to make all happy. 😄
References:
EDIT: After learning more about CMake and finding out, that there are at least another broken libusb check, I would suggest that this function should be added to the common used CMake tests, so they are easy to keep up to date.
Question: the PR is marked WIP. Is more work planned on this or do we need more testing in freebsd for example?
@MicheleC, this commit does nothing good so far, because you will end up with some FTBFS. So there is more work needed and testing/research too. In *BSD it seems to work right now the way it was, because there was just a fix around some months ago.
ok, thanks Chris
I came up with something like this:
but this solution does not get on Slavek's fancies.
Without testing anything but having a quick thought on the topic, he's more geared towards something like:
Furthermore I don't understand why the concern for libusb-1.0 since there is no <usb.h> header anymore in that library, it has been replaced with <libusb.h> if I'm not mistaken.
One can note that on Linux, libusb-0.x and libusb-1.x can be installed at the same time since they aren't conflicting to each other ; for instance Slackware is providing libusb-0.1.5 under the package "libusb-compat".
API of libusb-0.1 and libusb-1.0 and libusb-2.0 are not compatible
libusb-compat provides libusb-0.1 compatible API over libusb-1.0
on FreeBSD (libusb-2.0) also provide libusb-0.1 and libusb-1.0 compatible API
kcontrol/input only support libusb-0.1 API
so just allowing libusb-1.0 for
WITH_LIBUSB
introduce such build errors.Install libusb-0.1 or libusb-compat package to build current source tree.
or
Additionally detect libusb-1.0 and define other than
HAVE_LIBUSB
something likeHAVE_LIBUSB1
,then implement libusb-1.0 support codes to kcontrol/input.
kcontrol/usbview should use libusb too.
Right. libusb-0.1 is legacy, while libusb-compat is a compatible API over libusb-1.0...
If FreeBSD provides libusb-0.1 (legacy) and libusb-compat, it would be better to detect "libusb-1.0" due that "libusb-compat" requires the installation or the presence of "libusb-1.0", according to the source.
So it can be something like "libusb-2.0" for FreeBSD or fall in "libusb-1.0" directly. I guess
Update:
Adding "libusb-1.0.24" and "libusb-compat-0.1.7" allows tdebase to be built with
-DWITH_LIBUSB=ON
...So is this issue still valid?
Hi @MicheleC !
Yes, this issue is still valid, is what @obache says above.
"libusb-compat" contains libusb.pc, so extra check is not required.
"libusb-1.0" should be installed as a dependency of "libusb-compat",
and not be used directly here.
"libusb-2.0 on FreeBSD" is special, "usb.h" on FreeBSD is just for libusb-0.1 API compatible,
should not be recognized as a part of libusb-2.0 API.
"libusb-2.0" is only on FreeBSD and it always contains libusb-0.1 API (libusb-0.1.pc)
pkg_search_module( LIBUSB libusb libusb-0.1 )
may be suitable.I think that WIP parts should be libusb 1.0 API support codes if it is allowed and not want to install packages seemed obsoleted.
ok, thanks both for the feedback. Anyone working on what is left to do before we can remove the WIP?