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

Bug 726200

Summary: x11-libs/cairo-1.16.0-r3 calls 'strings' directly
Product: Gentoo Linux Reporter: Sergei Trofimovich (RETIRED) <slyfox>
Component: Current packagesAssignee: Gentoo X packagers <x11>
Status: RESOLVED FIXED    
Severity: normal CC: kentnl, zlogene
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/41
See Also: https://bugs.gentoo.org/show_bug.cgi?id=730714
https://bugs.gentoo.org/show_bug.cgi?id=853121
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 243502, 408963, 618550    
Attachments: cairo-1.16.0-strings.patch

Description Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-30 10:58:22 UTC
On sys-devel/binutils-config[-native-symlinks] system cairo fails to build in configure phase as:

"""
...
checking whether byte ordering is bigendian... no
checking whether float word ordering is bigendian... /tmp/portage/x11-libs/cairo-1.16.0-r3/work/cairo-1.16.0/configure: line 15323: strings: command not found
/tmp/portage/x11-libs/cairo-1.16.0-r3/work/cairo-1.16.0/configure: line 15326: strings: command not found
unknown
configure: error:

Unknown float word ordering. You need to manually preset
ax_cv_c_float_words_bigendian=no (or yes) according to your system.



!!! Please attach the following file when seeking support:
!!! /tmp/portage/x11-libs/cairo-1.16.0-r3/work/cairo-1.16.0-abi_x86_64.amd64/config.log
"""

sys-devel/binutils-config[-native-symlinks] removes default 'strings' and other symlinks and relies on ebuilds passing STRINGS variables (or via --host= detection).

The following seems to be enough to get cairo going again:

