unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#50433: shotcut 21.06.29 missing bin files
@ 2021-09-06 16:39 Fulbert
  2021-09-07  2:06 ` Sarah Morgensen
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Fulbert @ 2021-09-06 16:39 UTC (permalink / raw)
  To: 50433

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





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#50433: shotcut 21.06.29 missing bin files
  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
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Sarah Morgensen @ 2021-09-07  2:06 UTC (permalink / raw)
  To: Fulbert; +Cc: 50433

Hello,

Thanks for your report.

Fulbert <fulbert@bluewin.ch> writes:

> 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

I compared this to the release binaries and there really is just the one
'shotcut' executable.  I think you're correct that the '127' error is
due to it not finding an executable, but I think that's happening
because shotcut got double-wrapped (or wrapped incorrectly).

Unfortunately I'm not knowledgeable with qt-wrapping so I can't help any
further, but I hope that helps!

--
Sarah




^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#50433: shotcut 21.06.29 missing bin files
  2021-09-07  2:06 ` Sarah Morgensen
@ 2021-09-07 12:27   ` Fulbert
  0 siblings, 0 replies; 6+ messages in thread
From: Fulbert @ 2021-09-07 12:27 UTC (permalink / raw)
  To: 50433; +Cc: Sarah Morgensen

Le Mon, Sep 06, 2021 at 07:06:31PM -0700, Sarah Morgensen a écrit :
> Hello,
> 
> Thanks for your report.

Hello and thanks to you,

> I compared this to the release binaries and there really is just the one
> 'shotcut' executable.  I think you're correct that the '127' error is
> due to it not finding an executable, but I think that's happening
> because shotcut got double-wrapped (or wrapped incorrectly).
> 
> Unfortunately I'm not knowledgeable with qt-wrapping so I can't help any
> further, but I hope that helps!

So for a little recap, taking your message into account :

* The first wrapper 'bin/shotcut' does have some 'export' including :
  export MLT_PREFIX="/gnu/store/<>-mlt-7.0.1"
* The second wrapper (called by the first) misses this export and 3
  others (No idea if this "intermediate" wrapper causes any problem.
  Looks harmless to me… which doesnt mean much ^^).
* 'shotcut' depends on 'mlt' and there sits the 'melt-7' binary :
  /gnu/store/<>-mlt-7.0.1/bin/melt-7
* but when using the export function from within shotcut GUI, the
  program calls for 'mlt-7' with the absolute path inside shotcut
  directory : /gnu/store/<>-shotcut-21.06.29/bin/melt-7, where it fails.

regards,
Fulbert




^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#50433: shotcut 21.06.29 missing bin files
  2021-09-06 16:39 bug#50433: shotcut 21.06.29 missing bin files Fulbert
  2021-09-07  2:06 ` Sarah Morgensen
@ 2021-11-10  2:07 ` Leo Famulari
  2021-11-17  2:43 ` Vinicius Monego
  2021-12-27  0:10 ` Vinicius Monego
  3 siblings, 0 replies; 6+ messages in thread
From: Leo Famulari @ 2021-11-10  2:07 UTC (permalink / raw)
  To: Fulbert; +Cc: 50433

On Mon, Sep 06, 2021 at 06:39:16PM +0200, Fulbert wrote:
> 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.

Thanks for the report. I see the a similar issue but when Shotcut tries
to use FFmpeg: it looks for FFmpeg in the shotcut store directory.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#50433: shotcut 21.06.29 missing bin files
  2021-09-06 16:39 bug#50433: shotcut 21.06.29 missing bin files Fulbert
  2021-09-07  2:06 ` Sarah Morgensen
  2021-11-10  2:07 ` Leo Famulari
@ 2021-11-17  2:43 ` Vinicius Monego
  2021-12-27  0:10 ` Vinicius Monego
  3 siblings, 0 replies; 6+ messages in thread
From: Vinicius Monego @ 2021-11-17  2:43 UTC (permalink / raw)
  To: Fulbert, 50433

[-- 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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* bug#50433: shotcut 21.06.29 missing bin files
  2021-09-06 16:39 bug#50433: shotcut 21.06.29 missing bin files Fulbert
                   ` (2 preceding siblings ...)
  2021-11-17  2:43 ` Vinicius Monego
@ 2021-12-27  0:10 ` Vinicius Monego
  3 siblings, 0 replies; 6+ messages in thread
From: Vinicius Monego @ 2021-12-27  0:10 UTC (permalink / raw)
  To: 50433-done

Fixed in bc74c191df789ff200da6f81c3cf599eae39ca8e. Closing.





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-12-27  0:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2021-12-27  0:10 ` Vinicius Monego

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).