GNU bug report logs - #59725
[PATCH] gnu: paulxstretch: Fix paths

Previous Next

Package: guix-patches;

Reported by: Sughosha <Sughosha <at> proton.me>

Date: Wed, 30 Nov 2022 15:05:01 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 59725 in the body.
You can then email your comments to 59725 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#59725; Package guix-patches. (Wed, 30 Nov 2022 15:05:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sughosha <Sughosha <at> proton.me>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 30 Nov 2022 15:05:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Sughosha <Sughosha <at> proton.me>
To: "guix-patches <at> gnu.org" <guix-patches <at> gnu.org>
Subject: [PATCH] gnu: paulxstretch: Fix paths
Date: Wed, 30 Nov 2022 15:04:15 +0000
* gnu/packages/music.scm (paulxstretch): Fix paths.
[arguments]: Add phase fix-paths.
[inputs]: Add dconf and glib:bin.
---
 gnu/packages/music.scm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index b69ad2e517..eb15a9f825 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -2481,6 +2481,20 @@ (define-public paulxstretch
      (list #:tests? #f                            ;no test suite
            #:phases
            #~(modify-phases %standard-phases
+               (add-after 'unpack 'fix-paths
+                          (lambda _
+                            (substitute* "deps/juce/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CodeBlocks.h"
+                              (("/usr/include/freetype2")
+                               (string-append #$freetype "/include/freetype")))
+                            (substitute* "deps/juce/modules/juce_graphics/native/juce_linux_Fonts.cpp"
+                              (("/etc/fonts")
+                               (string-append #$fontconfig "/etc/fonts")))
+                            (substitute* "deps/juce/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp"
+                              (("/usr/bin/dconf")
+                               (string-append #$dconf "/bin/dconf"))
+                              (("/usr/bin/gsettings")
+                               (string-append (ungexp glib "bin")
+                                              "/bin/gsettings")))))
                (replace 'install
                  (lambda _
                    (let* ((bin (string-append #$output "/bin"))
@@ -2507,6 +2521,8 @@ (define-public paulxstretch
     (native-inputs (list pkg-config))
     (inputs (list alsa-lib
                   curl
+                  dconf
+                  `(,glib "bin")
                   fftwf
                   freetype
                   jack-1
-- 
2.38.1





Information forwarded to guix-patches <at> gnu.org:
bug#59725; Package guix-patches. (Thu, 05 Jan 2023 21:49:02 GMT) Full text and rfc822 format available.

Message #8 received at 59725 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Sughosha <Sughosha <at> proton.me>
Cc: 59725 <at> debbugs.gnu.org
Subject: Re: bug#59725: [PATCH] gnu: paulxstretch: Fix paths
Date: Thu, 05 Jan 2023 22:48:25 +0100
Hi Sughosha,

Apologies for the delay!

Sughosha <Sughosha <at> proton.me> skribis:

> * gnu/packages/music.scm (paulxstretch): Fix paths.
> [arguments]: Add phase fix-paths.
> [inputs]: Add dconf and glib:bin.

That’s a welcome fix.

>             #~(modify-phases %standard-phases
> +               (add-after 'unpack 'fix-paths
> +                          (lambda _
> +                            (substitute* "deps/juce/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CodeBlocks.h"
> +                              (("/usr/include/freetype2")
> +                               (string-append #$freetype "/include/freetype")))
> +                            (substitute* "deps/juce/modules/juce_graphics/native/juce_linux_Fonts.cpp"
> +                              (("/etc/fonts")
> +                               (string-append #$fontconfig "/etc/fonts")))
> +                            (substitute* "deps/juce/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp"
> +                              (("/usr/bin/dconf")
> +                               (string-append #$dconf "/bin/dconf"))
> +                              (("/usr/bin/gsettings")
> +                               (string-append (ungexp glib "bin")
> +                                              "/bin/gsettings")))))

Could you avoid direct references to packages like #$freetype and
instead use ‘search-input-file’ and ‘search-input-directory’?

  (search-input-directory inputs "/etc/fonts")
  (search-input-file inputs "/bin/gsettings")
  …

There are examples in the repo on how to use them.

Could you send a v2 of the patch to 59725 <at> debbugs.gnu.org?

Thanks in advance,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#59725; Package guix-patches. (Fri, 06 Jan 2023 13:28:01 GMT) Full text and rfc822 format available.

Message #11 received at 59725 <at> debbugs.gnu.org (full text, mbox):

From: Sughosha <Sughosha <at> proton.me>
To: "59725 <at> debbugs.gnu.org" <59725 <at> debbugs.gnu.org>
Subject: [PATCH v2] gnu: paulxstretch: Fix paths.
Date: Fri, 06 Jan 2023 13:27:07 +0000
This method seems more precise, since if the file or directory does not exist, build fails.

* gnu/packages/music.scm (paulxstretch): Fix paths.
  [arguments]: Add fix-paths phase.
  [inputs]: Add dconf and glib:bin.
---
 gnu/packages/music.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 5be767a138..bdd856396d 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -2481,6 +2481,23 @@ (define-public paulxstretch
      (list #:tests? #f                            ;no test suite
            #:phases
            #~(modify-phases %standard-phases
+               (add-after 'unpack 'fix-paths
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   (substitute*
+                    "deps/juce/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CodeBlocks.h"
+                     (("/usr/include/freetype2")
+                      (search-input-directory inputs "/include/freetype2")))
+                   (substitute*
+                    "deps/juce/modules/juce_graphics/native/juce_linux_Fonts.cpp"
+                     (("/etc/fonts")
+                      (search-input-directory inputs "/etc/fonts")))
+                   (substitute*
+                    "deps/juce/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp"
+                     (("/usr/bin/dconf")
+                      (search-input-file inputs "/bin/dconf"))
+                     (("/usr/bin/gsettings")
+                      (search-input-file inputs "/bin/gsettings")))))
+                    
                (replace 'install
                  (lambda _
                    (let* ((bin (string-append #$output "/bin"))
@@ -2507,8 +2524,11 @@ (define-public paulxstretch
     (native-inputs (list pkg-config))
     (inputs (list alsa-lib
                   curl
+                  dconf
                   fftwf
+                  fontconfig
                   freetype
+                  `(,glib "bin")
                   jack-1
                   libx11
                   libxcursor
-- 
2.38.1





Information forwarded to guix-patches <at> gnu.org:
bug#59725; Package guix-patches. (Tue, 31 Jan 2023 05:52:02 GMT) Full text and rfc822 format available.

Message #14 received at 59725 <at> debbugs.gnu.org (full text, mbox):

From: 宋文武 <iyzsong <at> envs.net>
To: Sughosha <Sughosha <at> proton.me>
Cc: "59725 <at> debbugs.gnu.org" <59725 <at> debbugs.gnu.org>
Subject: Re: bug#59725: [PATCH] gnu: paulxstretch: Fix paths
Date: Tue, 31 Jan 2023 13:51:05 +0800
Sughosha <Sughosha <at> proton.me> writes:

> This method seems more precise, since if the file or directory does not exist, build fails.
>
> * gnu/packages/music.scm (paulxstretch): Fix paths.
>   [arguments]: Add fix-paths phase.
>   [inputs]: Add dconf and glib:bin.

Hello, paulxstretch will "Segmentation fault" with or without this
patch.  I think that's due to "DynamicLibrary" usages in juce, also it's
better to package juce standalone to get rid of the bundled one from
paulxstretch.




Information forwarded to guix-patches <at> gnu.org:
bug#59725; Package guix-patches. (Mon, 06 Feb 2023 22:51:02 GMT) Full text and rfc822 format available.

Message #17 received at 59725 <at> debbugs.gnu.org (full text, mbox):

From: Sughosha <Sughosha <at> proton.me>
To: "59725 <at> debbugs.gnu.org" <59725 <at> debbugs.gnu.org>
Cc: 宋文武 <iyzsong <at> envs.net>
Subject: Re: bug#59725: [PATCH] gnu: paulxstretch: Fix paths
Date: Mon, 06 Feb 2023 22:49:49 +0000
宋文武 <iyzsong <at> envs.net> wrote:

> Hello, paulxstretch will "Segmentation fault" with or without this
> patch. I think that's due to "DynamicLibrary" usages in juce, also it's
> better to package juce standalone to get rid of the bundled one from
> paulxstretch.

I don't know why paulxstretch gives "Segmentation fault" error. If I build
it locally (not as a guix package) inside a guix development shell, I don't
get this error. But anyways, even though the executable binary fails to
start, at least the vst plugin works well.




Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Tue, 21 Mar 2023 13:41:02 GMT) Full text and rfc822 format available.

Notification sent to Sughosha <Sughosha <at> proton.me>:
bug acknowledged by developer. (Tue, 21 Mar 2023 13:41:02 GMT) Full text and rfc822 format available.

Message #22 received at 59725-done <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Sughosha <Sughosha <at> proton.me>
Cc: "59725 <at> debbugs.gnu.org" <59725-done <at> debbugs.gnu.org>
Subject: Re: bug#59725: [PATCH] gnu: paulxstretch: Fix paths
Date: Tue, 21 Mar 2023 09:40:21 -0400
Hi,

Sughosha <Sughosha <at> proton.me> writes:

> This method seems more precise, since if the file or directory does not exist, build fails.

It also allows Guix users to rewrite package inputs, contrary to the
previous approach which would have hard-coded the references to the
package variables in a definitive way.

> * gnu/packages/music.scm (paulxstretch): Fix paths.
>   [arguments]: Add fix-paths phase.
>   [inputs]: Add dconf and glib:bin.

I've modified the commit message like so:

--8<---------------cut here---------------start------------->8---
gnu: paulxstretch: Patch paths.

* gnu/packages/music.scm (paulxstretch) [arguments]: Add patch-paths phase.
[inputs]: Add dconf, fontconfig and glib:bin.
--8<---------------cut here---------------end--------------->8---

Capitalizing the sentence following the ':', removing the hanging indent
in the GNU Changelog commit message, and adding the missing fontconfig.

> ---
>  gnu/packages/music.scm | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
>
> diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
> index 5be767a138..bdd856396d 100644
> --- a/gnu/packages/music.scm
> +++ b/gnu/packages/music.scm
> @@ -2481,6 +2481,23 @@ (define-public paulxstretch
>       (list #:tests? #f                            ;no test suite
>             #:phases
>             #~(modify-phases %standard-phases
> +               (add-after 'unpack 'fix-paths
> +                 (lambda* (#:key inputs #:allow-other-keys)
> +                   (substitute*
> +                    "deps/juce/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CodeBlocks.h"
> +                     (("/usr/include/freetype2")
> +                      (search-input-directory inputs "/include/freetype2")))
> +                   (substitute*
> +                    "deps/juce/modules/juce_graphics/native/juce_linux_Fonts.cpp"
> +                     (("/etc/fonts")
> +                      (search-input-directory inputs "/etc/fonts")))
> +                   (substitute*
> +                    "deps/juce/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp"
> +                     (("/usr/bin/dconf")
> +                      (search-input-file inputs "/bin/dconf"))
> +                     (("/usr/bin/gsettings")
> +                      (search-input-file inputs "/bin/gsettings")))))
> +                    
>                 (replace 'install
>                   (lambda _
>                     (let* ((bin (string-append #$output "/bin"))
> @@ -2507,8 +2524,11 @@ (define-public paulxstretch
>      (native-inputs (list pkg-config))
>      (inputs (list alsa-lib
>                    curl
> +                  dconf
>                    fftwf
> +                  fontconfig
>                    freetype
> +                  `(,glib "bin")
>                    jack-1
>                    libx11
>                    libxcursor

Applied, after breaking some long lines to fit under 80 chars.

As others reported, there is still the segfault when running the binary,
but at least this probably brings us closer to something that fully works.

Let's open other issues for the remaining problems found.

-- 
Thanks,
Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 19 Apr 2023 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 7 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.