guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: gnu: libusb-compat: Add libusb to RUNPATH.


From: guix-commits
Subject: 01/02: gnu: libusb-compat: Add libusb to RUNPATH.
Date: Sat, 2 Sep 2023 17:46:42 -0400 (EDT)

apteryx pushed a commit to branch master
in repository guix.

commit ddd8bb104ae45983217ab3ae40109a9aca5f4155
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sat Sep 2 15:43:18 2023 -0400

    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.
---
 gnu/packages/libusb.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm
index 5ebae9fe1c..1d514c11b7 100644
--- a/gnu/packages/libusb.scm
+++ b/gnu/packages/libusb.scm
@@ -102,7 +102,11 @@ devices on various operating systems.")
     (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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]