Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 742737 - media-video/x264-encoder-0.0.20190903 calls strings directly
Summary: media-video/x264-encoder-0.0.20190903 calls strings directly
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: media-video herd
Depends on:
Blocks: tc-directly
  Show dependency tree
Reported: 2020-09-16 05:53 UTC by Agostino Sarubbo
Modified: 2020-09-16 06:20 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".