Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 878367 - media-libs/x265-9999 test-ns.patch fails to apply
Summary: media-libs/x265-9999 test-ns.patch fails to apply
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-26 14:28 UTC by jospezial
Modified: 2023-12-21 09:57 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jospezial 2022-10-26 14:28:33 UTC
* Package:    media-libs/x265-9999:0/204
 * Repository: gentoo
 * Maintainer: media-video@gentoo.org
 * USE:        10bit 12bit abi_x86_32 abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
 * FEATURES:   ccache network-sandbox preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
 * Repository id: multicoreware_x265_git.git
 * To override fetched repository properties, use:
 *   EGIT_OVERRIDE_REPO_MULTICOREWARE_X265_GIT
 *   EGIT_OVERRIDE_BRANCH_MULTICOREWARE_X265_GIT
 *   EGIT_OVERRIDE_COMMIT_MULTICOREWARE_X265_GIT
 *   EGIT_OVERRIDE_COMMIT_DATE_MULTICOREWARE_X265_GIT
 * 
 * Fetching https://bitbucket.org/multicoreware/x265_git/ ...
git fetch https://bitbucket.org/multicoreware/x265_git/ +HEAD:refs/git-r3/HEAD
remote: Enumerating objects: 189, done.
remote: Counting objects: 100% (189/189), done.
remote: Compressing objects: 100% (37/37), done.
remote: Total 148 (delta 128), reused 129 (delta 111), pack-reused 0
Receiving objects: 100% (148/148), 33.52 KiB | 3.05 MiB/s, done.
Resolving deltas: 100% (128/128), completed with 40 local objects.
From https://bitbucket.org/multicoreware/x265_git
   0b75c44c1..8584bc7bd             -> refs/git-r3/HEAD
git symbolic-ref refs/git-r3/media-libs/x265/0/__main__ refs/git-r3/HEAD
 * Checking out https://bitbucket.org/multicoreware/x265_git/ to /var/tmp/portage/media-libs/x265-9999/work/x265-9999 ...
git checkout --quiet refs/git-r3/HEAD
GIT update -->
   repository:               https://bitbucket.org/multicoreware/x265_git/
   updating from commit:     0b75c44c10e605fe9e9ebed58f04a46271131827
   to commit:                8584bc7bd99262b8bd926476c866840fe0d9428a
 doc/reST/cli.rst                     |   10 +++
 source/CMakeLists.txt                |    2 +-
 source/common/CMakeLists.txt         |    3 +-
 source/common/common.h               |    6 ++
 source/common/frame.cpp              |   67 ++++++++++++++++-
 source/common/frame.h                |   16 ++++
 source/common/lowres.cpp             |    4 +
 source/common/lowres.h               |    3 +
 source/common/mv.h                   |    2 +
 source/common/param.cpp              |   22 +++++-
 source/common/piclist.cpp            |  101 +++++++++++++++++++++++++
 source/common/piclist.h              |    7 ++
 source/common/picyuv.cpp             |   52 +++++++++++++
 source/common/picyuv.h               |    2 +
 source/common/pixel.cpp              |   19 +++++
 source/common/primitives.h           |    4 +
 source/common/slice.h                |    1 +
 source/common/temporalfilter.cpp     | 1017 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 source/common/temporalfilter.h       |  188 ++++++++++++++++++++++++++++++++++++++++++++++
 source/common/x86/asm-primitives.cpp |   14 ++++
 source/common/x86/mc-a2.asm          |  256 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 source/common/x86/mc.h               |   11 +++
 source/encoder/dpb.cpp               |   10 ++-
 source/encoder/encoder.cpp           |  262 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 source/encoder/encoder.h             |    5 ++
 source/encoder/frameencoder.cpp      |   44 +++++++++++
 source/encoder/frameencoder.h        |    5 ++
 source/encoder/motion.cpp            |   25 +++++++
 source/encoder/motion.h              |    2 +-
 source/encoder/slicetype.cpp         |  108 ++++++++++++++++++++++++---
 source/encoder/slicetype.h           |    1 +
 source/test/pixelharness.cpp         |   41 ++++++++++
 source/test/pixelharness.h           |    1 +
 source/x265.h                        |    8 ++
 source/x265cli.cpp                   |    2 +
 source/x265cli.h                     |    4 +
 36 files changed, 2303 insertions(+), 22 deletions(-)
>>> Source unpacked in /var/tmp/portage/media-libs/x265-9999/work
>>> Preparing source in /var/tmp/portage/media-libs/x265-9999/work/x265-9999/source ...
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/media-libs/x265-9999/work/x265-9999/source"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/media-libs/x265-9999/work/x265-9999_build"
 * Applying x265-9999-arm.patch ...
 [ ok ]
 * Applying x265-9999-ppc64.patch ...
 [ ok ]
 * Applying tests.patch ...
 [ ok ]
 * Applying test-ns.patch ...
