GNU bug report logs -
#78301
[PATCH] gnu: guile-mqtt: Patch extension path.
Previous Next
To reply to this bug, email your comments to 78301 AT debbugs.gnu.org.
There is no need to reopen the bug first.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#78301
; Package
guix-patches
.
(Wed, 07 May 2025 15:19:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Evgeny Pisemsky <mail <at> pisemsky.site>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Wed, 07 May 2025 15:19:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/guile-xyz.scm (guile-mqtt): Patch extension path.
[arguments]: Add 'patch-extension-path phase.
Change-Id: Ifbbd0adebcf82a36f674ab3fded3db5ba04b98b0
---
gnu/packages/guile-xyz.scm | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 28a94dc83a..7c6e3ade3e 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -1658,7 +1658,16 @@ (define-public guile-mqtt
(build-system gnu-build-system)
(arguments
(list
- #:make-flags #~(list "GUILE_AUTO_COMPILE=0")))
+ #:make-flags
+ #~(list "GUILE_AUTO_COMPILE=0")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-extension-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "module/ffi/mosquitto.scm"
+ (("list #f \"libmosquitto\"")
+ (format #f "list #f \"~a/lib/libmosquitto\""
+ (assoc-ref inputs "mosquitto")))))))))
(native-inputs (list guile-3.0 pkg-config))
(inputs (list mosquitto))
(home-page "https://github.com/mdjurfeldt/guile-mqtt")
base-commit: ec95c71c01144fcae1a3d079e0d0aec6087b9d2a
--
2.49.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#78301
; Package
guix-patches
.
(Wed, 07 May 2025 15:30:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 78301 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Evgeny Pisemsky <mail <at> pisemsky.site> writes:
> * gnu/packages/guile-xyz.scm (guile-mqtt): Patch extension path.
> [arguments]: Add 'patch-extension-path phase.
>
> Change-Id: Ifbbd0adebcf82a36f674ab3fded3db5ba04b98b0
> ---
> gnu/packages/guile-xyz.scm | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
> index 28a94dc83a..7c6e3ade3e 100644
> --- a/gnu/packages/guile-xyz.scm
> +++ b/gnu/packages/guile-xyz.scm
> @@ -1658,7 +1658,16 @@ (define-public guile-mqtt
> (build-system gnu-build-system)
> (arguments
> (list
> - #:make-flags #~(list "GUILE_AUTO_COMPILE=0")))
> + #:make-flags
> + #~(list "GUILE_AUTO_COMPILE=0")
> + #:phases
> + #~(modify-phases %standard-phases
> + (add-after 'unpack 'patch-extension-path
> + (lambda* (#:key inputs #:allow-other-keys)
> + (substitute* "module/ffi/mosquitto.scm"
> + (("list #f \"libmosquitto\"")
> + (format #f "list #f \"~a/lib/libmosquitto\""
> + (assoc-ref inputs "mosquitto")))))))))
please use string-append. else if no "mosquitto" in inputs, The modified
result is "list #f \"#f/lib/libmosquitto\""
> (native-inputs (list guile-3.0 pkg-config))
> (inputs (list mosquitto))
> (home-page "https://github.com/mdjurfeldt/guile-mqtt")
>
> base-commit: ec95c71c01144fcae1a3d079e0d0aec6087b9d2a
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#78301
; Package
guix-patches
.
(Wed, 07 May 2025 16:52:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 78301 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Evgeny Pisemsky <mail <at> pisemsky.site> writes:
> Z572 <z572 <at> z572.online> writes:
>
>> else if no "mosquitto" in inputs
>
> I don't get it.
>
> It is in inputs.
for example, If I use the following codes
```
(define-public mosquitto-with-something
(package
(inherit mosquitto)
(name "mosquitto-with-something")
...
(license (list license:epl1.0 license:edl1.0))))
(define-public guile-mqtt-with-something
(package (inherit guile-mqtt)
(name "guile-mqtt-with-something")
...
(inputs (list mosquitto-with-v))))
```
guix build guile-mqtt-with-something will success, but if you see
share/guile/site/3.0/ffi/mosquitto.scm,
```
(define (foreign-pointer-search name)
(let loop ((libs (list #f "#f/lib/libmosquitto")))
(cond
((null? libs) (error "no library for ~s" name))
((false-if-exception (foreign-library-pointer (car libs) name)))
(else (loop (cdr libs))))))
```
This will cause problems. It is best to report an error during
build. A better approach is to use search-input-file. Instead of relying
on names, look up /lib/libmosquitto.so.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#78301
; Package
guix-patches
.
(Wed, 07 May 2025 20:06:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 78301 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/guile-xyz.scm (guile-mqtt): Patch extension path.
[arguments]: Add 'patch-extension-path phase.
Change-Id: Ifbbd0adebcf82a36f674ab3fded3db5ba04b98b0
---
gnu/packages/guile-xyz.scm | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 28a94dc83a..12796749ec 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -1658,7 +1658,18 @@ (define-public guile-mqtt
(build-system gnu-build-system)
(arguments
(list
- #:make-flags #~(list "GUILE_AUTO_COMPILE=0")))
+ #:make-flags
+ #~(list "GUILE_AUTO_COMPILE=0")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-extension-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "module/ffi/mosquitto.scm"
+ (("list #f \"libmosquitto\"")
+ (string-append
+ "list #f \""
+ (search-input-file inputs "/lib/libmosquitto.so")
+ "\""))))))))
(native-inputs (list guile-3.0 pkg-config))
(inputs (list mosquitto))
(home-page "https://github.com/mdjurfeldt/guile-mqtt")
base-commit: 295a35ba20257e965c4eba8488de99fce7bf027f
--
2.49.0
Reply sent
to
Z572 <zhengjunjie <at> iscas.ac.cn>
:
You have taken responsibility.
(Thu, 08 May 2025 05:38:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Evgeny Pisemsky <mail <at> pisemsky.site>
:
bug acknowledged by developer.
(Thu, 08 May 2025 05:38:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 78301-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Evgeny Pisemsky <mail <at> pisemsky.site> writes:
> * gnu/packages/guile-xyz.scm (guile-mqtt): Patch extension path.
> [arguments]: Add 'patch-extension-path phase.
>
> Change-Id: Ifbbd0adebcf82a36f674ab3fded3db5ba04b98b0
> ---
> gnu/packages/guile-xyz.scm | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
> index 28a94dc83a..12796749ec 100644
> --- a/gnu/packages/guile-xyz.scm
> +++ b/gnu/packages/guile-xyz.scm
> @@ -1658,7 +1658,18 @@ (define-public guile-mqtt
> (build-system gnu-build-system)
> (arguments
> (list
> - #:make-flags #~(list "GUILE_AUTO_COMPILE=0")))
> + #:make-flags
> + #~(list "GUILE_AUTO_COMPILE=0")
> + #:phases
> + #~(modify-phases %standard-phases
> + (add-after 'unpack 'patch-extension-path
> + (lambda* (#:key inputs #:allow-other-keys)
> + (substitute* "module/ffi/mosquitto.scm"
> + (("list #f \"libmosquitto\"")
> + (string-append
> + "list #f \""
> + (search-input-file inputs "/lib/libmosquitto.so")
> + "\""))))))))
> (native-inputs (list guile-3.0 pkg-config))
> (inputs (list mosquitto))
> (home-page "https://github.com/mdjurfeldt/guile-mqtt")
pushed, closing.
If you are interested, you can also try to adjust the package to compile
from the git repository.
>
> base-commit: 295a35ba20257e965c4eba8488de99fce7bf027f
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 7 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.