public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "james.hilliard1 at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/29621] librtld.os: in function `__register_frame': libgcc/unwind-dw2-fde.c:136: undefined reference to `malloc'
Date: Thu, 27 Oct 2022 19:57:11 +0000	[thread overview]
Message-ID: <bug-29621-131-fY6eCaxIkQ@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29621-131@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=29621

--- Comment #8 from James Hilliard <james.hilliard1 at gmail dot com> ---
(In reply to Adhemerval Zanella from comment #7)
> (In reply to James Hilliard from comment #6)
> > 
> > Full commands:
> > git clone https://github.com/buildroot/buildroot.git
> > cd buildroot
> > git checkout e4ecf82f99f53e55d51e6f74ae5021473aa2bb1d
> > wget
> > http://autobuild.buildroot.net/results/883/
> > 883b171a856a63540908976592683527fdb21cd2/config
> > mv config .config
> > make glibc
> 
> Ok, with this one I can see the buildroot failure. It seems that it is
> misconfiguring the stage1 gcc, where the libgcc.a generated is relying on
> the libc for unwinding (thus why ld.so link is failing).
> 
> I mimic what build-many-glibcs.py [1] does (which is canonical way to build
> complete toolchain for glibc) and build a stage1 on buildroot system with:
> 
> ---
> ./configure \
>   --prefix=/tmp/buildroot/output/host \
>   --build=x86_64-pc-linux-gnu \
>   --host=x86_64-pc-linux-gnu \
>   --target=mips64el-glibc-linux-gnu \

This looks wrong, we aren't building for mips64el(which our autobuilders also
indicate does not have this particular build failure).

>   --sysconfdir=/tmp/buildroot/output/host/etc \
>   --localstatedir=/tmp/buildroot/output/host/var \
>   --target=mipsel-buildroot-linux-gnu \

Setting target a second time?

>  
> --with-sysroot=/tmp/buildroot/output/host/mipsel-buildroot-linux-gnu/sysroot
> \
>   --with-gmp=/tmp/buildroot/output/host \
>   --with-mpc=/tmp/buildroot/output/host \
>   --with-mpfr=/tmp/buildroot/output/host \
>   --with-pkgversion="Buildroot 2022.08-383-ge4ecf82f99-dirty" \
>   --with-bugurl=http://bugs.buildroot.net/ \
>   --enable-initfini-array \
>   --disable-libssp \
>   --disable-shared \
>   --disable-threads \
>   --disable-libatomic \
>   --disable-decimal-float \
>   --disable-libffi \
>   --disable-libgomp \
>   --disable-libitm \
>   --disable-libmpx \
>   --disable-libquadmath \
>   --disable-libsanitizer \
>   --without-headers\
>   --with-newlib \
>   --enable-languages=c, \
>   --with-arch=mips32r3 --with-abi=32 --with-nan=legacy --with-fp-32=xx
> ---

I've attempted to make a build using this configuration but have not been able
to get a working build.

> 
> And with this stage1 gcc I could finish the glibc build. I am afraid you
> will need to sort this out on buildroot stage1 configuration flags used on
> gcc.

I've tested by patching our gcc stage1
configure(package/gcc/gcc-initial/gcc-initial.mk).

Replacing HOST_GCC_INITIAL_CONF_OPTS with this for testing:
HOST_GCC_INITIAL_CONF_OPTS = \
        --build=x86_64-pc-linux-gnu \
        --host=x86_64-pc-linux-gnu \
        --target=$(GNU_TARGET_NAME) \
        --with-sysroot=$(STAGING_DIR) \
        --with-gmp=$(HOST_DIR) \
        --with-mpc=$(HOST_DIR) \
        --with-mpfr=$(HOST_DIR) \
        --with-pkgversion="Buildroot $(BR2_VERSION_FULL)" \
        --with-bugurl=http://bugs.buildroot.net/ \
        --enable-initfini-array \
        --disable-libssp \
        --disable-shared \
        --disable-threads \
        --disable-libatomic \
        --disable-decimal-float \
        --disable-libffi \
        --disable-libgomp \
        --disable-libitm \
        --disable-libmpx \
        --disable-libquadmath \
        --disable-libsanitizer \
        --without-headers \
        --with-newlib \
        --enable-languages=c, \
        --with-arch=mips32r3 --with-abi=32 --with-nan=legacy --with-fp-32=xx

With this I get the same failure as before. Does this successfully build for
you?

After patching gcc-initial.mk to test I do:
make clean
make glibc

> 
> [1]
> https://sourceware.org/git/?p=glibc.git;a=blob;f=scripts/build-many-glibcs.
> py;h=5af6f369ae04027911b3407c64716dd1571eae6a;hb=HEAD

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2022-10-27 19:57 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-27 19:44 [Bug libc/29621] New: " james.hilliard1 at gmail dot com
2022-09-27 19:44 ` [Bug libc/29621] " james.hilliard1 at gmail dot com
2022-09-29 17:45 ` adhemerval.zanella at linaro dot org
2022-09-29 19:51 ` james.hilliard1 at gmail dot com
2022-10-17 12:42 ` adhemerval.zanella at linaro dot org
2022-10-26 18:54 ` james.hilliard1 at gmail dot com
2022-10-26 19:10 ` adhemerval.zanella at linaro dot org
2022-10-26 19:33 ` james.hilliard1 at gmail dot com
2022-10-27 14:04 ` adhemerval.zanella at linaro dot org
2022-10-27 19:57 ` james.hilliard1 at gmail dot com [this message]
2022-10-27 21:05 ` adhemerval.zanella at linaro dot org
2022-10-27 21:35 ` james.hilliard1 at gmail dot com
2022-10-28  5:28 ` fweimer at redhat dot com
2022-10-28 13:19 ` adhemerval.zanella at linaro dot org
2022-10-28 13:36 ` adhemerval.zanella at linaro dot org
2022-10-28 16:18 ` james.hilliard1 at gmail dot com
2022-10-28 16:32 ` adhemerval.zanella at linaro dot org
2022-10-28 21:23 ` james.hilliard1 at gmail dot com
2022-11-24 17:01 ` arnout at mind dot be
2022-11-24 17:21 ` arnout at mind dot be
2022-11-24 17:27 ` fweimer at redhat dot com
2023-08-07  9:37 ` sam at gentoo dot org
2024-01-11  9:41 ` fweimer at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-29621-131-fY6eCaxIkQ@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).