patching file common/param.h
patching file encoder/api.cpp
Hunk #2 succeeded at 215 (offset -1 lines).
Hunk #3 succeeded at 320 (offset -1 lines).
Hunk #4 succeeded at 603 (offset -1 lines).
Hunk #5 succeeded at 644 (offset 7 lines).
Hunk #6 succeeded at 658 (offset 7 lines).
Hunk #7 succeeded at 879 (offset 7 lines).
patching file encoder/encoder.cpp
Hunk #1 succeeded at 221 (offset 35 lines).
Hunk #2 succeeded at 801 (offset 45 lines).
Hunk #3 succeeded at 905 (offset 45 lines).
Hunk #4 FAILED at 1592.
Hunk #5 succeeded at 2211 (offset 243 lines).
Hunk #6 succeeded at 2299 (offset 253 lines).
Hunk #7 succeeded at 2314 (offset 253 lines).
Hunk #8 succeeded at 2481 (offset 282 lines).
Hunk #9 succeeded at 2492 (offset 282 lines).
Hunk #10 succeeded at 2635 (offset 282 lines).
Hunk #11 succeeded at 4725 (offset 461 lines).
Hunk #12 succeeded at 4761 (offset 461 lines).
Hunk #13 succeeded at 4805 (offset 471 lines).
Hunk #14 succeeded at 5058 (offset 471 lines).
Hunk #15 succeeded at 5095 (offset 471 lines).
Hunk #16 succeeded at 5136 (offset 481 lines).
Hunk #17 succeeded at 5738 (offset 481 lines).
Hunk #18 succeeded at 5752 (offset 481 lines).
Hunk #19 succeeded at 5859 (offset 481 lines).
Hunk #20 succeeded at 6103 (offset 503 lines).
1 out of 20 hunks FAILED -- saving rejects to file encoder/encoder.cpp.rej
patching file common/param.cpp
 [ !! ]
 * ERROR: media-libs/x265-9999::gentoo failed (prepare phase):
 *   patch -p1  failed with /var/tmp/portage/media-libs/x265-9999/files/test-ns.patch
 * 
 * Call stack:
 *               ebuild.sh, line  122:  Called src_prepare
 *             environment, line 3206:  Called cmake_src_prepare
 *             environment, line 1289:  Called default_src_prepare
 *      phase-functions.sh, line  937:  Called __eapi6_src_prepare
 *             environment, line  238:  Called eapply '/var/tmp/portage/media-libs/x265-9999/files/x265-9999-arm.patch' '/var/tmp/portage/media-libs/x265-9999/files/x265-9999-ppc64.patch' '/var/tmp/portage/media-libs/x265-9999/files/tests.patch' '/var/tmp/portage/media-libs/x265-9999/files/test-ns.patch'
 *             environment, line 1445:  Called _eapply_patch '/var/tmp/portage/media-libs/x265-9999/files/test-ns.patch'
 *             environment, line 1383:  Called __helpers_die 'patch -p1  failed with /var/tmp/portage/media-libs/x265-9999/files/test-ns.patch'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *              die "$@"
Comment 1 jospezial 2022-11-12 20:28:09 UTC
emerge media-libs/x265-9999 succeeds without that patch.
Comment 2 Alexey Chernyak 2023-03-25 02:56:21 UTC
Still builds fine if this patch is removed.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-25 03:07:04 UTC
Patch was added by

commit 3c02fc3caa35538b36de5d96aa7de5ef804a404b
Author: Alexis Ballier <aballier@gentoo.org>
Date:   Fri Jun 5 16:30:05 2020 +0200

    media-libs/x265: restore previous behavior wrt asm. bump to 3.4.

    Fix tests properly.

    Package-Manager: Portage-2.3.100, Repoman-2.3.22
    Signed-off-by: Alexis Ballier <aballier@gentoo.org>
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-25 03:08:07 UTC
I'm not sure the right thing to do here is to drop the patch. It needs rebasing (and ideally upstreaming) instead. See also the comments in the ebuild about how the various bitdepth stuff is handled.

Do tests pass without the patch too?
Comment 5 Alexey Chernyak 2023-03-25 03:30:43 UTC
tests fail without patch:

