Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 742737

Summary: media-video/x264-encoder-0.0.20190903 calls strings directly
Product: Gentoo Linux Reporter: Agostino Sarubbo <ago>
Component: Current packagesAssignee: media-video herd <media-video>
Status: CONFIRMED ---    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 243502    
Attachments: build.log
context

Description Agostino Sarubbo gentoo-dev 2020-09-16 05:53:26 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

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

NOTE:
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

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

context
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".