Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 742737 - media-video/x264-encoder-0.0.20220222 calls strings directly
Summary: media-video/x264-encoder-0.0.20220222 calls strings directly
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
Depends on:
Blocks: tc-directly
  Show dependency tree
Reported: 2020-09-16 05:53 UTC by Agostino Sarubbo
Modified: 2022-09-05 03:40 UTC (History)
0 users

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

build.log (build.log,6.23 KB, text/plain)
2020-09-16 05:53 UTC, Agostino Sarubbo
context (context,120 bytes, text/plain)
2020-09-16 05:53 UTC, Agostino Sarubbo

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2020-09-16 05:53:26 UTC

Issue: media-video/x264-encoder-0.0.20190903 calls strings directly.
Discovered on: amd64 (internal ref: ci)

As per QA policy, toolchain tools must not be called directly because they can cause issue in cross-compiling and because is not possible use a different STRINGS implementation (like llvm-strings). To reproduce, please use sys-devel/gcc-config[-native-symlinks], sys-devel/binutils-config[-native-symlinks] and set the STRINGS variable to x86_64-pc-linux-gnu-strings.
Comment 1 Agostino Sarubbo gentoo-dev 2020-09-16 05:53:28 UTC
Created attachment 660480 [details]

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2020-09-16 05:53:29 UTC
Created attachment 660483 [details]

Comment 3 Arfrever Frehtes Taifersar Arahesis 2020-09-16 06:20:41 UTC
media-libs/x264 ebuilds call `configure` with --cross-prefix="${CHOST}-", while media-video/x264-encoder do not.

In configure of x264(-encoder)-0.0.20190903:

> cross_prefix=""
> ...
> # parse options
> for opt do
>     optarg="${opt#*=}"
>     case "$opt" in
> ...
>         --cross-prefix=*)
>             cross_prefix="$optarg"
>             ;;
> ...
> # skip endianness check for Intel Compiler and MSVS, as all supported platforms are little. each have flags that will cause the check to fail as well
> CPU_ENDIAN="little-endian"
> if [ $compiler = GNU ]; then
>     echo "int i[2] = {0x42494745,0}; double f[2] = {0x1.0656e6469616ep+102,0};" > conftest.c
>     $CC $CFLAGS conftest.c -c -o conftest.o 2>/dev/null || die "endian test failed"
>     if (${cross_prefix}strings -a conftest.o | grep -q BIGE) && (${cross_prefix}strings -a conftest.o | grep -q FPendian) ; then
>         define WORDS_BIGENDIAN
>         CPU_ENDIAN="big-endian"
>     elif !(${cross_prefix}strings -a conftest.o | grep -q EGIB && ${cross_prefix}strings -a conftest.o | grep -q naidnePF) ; then
>         die "endian test failed"
>     fi
> fi

So calling `configure` with --cross-prefix="${CHOST}-" would hide immediate problem by using "${CHOST}-strings", but it would not respect potential e.g. STRINGS="llvm-strings".
Comment 4 Agostino Sarubbo gentoo-dev 2022-03-10 13:39:20 UTC
ci has reproduced this issue with version 0.0.20220222 - Updating summary.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-09-05 03:40:00 UTC
commit a85bd0fbaadbaa7eac7c247b29961a18a9cc1a78
Author: Sergei Trofimovich <>
Date:   Tue Jun 16 07:32:54 2020 +0100

    media-libs/x264: use tuple-prefixed tools in live ebuild

    Apply commit 4531c7dc106702 ("media-libs/x264: use tuple-prefixed tools")
    to live ebuild as well.

    Reported-by: Arfrever Frehtes Taifersar Arahesis
    Package-Manager: Portage-2.3.101, Repoman-2.3.22
    Signed-off-by: Sergei Trofimovich <>

commit 4531c7dc10670235bb6ff4658eb05f6081d4e205
Author: Sergei Trofimovich <>
Date:   Sun Jun 14 09:22:27 2020 +0100

    media-libs/x264: use tuple-prefixed tools

    Two changes here:

    1. backport upstream ee55c88ec commit
       ("configure: allow 'strings' override via STRINGS variable").

    2. set '--cross-prefix=${CHOST}-' to use tuple-prefixed
       tools by default.

    The change allows building x264 as-is on
    sys-devel/binutils-config[-native-symlinks] system.

    Package-Manager: Portage-2.3.100, Repoman-2.3.22
    Signed-off-by: Sergei Trofimovich <>

commit 295166a86e96aef23f9cc311e71eb29556aaeaa4
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Date:   Sat Sep 5 16:00:00 2020 +0000

    media-libs/x264: Set special value of AS to fix build failure.

    Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
    Signed-off-by: Mike Gilbert <>