Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 775710 - media-video/handbrake-1.4.2-r1: makefile race: cp: cannot create regular file './internal_defaults.json': File exists
Summary: media-video/handbrake-1.4.2-r1: makefile race: cp: cannot create regular file...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: James Beddek
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2021-03-13 03:03 UTC by HougeLangley
Modified: 2022-01-16 02:23 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
handbrakebuild log (handbrakebuild.log,88.66 KB, text/x-log)
2021-03-13 03:03 UTC, HougeLangley
Details
Patch file for handbrake "file exists" compilation error (handbrake-1.3.3-file-exists.patch,566 bytes, patch)
2021-09-26 14:12 UTC, Dan F
Details | Diff
Patch for handbrake-1.3.3-r2 ebuild to use the "file exists" patch (handbrake-1.3.3-r2.ebuild.patch,340 bytes, patch)
2021-09-26 14:14 UTC, Dan F
Details | Diff
Patch for handbrake-1.4.2-r1 ebuild to use the "file exists" patch (handbrake-1.4.2-r1.ebuild.patch,340 bytes, patch)
2021-10-31 14:31 UTC, Dan F
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description HougeLangley 2021-03-13 03:03:05 UTC
Created attachment 691098 [details]
handbrakebuild log

/usr/bin/msgfmt --xml --template fr.handbrake.ghb.metainfo.xml.in -d /var/tmp/portage/media-video/handbrake-1.3.3-r1/work/HandBrake-1.3.3/build/../gtk/po -o fr.handbrake.ghb.metainfo.xml
cp /var/tmp/portage/media-video/handbrake-1.3.3-r1/work/HandBrake-1.3.3/build/../gtk/src/internal_defaults.json .
cp /var/tmp/portage/media-video/handbrake-1.3.3-r1/work/HandBrake-1.3.3/build/../gtk/src/internal_defaults.json .
cp: cannot create regular file './internal_defaults.json': File exists
make[3]: *** [Makefile:1033: data_res.c] Error 1
make[3]: *** Waiting for unfinished jobs....
glib-compile-resources --generate --target=data_res.h --c-name ghb_data --manual-register /var/tmp/portage/media-video/handbrake-1.3.3-r1/work/HandBrake-1.3.3/build/../gtk/src/data_res.gresource.xml
mv -f .deps/titledict.Tpo .deps/titledict.Po
mv -f .deps/marshalers.Tpo .deps/marshalers.Po
mv -f .deps/appcast.Tpo .deps/appcast.Po
mv -f .deps/jobdict.Tpo .deps/jobdict.Po
mv -f .deps/values.Tpo .deps/values.Po
mv -f .deps/plist.Tpo .deps/plist.Po
mv -f .deps/icons.Tpo .deps/icons.Po
mv -f .deps/ghbcompat.Tpo .deps/ghbcompat.Po
mv -f .deps/ghb-dvd.Tpo .deps/ghb-dvd.Po
mv -f .deps/renderer_button.Tpo .deps/renderer_button.Po
mv -f .deps/chapters.Tpo .deps/chapters.Po
mv -f .deps/videohandler.Tpo .deps/videohandler.Po
mv -f .deps/settings.Tpo .deps/settings.Po
mv -f .deps/preview.Tpo .deps/preview.Po
mv -f .deps/subtitlehandler.Tpo .deps/subtitlehandler.Po
mv -f .deps/presets.Tpo .deps/presets.Po
mv -f .deps/audiohandler.Tpo .deps/audiohandler.Po
mv -f .deps/queuehandler.Tpo .deps/queuehandler.Po
mv -f .deps/hb-backend.Tpo .deps/hb-backend.Po
mv -f .deps/callbacks.Tpo .deps/callbacks.Po
make[3]: Leaving directory '/var/tmp/portage/media-video/handbrake-1.3.3-r1/work/HandBrake-1.3.3/build/gtk/src'
make[2]: *** [Makefile:449: all-recursive] Error 1
make[2]: Leaving directory '/var/tmp/portage/media-video/handbrake-1.3.3-r1/work/HandBrake-1.3.3/build/gtk'
make[1]: *** [Makefile:381: all] Error 2
make[1]: Leaving directory '/var/tmp/portage/media-video/handbrake-1.3.3-r1/work/HandBrake-1.3.3/build/gtk'
make: *** [../gtk/module.rules:31: gtk.build] Error 2
make: Leaving directory '/var/tmp/portage/media-video/handbrake-1.3.3-r1/work/HandBrake-1.3.3/build'
 * ERROR: media-video/handbrake-1.3.3-r1::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=media-video/handbrake-1.3.3-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=media-video/handbrake-1.3.3-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/media-video/handbrake-1.3.3-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-video/handbrake-1.3.3-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/media-video/handbrake-1.3.3-r1/work/HandBrake-1.3.3'
 * S: '/var/tmp/portage/media-video/handbrake-1.3.3-r1/work/HandBrake-1.3.3'

 * Messages for package media-video/handbrake-1.3.3-r1:

 * ERROR: media-video/handbrake-1.3.3-r1::gentoo failed (compile phase):
 *   emake failed
