Ticket #2 (reopened defect)

Opened 3 years ago

Last modified 5 months ago

invalid libusb check fix

Reported by: Stanislav Brabec Owned by: somebody
Priority: major Milestone:
Component: openobex-lib Version:
Keywords: Cc: sbrabec@…

Description

Attached patch fixes invalid check of libusb, which fails on platforms, where libusb pkg-config file doesn't reside in /usr/lib/pkgconfig.

Attachments

openobex-libusb-check.patch Download (418 bytes) - added by Stanislav Brabec 3 years ago.
openobex-libusb-check.patch

Change History

Changed 3 years ago by Stanislav Brabec

openobex-libusb-check.patch

  Changed 3 years ago by zany

  • status changed from new to closed
  • resolution set to fixed

Looks good. Applied to CVS. Thank you Stanislav!

  Changed 3 years ago by zany

This patch is disputed. Reverted in CVS.

follow-up: ↓ 4   Changed 5 months ago by mikeyrb

  • status changed from closed to reopened
  • resolution fixed deleted

This affects me when cross-compiling. The hard check for the *.pc files (libusb.pc and libusb-1.0.pc). Is there any reason that the hard check remains, when there is the PKG_CHECK_MODULES line now? Can I simply remove the AC_CHECK_FILE line or do I need the REQUIRES="libusb" part?

in reply to: ↑ 3   Changed 5 months ago by mikeyrb

Replying to mikeyrb:

This affects me when cross-compiling. The hard check for the *.pc files (libusb.pc and libusb-1.0.pc). Is there any reason that the hard check remains, when there is the PKG_CHECK_MODULES line now? Can I simply remove the AC_CHECK_FILE line or do I need the REQUIRES="libusb" part?

insert "fails" after "The hard check for the *.pc files"

  Changed 5 months ago by Stanislav Brabec

Yes, the AC_CHECK_FILE should not be there, it is an invalid use of .pc files. There is no guarantee of their location, they should be searched and read only by pkg-config.

The patch above was only half-applied.

It is incorrect not only for cross-compiling, but also for libdir=/usr/lib64 or libusb in /usr/local/lib.

Well, the macro AC_CHECK_FILE itself is not cross-compiling capable, as it does not respect sysroot (it is a problem of autoconf). The macro PKG_CHECK_FILES should work correctly even in cross build environment.

Note: See TracTickets for help on using tickets.