gnu: libusb-compat: Add libusb to RUNPATH.

This avoids the error:

  teensy_loader_cli: error while loading libusb-1.0.so.0 from libusb-0.1.so.4:
  libusb-1.0.so.0: cannot open shared object file: No such file or directory

e.g. when running teensy_loader_cli, which uses libusb-compat.

* gnu/packages/libusb.scm (libusb-compat)
[arguments] <configure-flags>: New LDFLAGS variable.
This commit is contained in:
Maxim Cournoyer 2023-09-02 15:43:18 -04:00
parent 5ff0c8997a
commit ddd8bb104a
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -102,7 +102,11 @@ (define-public libusb-compat
(build-system gnu-build-system)
(arguments
(list #:configure-flags
#~(list "--disable-static")))
#~(list "--disable-static"
;; Extending the RUNPATH is necessary, otherwise loading
;; the libusb-1.0.so.0 library fails.
(string-append "LDFLAGS=-Wl,-rpath="
#$(this-package-input "libusb") "/lib"))))
(native-inputs
(list autoconf automake libtool pkg-config))
(inputs