Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 936251 - media-libs/mlt-7.24.0 fails to build in prepare phase
Summary: media-libs/mlt-7.24.0 fails to build in prepare phase
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-18 11:32 UTC by Mohamed Ibrahim
Modified: 2024-07-19 04:54 UTC (History)
2 users (show)

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


Attachments
The output of each of the emerge command is enclosed between BEGIN: RESPECTIVE COMMAND ,file contents, END: RESPECTIVE COMMAND (emerge-output.txt,10.11 KB, text/plain)
2024-07-18 11:32 UTC, Mohamed Ibrahim
Details
contents of /src/swig/ruby/build had changed so new patch generated named mlt-6.10.0-swig-underlinking.patch (mlt-6.10.0-swig-underlinking.patch,596 bytes, patch)
2024-07-18 14:55 UTC, Mohamed Ibrahim
Details | Diff
contents of /src/swig/lua/build had changed so i generated a new patch for it (mlt-6.22.1-no_lua_bdepend.patch,153 bytes, patch)
2024-07-18 14:56 UTC, Mohamed Ibrahim
Details | Diff
contents of CMakeLists.txt has changed so heres a new patch (mlt-7.0.1-cmake-symlink.patch,569 bytes, patch)
2024-07-18 14:58 UTC, Mohamed Ibrahim
Details | Diff
for the modified sed command that was used to update ./src/swig/python/build here is a new patch (mlt-7.24.0-python-build-file.patch,629 bytes, patch)
2024-07-18 15:09 UTC, Mohamed Ibrahim
Details | Diff
here is the build.log you asked. my bad forgot to include in previous attachment (build.log.txt,1.75 KB, text/plain)
2024-07-18 17:17 UTC, Mohamed Ibrahim
Details
This is the original build log that got generated when I updated @world (original_build.log.txt,3.48 KB, text/plain)
2024-07-18 18:04 UTC, Mohamed Ibrahim
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mohamed Ibrahim 2024-07-18 11:32:51 UTC
Created attachment 897926 [details]
The output of each of the emerge command is enclosed between BEGIN: RESPECTIVE COMMAND ,file contents, END: RESPECTIVE COMMAND

When compiling media-libs/mlt-7.24.0, the build fails in the prepare phase. The error occurs during the sed command execution in the ebuild file. Additionally, the patches applied by the ebuild need to be updated to match the current source code.
Steps to Reproduce:

Attempt to emerge media-libs/mlt-7.24.0

Current Result:
The build fails with the following error:

* ERROR: media-libs/mlt-7.24.0::gentoo failed (prepare phase):
*   (no error message)
* 
* Call stack:
*     ebuild.sh, line 136:  Called src_prepare
*   environment, line 3003:  Called die
* The specific snippet of code:
*           sed -i "/mlt.so/s/ -lmlt++ /& ${CFLAGS} ${LDFLAGS} /" src/swig/python/build || die;

Expected Result:
The package should compile and install successfully.

Additional Information:

Upon inspecting the github source code. The contents of the src/swig/python/build file have changed, making the current sed command in the ebuild ineffective.
Attempting to modify the sed command to:

sed -i '/${CXX}/s/$/ ${CFLAGS} ${LDFLAGS}/' src/swig/python/build

still results in failure at the patching stage.
The patches applied by the ebuild are outdated and need to be updated to match the current source code structure.

Proposed Solution:

The ebuild file for media-libs/mlt needs to be rewritten to accommodate the changes in the src/swig/python/build file. The sed command should be updated to correctly modify the build file based on its current structure.
All patches included with the ebuild need to be reviewed and updated to apply cleanly to the current source code version.

System Information:

Gentoo version: [24]  default/linux/amd64/23.0/desktop/systemd (stable) *
Output of emerge --info '=media-libs/mlt-7.24.0::gentoo': included in emerge-output.txt
Complete build log: Located at '/var/tmp/portage/portage/media-libs/mlt-7.24.0/temp/build.log' : included in emerge-output.txt
Output of emerge -pqv '=media-libs/mlt-7.24.0::gentoo': included in emerge-output.txt

Action Items:

Update the ebuild file, particularly the sed command that modifies src/swig/python/build.
Review and update all patches included with the ebuild to ensure they apply cleanly to the current source code.
Test the updated ebuild and patches to ensure successful compilation.