Comment 1 Dan F 2021-09-26 14:09:15 UTC
I got the same with media-video/handbrake-1.3.3-r2. I patched it and the build works for me. Will attach the patch and the ebuild.
Comment 2 Dan F 2021-09-26 14:12:53 UTC
Created attachment 741468 [details, diff]
Patch file for handbrake "file exists" compilation error
Comment 3 Dan F 2021-09-26 14:14:31 UTC
Created attachment 741471 [details, diff]
Patch for handbrake-1.3.3-r2 ebuild to use the "file exists" patch

This should work with handbrake-1.3.3-r1 as well, but I only tested with 1.3.3-r2.
Comment 4 James Beddek 2021-10-24 08:49:02 UTC
Could you please retest with 1.4.2?
Comment 5 Alessandro Calorì 2021-10-25 05:12:28 UTC
I've just experienced the same issue with handbrake-1.4.2-r1 ebuild. Yesterday I upgraded to handbrake-1.4.2 and it just emerged so I guess it is a regression.
Comment 6 James Beddek 2021-10-25 05:14:16 UTC
I don't think this is a regression, more likely a makefile race as cp doesn't usually fail when a file already exists.
Comment 7 James Beddek 2021-10-25 05:15:08 UTC
If you emerge a few times, I would bet that it succeeds at least once
Comment 8 Alessandro Calorì 2021-10-25 05:18:21 UTC
(In reply to James Beddek from comment #6)
> I don't think this is a regression, more likely a makefile race as cp
> doesn't usually fail when a file already exists.

I stand corrected, you're right: I've just tried emerging it again and it succeeded.
Comment 9 Dan F 2021-10-31 14:31:51 UTC
Created attachment 747714 [details, diff]
Patch for handbrake-1.4.2-r1 ebuild to use the "file exists" patch

Using the same previously attached "files/*file-exists.patch" this fixes the issue on 1.4.2-r1 and allows for the package to compile successfully.
Comment 10 Alessandro Calorì 2021-12-31 10:55:48 UTC
The issue triggered again for version 1.4.2-r2. Using MAKEOPTS=-j1 temporarily fixes the build issue.
Comment 11 Larry the Git Cow gentoo-dev 2022-01-16 02:23:42 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f0ed76732e0496fa2da40ce9b798ea4734b617e

commit 1f0ed76732e0496fa2da40ce9b798ea4734b617e
Author:     James Beddek <telans@posteo.de>
AuthorDate: 2022-01-11 09:31:31 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-01-16 02:23:20 +0000

    media-video/handbrake: add 1.5.1
    
    Closes: https://bugs.gentoo.org/775710
    Signed-off-by: James Beddek <telans@posteo.de>
    Signed-off-by: Sam James <sam@gentoo.org>

 media-video/handbrake/Manifest               |   1 +
 media-video/handbrake/handbrake-1.5.1.ebuild | 160 +++++++++++++++++++++++++++
 2 files changed, 161 insertions(+)