--- a/build/aclocal.float.m4
+++ b/build/aclocal.float.m4
@@ -31,10 +31,13 @@ int main() { return 0; }

 ]])], [

-if strings -a conftest$ac_exeext | grep noonsees >/dev/null ; then
+# allow users to override default 'strings' with 'llvm-strings'
+# or ${CHOST}-strings.
+AC_CHECK_TOOL(STRINGS, strings)
+if $STRINGS -a conftest$ac_exeext | grep noonsees >/dev/null ; then
   ax_cv_c_float_words_bigendian=yes
 fi
-if strings -a conftest$ac_exeext | grep seesnoon >/dev/null ; then
+if $STRINGS -a conftest$ac_exeext | grep seesnoon >/dev/null ; then
   if test "$ax_cv_c_float_words_bigendian" = unknown; then
     ax_cv_c_float_words_bigendian=no
   else
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-30 10:58:47 UTC
Created attachment 642666 [details, diff]
cairo-1.16.0-strings.patch
Comment 2 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2020-05-30 11:07:56 UTC
*** Bug 726034 has been marked as a duplicate of this bug. ***
Comment 3 Larry the Git Cow gentoo-dev 2020-06-13 20:13:07 UTC
The bug has been closed via the following commit(s):

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

commit 75aebadc586d4bbce67e1bb948a10da28b5c703d
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-06-13 20:11:50 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-06-13 20:13:00 +0000

    x11-libs/cairo: detect 'strings' with AC_CHECK_TOOL
    
    This way all binutils tools are detected with $CHOST prefix
    if exist. Fixes 64-bit build on sys-devel/binutils-config[-native-symlinks]
    system.
    
    Closes: https://bugs.gentoo.org/726200
    Package-Manager: Portage-2.3.100, Repoman-2.3.22
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 x11-libs/cairo/cairo-1.16.0-r4.ebuild           | 135 ++++++++++++++++++++++++
 x11-libs/cairo/files/cairo-1.16.0-strings.patch |  19 ++++
 2 files changed, 154 insertions(+)
Comment 4 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2020-06-14 08:26:40 UTC
(In reply to Larry the Git Cow from comment #3)
> The bug has been closed via the following commit(s):
> 
> https://gitweb.gentoo.org/repo/gentoo.git/commit/
> ?id=75aebadc586d4bbce67e1bb948a10da28b5c703d
> 
> commit 75aebadc586d4bbce67e1bb948a10da28b5c703d
> Author:     Sergei Trofimovich <slyfox@gentoo.org>
> AuthorDate: 2020-06-13 20:11:50 +0000
> Commit:     Sergei Trofimovich <slyfox@gentoo.org>
> CommitDate: 2020-06-13 20:13:00 +0000
> 
>     x11-libs/cairo: detect 'strings' with AC_CHECK_TOOL
>     
>     This way all binutils tools are detected with $CHOST prefix
>     if exist. Fixes 64-bit build on
> sys-devel/binutils-config[-native-symlinks]
>     system.
>     
>     Closes: https://bugs.gentoo.org/726200
>     Package-Manager: Portage-2.3.100, Repoman-2.3.22
>     Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
> 
>  x11-libs/cairo/cairo-1.16.0-r4.ebuild           | 135
> ++++++++++++++++++++++++
>  x11-libs/cairo/files/cairo-1.16.0-strings.patch |  19 ++++
>  2 files changed, 154 insertions(+)


This doesn't seem to help, I'm not sure if this a seperate bug, but configure is still saying "can't find strings", and that's probably bad.

But it *is* failing in the x86_32 path, so maybe more work required:

 * abi_x86_32.x86: running multilib-minimal_abi_src_configure
....
checking whether x86_64-pc-linux-gnu-gcc -m32 supports -fno-strict-aliasing... yes
checking whether x86_64-pc-linux-gnu-gcc -m32 supports -fno-common... yes
checking whether x86_64-pc-linux-gnu-gcc -m32 supports -Wp,-D_FORTIFY_SOURCE=2... yes
checking whether x86_64-pc-linux-gnu-gcc -m32 supports -Wunused-but-set-variable -Wno-unused-but-set-variable... yes
checking which warning flags were supported...  -Wall -Wextra -Wmissing-declarations -Werror-implicit-function-declaration -Wpointer-arith -Wwrite-strings -Wsign-compare -Wpacked -Wswitch-enum -Wmissing-format-attribute -Wvolatile-register-var -Wstrict-aliasing=2 -Winit-self -Wunsafe-loop-optimizations -Wno-missing-field-initializers -Wno-unused-parameter -Wno-attributes -Wno-long-long -Winline -fno-strict-aliasing -fno-common -Wp,-D_FORTIFY_SOURCE=2 -Wno-unused-but-set-variable
checking how to enable unused result warnings... __attribute__((__warn_unused_result__))
checking how to allow undefined symbols in shared libraries used by test suite... -Wl,--allow-shlib-undefined
checking whether byte ordering is bigendian... no
checking whether float word ordering is bigendian... checking for i686-pc-linux-gnu-strings... no
checking for strings... no
/var/tmp/portage/x11-libs/cairo-1.16.0-r4/work/cairo-1.16.0/configure: line 15418: -a: command not found
/var/tmp/portage/x11-libs/cairo-1.16.0-r4/work/cairo-1.16.0/configure: line 15421: -a: command not found
unknown
configure: error: 

Unknown float word ordering. You need to manually preset
ax_cv_c_float_words_bigendian=no (or yes) according to your system.

    
But this seems to indicate that sys-devel/binutils needs to be multi-libbed as well.
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2020-06-14 08:40:32 UTC
(In reply to Kent Fredric (IRC: kent\n) from comment #4)
> (In reply to Larry the Git Cow from comment #3)
> > The bug has been closed via the following commit(s):
> > 
> > https://gitweb.gentoo.org/repo/gentoo.git/commit/
> > ?id=75aebadc586d4bbce67e1bb948a10da28b5c703d
> > 
> > commit 75aebadc586d4bbce67e1bb948a10da28b5c703d
> > Author:     Sergei Trofimovich <slyfox@gentoo.org>
> > AuthorDate: 2020-06-13 20:11:50 +0000
> > Commit:     Sergei Trofimovich <slyfox@gentoo.org>
> > CommitDate: 2020-06-13 20:13:00 +0000
> > 
> >     x11-libs/cairo: detect 'strings' with AC_CHECK_TOOL
> >     
> >     This way all binutils tools are detected with $CHOST prefix
> >     if exist. Fixes 64-bit build on
> > sys-devel/binutils-config[-native-symlinks]
> >     system.
> >     
> >     Closes: https://bugs.gentoo.org/726200
> >     Package-Manager: Portage-2.3.100, Repoman-2.3.22
> >     Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
> > 
> >  x11-libs/cairo/cairo-1.16.0-r4.ebuild           | 135
> > ++++++++++++++++++++++++
> >  x11-libs/cairo/files/cairo-1.16.0-strings.patch |  19 ++++
> >  2 files changed, 154 insertions(+)
> 
> 
> This doesn't seem to help, I'm not sure if this a seperate bug, but
> configure is still saying "can't find strings", and that's probably bad.

It is a separate bug. multilib.eclass needs to override STRINGS: https://archives.gentoo.org/gentoo-dev/message/9e88fbc8cb0724025291172384d63ede
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2020-06-14 09:08:22 UTC
Proposed patch upstream as https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/41
Comment 7 Larry the Git Cow gentoo-dev 2022-09-21 01:24:58 UTC
The bug has been referenced in the following commit(s):

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

commit b5760171b4f4159669224f6a31652f1c781a517b
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-09-21 01:17:13 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-09-21 01:24:44 +0000

    app-text/texlive-core: fix build with LTO using llvm-strings
    
    Bug in bundled Cairo, already fixed in x11-libs/cairo.
    
    Bug: https://bugs.gentoo.org/726200
    Closes: https://bugs.gentoo.org/853121
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/texlive-core-2021-cairo-strings.patch    |  34 ++
 app-text/texlive-core/texlive-core-2021-r3.ebuild  | 361 +++++++++++++++++++++
 2 files changed, 395 insertions(+)