Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 934370 - app-arch/xz-utils-5.6.2 silently builds no shared library on mips(64) (stage1, n32 and n64)
Summary: app-arch/xz-utils-5.6.2 silently builds no shared library on mips(64) (stage1...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-15 17:17 UTC by Andreas K. Hüttel
Modified: 2024-06-15 22:46 UTC (History)
2 users (show)

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


Attachments
build log (mips64 n64 stage1) (xz-utils-5.6.2.log,332.78 KB, text/plain)
2024-06-15 17:18 UTC, Andreas K. Hüttel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas K. Hüttel archtester gentoo-dev 2024-06-15 17:17:50 UTC
app-arch/xz-utils-5.6.2 silently builds no shared library on mips(64) (stage1, n32 and n64)

Stage 3 then fails since it expects a library to be there.
Comment 1 Andreas K. Hüttel archtester gentoo-dev 2024-06-15 17:18:27 UTC
Created attachment 895881 [details]
build log (mips64 n64 stage1)
Comment 2 Andreas K. Hüttel archtester gentoo-dev 2024-06-15 17:19:45 UTC
[...]
checking whether the mips64-unknown-linux-gnuabi64-gcc linker (/usr/mips64-unknown-linux-gnuabi64/bin/ld -m elf) supports shared libraries... /usr/mips64-unknown-linux-gnuabi64/bin/ld: unrecognised emulation mode: elf
Supported emulations: elf64btsmip elf64ltsmip elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip
no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... unsupported
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... no
checking whether to build shared libraries... no
checking whether to build static libraries... yes
[...]
Comment 3 Andreas K. Hüttel archtester gentoo-dev 2024-06-15 17:30:42 UTC
Interestingly, this part of configure is expanded from 

===
echo
echo "Initializing Libtool:"
LT_PREREQ([2.4])
LT_INIT([win32-dll])
LT_LANG([Windows Resource])
===

so it doesnt even come from xz-utils...
Comment 4 Andreas K. Hüttel archtester gentoo-dev 2024-06-15 17:52:55 UTC
Libtool hasn't changed for a while, so this is unlikely to be the problem.
Where does it get the emulation name from? 

From /usr/share/aclocal/libtool.m4 :

====
mips64*-*linux*)
  # Find out what ABI is being produced by ac_compile, and set linker
  # options accordingly.
  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
  if AC_TRY_EVAL(ac_compile); then
    emul=elf
    case `$FILECMD conftest.$ac_objext` in
      *32-bit*)
        emul="${emul}32"
        ;;
      *64-bit*)
        emul="${emul}64"
        ;;
    esac
    case `$FILECMD conftest.$ac_objext` in
      *MSB*)
        emul="${emul}btsmip"
        ;;
      *LSB*)
        emul="${emul}ltsmip"
        ;;
    esac
    case `$FILECMD conftest.$ac_objext` in
      *N32*)
        emul="${emul}n32"
        ;;
    esac
    LD="${LD-ld} -m $emul"
  fi
  rm -rf conftest*
  ;;
======
Comment 5 Andreas K. Hüttel archtester gentoo-dev 2024-06-15 18:20:38 UTC
in the seed stage, file works and gcc works...

dilfridge-mips64 ~ # gcc -o minimum minimum.c 
dilfridge-mips64 ~ # file minimum
minimum: ELF 64-bit MSB pie executable, MIPS, MIPS-III version 1 (SYSV), dynamically linked, interpreter /lib64/ld.so.1, for GNU/Linux 3.2.0, not stripped
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-06-15 19:22:53 UTC
(In reply to Andreas K. Hüttel from comment #4)
> Libtool hasn't changed for a while, so this is unlikely to be the problem.
> Where does it get the emulation name from? 
> 
> From /usr/share/aclocal/libtool.m4 :

we don't run autoreconf in the ebuild (for circular dep reasons), lasse built this release using libtool in arch which is a new beta....
Comment 7 Larry the Git Cow gentoo-dev 2024-06-15 22:46:03 UTC
The bug has been closed via the following commit(s):

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

commit 25171b1f5847b461145906ac2bc230c462f62c21
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-06-15 22:41:30 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-06-15 22:45:26 +0000

    app-arch/xz-utils: workaround libtool bug preventing shared library build
    
    * Fix detection of `file` with libtool-2.5.0 (which xz-5.4.7, xz.5.6.2
      had dist tarballs created with). This only affects some targets. See
      bug #934370.
    
      See https://git.savannah.gnu.org/cgit/libtool.git/commit/?h=development&id=9a4a02615c9e7cbcfd690ed31874822a7d6aaea2.
    
    * Add a sanity check for targets which support shared libraries where
      we verify liblzma.so is in the image.
    
      Use tc-is-static-only to handle the concern from bug #450436.
    
    Bug: https://bugs.gentoo.org/450436
    Closes: https://bugs.gentoo.org/934370
    Signed-off-by: Sam James <sam@gentoo.org>

 app-arch/xz-utils/xz-utils-5.4.7-r1.ebuild | 155 ++++++++++++++++++++++
 app-arch/xz-utils/xz-utils-5.6.2-r1.ebuild | 203 +++++++++++++++++++++++++++++
 app-arch/xz-utils/xz-utils-9999.ebuild     |  15 +++
 3 files changed, 373 insertions(+)