[82/82] : && /usr/bin/x86_64-pc-linux-gnu-g++ -w -march=native -O2 -pipe -Wl,-O1,--as-needed    -rdynamic test/CMakeFiles/TestBench.dir/checkasm-a.asm.o test/CMakeFiles/TestBench.dir/testbench.cpp.o test/CMakeFiles/TestBench.dir/pixelharness.cpp.o test/CMakeFiles/TestBench.dir/mbdstharness.cpp.o test/CMakeFiles/TestBench.dir/ipfilterharness.cpp.o test/CMakeFiles/TestBench.dir/intrapredharness.cpp.o -o test/TestBench  libx265.a  -lpthread  -lrt  -ldl && :
FAILED: test/TestBench 
: && /usr/bin/x86_64-pc-linux-gnu-g++ -w -march=native -O2 -pipe -Wl,-O1,--as-needed    -rdynamic test/CMakeFiles/TestBench.dir/checkasm-a.asm.o test/CMakeFiles/TestBench.dir/testbench.cpp.o test/CMakeFiles/TestBench.dir/pixelharness.cpp.o test/CMakeFiles/TestBench.dir/mbdstharness.cpp.o test/CMakeFiles/TestBench.dir/ipfilterharness.cpp.o test/CMakeFiles/TestBench.dir/intrapredharness.cpp.o -o test/TestBench  libx265.a  -lpthread  -lrt  -ldl && :
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: libx265.a(encoder.cpp.o): in function `x265_12bit::Encoder::setAnalysisData(x265_analysis_data*, int, unsigned int)':
encoder.cpp:(.text+0xde6): undefined reference to `x265_alloc_analysis_data'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: libx265.a(encoder.cpp.o): in function `x265_12bit::Encoder::destroy()':
encoder.cpp:(.text+0x12ae): undefined reference to `x265_picture_free'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: encoder.cpp:(.text+0x12dc): undefined reference to `x265_picture_free'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: libx265.a(encoder.cpp.o): in function `x265_12bit::Encoder::create()':
encoder.cpp:(.text+0x6105): undefined reference to `x265_picture_alloc'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: encoder.cpp:(.text+0x6118): undefined reference to `x265_picture_init'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: libx265.a(encoder.cpp.o): in function `x265_12bit::Encoder::readAnalysisFile(x265_analysis_data*, int, x265_picture const*, int)':
encoder.cpp:(.text+0xb254): undefined reference to `x265_alloc_analysis_data'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: encoder.cpp:(.text+0xb9b1): undefined reference to `x265_free_analysis_data'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: encoder.cpp:(.text+0xbc5d): undefined reference to `x265_free_analysis_data'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: libx265.a(encoder.cpp.o): in function `x265_12bit::Encoder::readAnalysisFile(x265_analysis_data*, int, x265_picture const*, int, x265_12bit::cuLocation)':
encoder.cpp:(.text+0xd063): undefined reference to `x265_alloc_analysis_data'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: encoder.cpp:(.text+0xdc01): undefined reference to `x265_free_analysis_data'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: encoder.cpp:(.text+0xdefd): undefined reference to `x265_free_analysis_data'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: libx265.a(encoder.cpp.o): in function `x265_12bit::Encoder::readAnalysisFile(x265_analysis_data*, int, int)':
encoder.cpp:(.text+0xf4a9): undefined reference to `x265_alloc_analysis_data'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: encoder.cpp:(.text+0xf696): undefined reference to `x265_alloc_analysis_data'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: encoder.cpp:(.text+0xf6dc): undefined reference to `x265_free_analysis_data'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: encoder.cpp:(.text+0xf70c): undefined reference to `x265_alloc_analysis_data'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: encoder.cpp:(.text+0xf866): undefined reference to `x265_alloc_analysis_data'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: libx265.a(encoder.cpp.o): in function `x265_12bit::Encoder::writeAnalysisFile(x265_analysis_data*, x265_12bit::FrameData&)':
encoder.cpp:(.text+0x102d2): undefined reference to `x265_free_analysis_data'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: libx265.a(encoder.cpp.o): in function `x265_12bit::Encoder::writeAnalysisFileRefine(x265_analysis_data*, x265_12bit::FrameData&)':
encoder.cpp:(.text+0x10b32): undefined reference to `x265_free_analysis_data'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: libx265.a(encoder.cpp.o): in function `x265_12bit::Encoder::encode(x265_picture const*, x265_picture*)':
encoder.cpp:(.text+0x11792): undefined reference to `x265_free_analysis_data'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: encoder.cpp:(.text+0x11c44): undefined reference to `x265_free_analysis_data'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: encoder.cpp:(.text+0x12340): undefined reference to `x265_alloc_analysis_data'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: encoder.cpp:(.text+0x124dd): undefined reference to `x265_free_analysis_data'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: encoder.cpp:(.text+0x12afc): undefined reference to `x265_alloc_analysis_data'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: encoder.cpp:(.text+0x12bb4): undefined reference to `x265_encoder_reconfig'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: encoder.cpp:(.text+0x12c4c): undefined reference to `x265_free_analysis_data'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: libx265.a(param.cpp.o): in function `x265_12bit::x265_param_free(x265_param*)':
param.cpp:(.text+0x165): undefined reference to `x265_zone_free'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Comment 6 Larry the Git Cow gentoo-dev 2023-12-21 09:57:15 UTC
The bug has been closed via the following commit(s):

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

commit b0bd48f0746c68d5bb9b597e232d17bc630541cb
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-12-21 08:56:35 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-12-21 09:56:23 +0000

    media-libs/x265: rebase 9999
    
    Still seems broken though and not going to spend more time on this today:
    ```
     * QA Notice: Unresolved soname dependencies:
     *
     *      /usr/bin/x265: libx265.so.208
     *
    ```
    
    Closes: https://bugs.gentoo.org/878367
    Closes: https://bugs.gentoo.org/914833
    Signed-off-by: Sam James <sam@gentoo.org>

 media-libs/x265/files/x265-9999-test-ns.patch | 286 ++++++++++++++++++++++++++
 media-libs/x265/x265-9999.ebuild              |   7 +-
 2 files changed, 289 insertions(+), 4 deletions(-)