Please review and update both the ebuild and associated patches to resolve this build failure. Let me know if you need any additional information or clarification.
Comment 1 Mohamed Ibrahim 2024-07-18 14:55:20 UTC
Created attachment 897930 [details, diff]
contents of /src/swig/ruby/build had changed so new patch generated named mlt-6.10.0-swig-underlinking.patch
Comment 2 Mohamed Ibrahim 2024-07-18 14:56:59 UTC
Created attachment 897931 [details, diff]
contents of /src/swig/lua/build had changed so i generated a new patch for it
Comment 3 Mohamed Ibrahim 2024-07-18 14:58:23 UTC
Created attachment 897932 [details, diff]
contents of CMakeLists.txt has changed so heres a new patch
Comment 4 Mohamed Ibrahim 2024-07-18 15:09:31 UTC
Created attachment 897933 [details, diff]
for the modified sed command that was used to update ./src/swig/python/build here is a new patch

with this patch there is no need for the command

sed -i "/mlt.so/s/ -lmlt++ /& ${CFLAGS} ${LDFLAGS} /" src/swig/python/build || die

in src_prepare() of media-libs/mlt/mlt-7.24.0.ebuild so it can be removed
Comment 5 Andreas Sturmlechner gentoo-dev 2024-07-18 15:55:19 UTC
Full build.log, please, always.

7.24 is stable for a month and no one else has filed such a bug.
Comment 6 Mohamed Ibrahim 2024-07-18 17:17:30 UTC
Created attachment 897934 [details]
here is the build.log you asked. my bad forgot to include in previous attachment

I have included build.log in new attachment my bad forgot to attach it
Comment 7 Mohamed Ibrahim 2024-07-18 17:22:53 UTC
The software compiled successfully two days ago. After uninstalling and then reinstalling some components, I encountered this issue. It appears that changes were made to the build file or other related elements without incrementing the version number. This has resulted in unexpected behavior during compilation.
Comment 8 Mohamed Ibrahim 2024-07-18 17:29:31 UTC
Upon investigation, I discovered that the .gitignore file in the mlt-7.24.0 GitHub repository appears to be incorrectly configured, as it includes build files. This misconfiguration may be causing version control issues, potentially allowing changes to build files to go untracked. This could explain why changes seem to have been made without a corresponding version number update, leading to unexpected compilation behavior.
Comment 9 Mohamed Ibrahim 2024-07-18 18:04:25 UTC
Created attachment 897935 [details]
This is the original build log that got generated when I updated @world

The previous build.log was a replication attempt by me. Apparently the original build.log got saved as file named sudo in my machine instead of appending to initial attachment. leading to not being included in the file.
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-07-18 20:28:10 UTC
> [32m * [39;49;00mRepository: x-portage

What is x-portage? Also, that sed error shouldn't happen if a file is *missing*.
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-07-18 20:38:41 UTC
(In reply to Mohamed Ibrahim from comment #7)
> The software compiled successfully two days ago. After uninstalling and then
> reinstalling some components, I encountered this issue. It appears that
> changes were made to the build file or other related elements without
> incrementing the version number. This has resulted in unexpected behavior
> during compilation.

The ebuild hasn't changed in that time. The error you're getting implies the sed expression is invalid. Have you replaced your sed with busybox sed or something like that?
Comment 12 Alfred Wingate 2024-07-18 22:35:51 UTC
The sed expression is broken by "-L/usr/local/lib" in LDFLAGS. This is a really weird thing to have in LDFLAGS so the solution naturally would be not do that.

But otherwise the sed expression could modified to handle unusual options like this by replacing / with | like as below.

+		sed -i "/mlt.so/s| -lmlt++ |& ${CFLAGS} ${LDFLAGS} |" src/swig/python/build || die
-		sed -i "/mlt.so/s/ -lmlt++ /& ${CFLAGS} ${LDFLAGS} /" src/swig/python/build || die
Comment 13 Mohamed Ibrahim 2024-07-19 04:44:52 UTC
x-portage is my local overlay. I had copied the ebuild, modified and made it to build in my system. I removed the -L/usr/local/lib from LDFLAGS and things compile. the default patches also get applied.