unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Vinicius Monego <monego@posteo.net>
To: Fulbert <fulbert@bluewin.ch>, 50433@debbugs.gnu.org
Subject: bug#50433: shotcut 21.06.29 missing bin files
Date: Wed, 17 Nov 2021 02:43:32 +0000	[thread overview]
Message-ID: <4d00ef7f7a5757b241885f9f728b832aeabf58ea.camel@posteo.net> (raw)
In-Reply-To: <38e80545-027e-f7d3-a544-7931f2a4ebd9@bluewin.ch>

[-- Attachment #1: Type: text/plain, Size: 1849 bytes --]

Em seg, 2021-09-06 às 18:39 +0200, Fulbert escreveu:
> Hello,
> 
> shotcut 21.06.29 (guix ce65f2b) appears to have missing bin files.
> When 
> trying to export a video, the status of the task is "failed" inside
> the 
> GUI, and below is the debug message on the terminal.
> 
> [Debug  ] <MeltJob::start> 
> "/gnu/store/qz8nr42ax7k3v0cysmh6afhmy93vvj82-shotcut-
> 21.06.29/bin/melt-7 
> -verbose -progress2 -abort xml:%2Ftmp%2Fshotcut-xNVrrX.mlt"
> [Info   ] <AbstractJob::onFinished> job failed with 127
> 
> And here is the content of the bin directory :
> 
> $ ls -la $(dirname $(realpath $(which shotcut)))
> total 3248
> dr-xr-xr-x 2 root root    4096  1 janv.  1970 .
> dr-xr-xr-x 4 root root    4096  1 janv.  1970 ..
> -r-xr-xr-x 2 root root    1840  1 janv.  1970 shotcut
> -r-xr-xr-x 2 root root    1401  1 janv.  1970 .shotcut-real
> -r-xr-xr-x 2 root root 3308600  1 janv.  1970 ..shotcut-real-real
> 
> 
Hello,

Thanks for the report and sorry for the late response, I only found
this issue today.

I had a look at the Shotcut source code and it does seem to copy files
from other projects to its bin directory [1] and read the melt-7
executable from a variable called "shotcutPath" [2].

I am attaching a tested patch that symlinks these executables to the
shotcut bin folder. It was based on the update to 21.10.31 at 51898 but
should work in the current version.

I also removed other variables in the 'wrap-executable phase that don't
seem to be used. MLT_PREFIX is only read in Darwin and PATH was set
only for ffmpeg, but in the patch ffmpeg is symlinked instead.

[1]
https://github.com/mltframework/shotcut/blob/af9f47882d64eb15105559e0729bc7b1e337a9bf/scripts/build-shotcut.sh#L1874

[2]
https://github.com/mltframework/shotcut/blob/ef7830846d03fb3557e8780057608cd9f1c8bd77/src/jobs/meltjob.cpp#L97

[-- Attachment #2: 0001-gnu-shotcut-Find-ffmpeg-and-mlt-at-runtime.patch --]
[-- Type: text/x-patch, Size: 2281 bytes --]

From 19fac8591375a5fb99c40d546dacd519a0a438c2 Mon Sep 17 00:00:00 2001
From: Vinicius Monego <monego@posteo.net>
Date: Tue, 16 Nov 2021 22:33:14 -0300
Subject: [PATCH] gnu: shotcut: Find ffmpeg and mlt at runtime.

* gnu/packages/video.scm (shotcut)[arguments]<:#phases>: Symlink ffmpeg and
mlt binaries to the Shotcut bin folder in the 'wrap-executable phase.
---
 gnu/packages/video.scm | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 7145af58f1..2307583e8d 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -4813,16 +4813,23 @@ transitions, and effects and then export your film to many common formats.")
                     (frei0r (assoc-ref inputs "frei0r-plugins"))
                     (ffmpeg (assoc-ref inputs "ffmpeg"))
                     (jack (assoc-ref inputs "jack"))
+                    (mlt (assoc-ref inputs "mlt"))
                     (sdl2 (assoc-ref inputs "sdl2")))
+               ;; Shotcut looks for ffmpeg and melt executables in the shotcut
+               ;; directory.  Symlink them to be found at runtime.
+               (for-each (lambda (file)
+                           (symlink (string-append ffmpeg "/bin/" file)
+                                    (string-append out "/bin/" file)))
+                         '("ffmpeg" "ffplay" "ffprobe"))
+               (for-each (lambda (file)
+                           (symlink (string-append mlt "/bin/" file)
+                                    (string-append out "/bin/" file)))
+                         '("melt" "melt-7"))
                (wrap-program (string-append out "/bin/shotcut")
-                 `("PATH" ":" prefix
-                   ,(list (string-append ffmpeg "/bin")))
                  `("LD_LIBRARY_PATH" ":" prefix
                    ,(list (string-append jack "/lib" ":" sdl2 "/lib")))
                  `("FREI0R_PATH" ":" =
-                   (,(string-append frei0r "/lib/frei0r-1/")))
-                 `("MLT_PREFIX" ":" =
-                   (,(assoc-ref inputs "mlt"))))))))))
+                   (,(string-append frei0r "/lib/frei0r-1/"))))))))))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("python" ,python-wrapper)
-- 
2.30.2


  parent reply	other threads:[~2021-11-17  2:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-06 16:39 bug#50433: shotcut 21.06.29 missing bin files Fulbert
2021-09-07  2:06 ` Sarah Morgensen
2021-09-07 12:27   ` Fulbert
2021-11-10  2:07 ` Leo Famulari
2021-11-17  2:43 ` Vinicius Monego [this message]
2021-12-27  0:10 ` Vinicius Monego

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4d00ef7f7a5757b241885f9f728b832aeabf58ea.camel@posteo.net \
    --to=monego@posteo.net \
    --cc=50433@debbugs.gnu.org \
    --cc=fulbert@bluewin.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).