Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 711646 - sys-devel/make-4.3 is not working on mips
Summary: sys-devel/make-4.3 is not working on mips
Status: RESOLVED DUPLICATE of bug 708758
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-05 22:17 UTC by Andrew Aladjev
Modified: 2020-03-06 10:52 UTC (History)
2 users (show)

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


Attachments
make.log.xz (make.log.xz,41.27 KB, application/x-xz)
2020-03-05 22:18 UTC, Andrew Aladjev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Aladjev 2020-03-05 22:17:41 UTC
Hello. I am building mips test image and found that make 4.3 is broken on mips, make 4.2.1-r4 works perfect. How to reproduce it?

1. Install static qemu-user with mips and register it.
2. Prepare basic mips toolchain using crossdev inside container.
3. Cross compile make.
4. Run "ebuild prepare" on any ebuild which uses make (for example coreutils).
5. Try to use "LD_LIBRARY_PATH='/usr/mips-unknown-linux-gnu/lib' strace /usr/mips-unknown-linux-gnu/usr/bin/make" instead of regular make.

You will receive the following result:
> make: *** [Makefile:13043: lib/alloca.h] Error 127

I will attach here a log with strace output using the following command:

buildah --cap-add=CAP_SYS_PTRACE run 98e3090980d8 -- sh -c "cd /var/tmp/portage/sys-apps/coreutils-8.31-r1/work/coreutils-8.31 && LD_LIBRARY_PATH='/usr/mips-unknown-linux-gnu/lib' strace -v /usr/mips-unknown-linux-gnu/usr/bin/make"



Reproducible: Always
Comment 1 Andrew Aladjev 2020-03-05 22:18:07 UTC
Created attachment 617268 [details]
make.log.xz
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2020-03-05 22:29:43 UTC
LD_LIBRARY_PATH= is generally not a valid way to set root for qemu-user. Your binfmt_mist registration should pass root path via -L option. I'm using the following:

  $ cat /qemu-mipsn32
  #!/bin/bash

  exec /usr/bin/qemu-mipsn32 -L /usr/mips64-unknown-linux-gnu/ "$@"

Running strace against qemu-user might also not be the best way to sxplore emulated binary. qemu-user provides a -strace option (or QEMU_STRACE variable for it).

Also make sure you are not encountering bug #708758.
Comment 3 Andrew Aladjev 2020-03-05 22:36:43 UTC
Thank you. I will try to debug it tomorrow.
Comment 4 Andrew Aladjev 2020-03-06 10:52:14 UTC
I've compiled make 4.3 with --disable-posix-spawn and after that everything works perfect. So we will mark this issue as duplicate of 708758.
Comment 5 Andrew Aladjev 2020-03-06 10:52:44 UTC

*** This bug has been marked as a duplicate of bug 708758 ***