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: Fri, 28 Oct 2022 16:18:22 +0000	[thread overview]
Message-ID: <bug-29621-131-7pYa8tq9qr@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 #14 from James Hilliard <james.hilliard1 at gmail dot com> ---
> So now I even more confident it is something on buildroot environment that
> is generating a wrong stage1 gcc build.

You can see the exact env being set during buildroot's configure stage and copy
that for testing:

>>> host-gcc-initial 11.3.0 Configuring
mkdir -p /tmp/buildroot/output/build/host-gcc-initial-11.3.0/build
ln -sf ../configure
/tmp/buildroot/output/build/host-gcc-initial-11.3.0/build/configure
(cd /tmp/buildroot/output/build/host-gcc-initial-11.3.0/build && rm -rf
config.cache;
PATH="/tmp/buildroot/output/host/bin:/tmp/buildroot/output/host/sbin:/home/buildroot/bin:/home/buildroot/.local/bin:/home/buildroot/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
PKG_CONFIG="/tmp/buildroot/output/host/bin/pkg-config"
PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
PKG_CONFIG_LIBDIR="/tmp/buildroot/output/host/lib/pkgconfig:/tmp/buildroot/output/host/share/pkgconfig"
AR="/usr/bin/ar" AS="/usr/bin/as" LD="/usr/bin/ld" NM="/usr/bin/nm"
CC="/usr/bin/gcc" GCC="/usr/bin/gcc" CXX="/usr/bin/g++" CPP="/usr/bin/cpp"
OBJCOPY="/usr/bin/objcopy" RANLIB="/usr/bin/ranlib"
CPPFLAGS="-I/tmp/buildroot/output/host/include" CFLAGS="-O2
-I/tmp/buildroot/output/host/include" CXXFLAGS="-O2
-I/tmp/buildroot/output/host/include" LDFLAGS="-L/tmp/buildroot/output/host/lib
-Wl,-rpath,/tmp/buildroot/output/host/lib" INTLTOOL_PERL=/usr/bin/perl
CFLAGS="-O2 -I/tmp/buildroot/output/host/include"
LDFLAGS="-L/tmp/buildroot/output/host/lib
-Wl,-rpath,/tmp/buildroot/output/host/lib" MAKEINFO=missing
CFLAGS_FOR_TARGET="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64  -O0 -g0 " CXXFLAGS_FOR_TARGET="-D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -O0 -g0 " AR_FOR_TARGET=gcc-ar
NM_FOR_TARGET=gcc-nm RANLIB_FOR_TARGET=gcc-ranlib CONFIG_SITE=/dev/null
./configure --prefix="/tmp/buildroot/output/host"
--sysconfdir="/tmp/buildroot/output/host/etc"
--localstatedir="/tmp/buildroot/output/host/var" --enable-shared
--disable-static --disable-gtk-doc --disable-gtk-doc-html --disable-doc
--disable-docs --disable-documentation --disable-debug --with-xmlto=no
--with-fop=no --disable-nls --disable-dependency-tracking 
--target=mipsel-buildroot-linux-gnu
--with-sysroot=/tmp/buildroot/output/host/mipsel-buildroot-linux-gnu/sysroot
--enable-__cxa_atexit --with-gnu-ld --disable-libssp --disable-multilib
--disable-decimal-float --enable-plugins --enable-lto
--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" --with-bugurl="http://bugs.buildroot.net/"
--without-zstd --disable-libquadmath --disable-libquadmath-support --enable-tls
--enable-threads --without-isl --without-cloog --with-arch="mips32r3"
--with-abi="32" --with-nan="legacy" --with-fp-32="xx" --enable-languages=c
--disable-shared --without-headers --disable-threads --with-newlib
--disable-largefile  )

Something different with the buildroot compilation environmental variables
seems to be why your build is working. If you set them manually when running
./configure one gets the same failure as when building using buildroot.

This fails for example:
PATH="/tmp/buildroot/output/host/bin:/tmp/buildroot/output/host/sbin:/home/buildroot/bin:/home/buildroot/.local/bin:/home/buildroot/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
PKG_CONFIG="/tmp/buildroot/output/host/bin/pkg-config"
PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
PKG_CONFIG_LIBDIR="/tmp/buildroot/output/host/lib/pkgconfig:/tmp/buildroot/output/host/share/pkgconfig"
AR="/usr/bin/ar" AS="/usr/bin/as" LD="/usr/bin/ld" NM="/usr/bin/nm"
CC="/usr/bin/gcc" GCC="/usr/bin/gcc" CXX="/usr/bin/g++" CPP="/usr/bin/cpp"
OBJCOPY="/usr/bin/objcopy" RANLIB="/usr/bin/ranlib"
CPPFLAGS="-I/tmp/buildroot/output/host/include" CFLAGS="-O2
-I/tmp/buildroot/output/host/include" CXXFLAGS="-O2
-I/tmp/buildroot/output/host/include" LDFLAGS="-L/tmp/buildroot/output/host/lib
-Wl,-rpath,/tmp/buildroot/output/host/lib" INTLTOOL_PERL=/usr/bin/perl
CFLAGS="-O2 -I/tmp/buildroot/output/host/include"
LDFLAGS="-L/tmp/buildroot/output/host/lib
-Wl,-rpath,/tmp/buildroot/output/host/lib" MAKEINFO=missing
CFLAGS_FOR_TARGET="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64  -O0 -g0 " CXXFLAGS_FOR_TARGET="-D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -O0 -g0 " AR_FOR_TARGET=gcc-ar
NM_FOR_TARGET=gcc-nm RANLIB_FOR_TARGET=gcc-ranlib CONFIG_SITE=/dev/null
./configure --prefix=/tmp/buildroot/output/host
--sysconfdir=/tmp/buildroot/output/host/etc
--localstatedir=/tmp/buildroot/output/host/var --disable-gtk-doc
--disable-gtk-doc-html --disable-doc --disable-docs --disable-documentation
--disable-debug --with-xmlto=no --with-fop=no --disable-nls
--disable-dependency-tracking --target=mipsel-buildroot-linux-gnu
--with-sysroot=/tmp/buildroot/output/host/mipsel-buildroot-linux-gnu/sysroot
--with-gnu-ld --disable-libssp --disable-multilib --disable-decimal-float
--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/
--without-zstd --disable-libquadmath --disable-libquadmath-support
--without-isl --without-cloog --with-arch=mips32r3 --with-abi=32
--with-nan=legacy --with-fp-32=xx --enable-languages=c --enable-initfini-array
--disable-libssp --disable-shared --without-headers --disable-threads
--disable-libatomic --disable-decimal-float --disable-libffi --disable-libgomp
--disable-libitm --disable-libmpx --disable-libquadmath --disable-libsanitizer
--with-newlib

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

  parent reply	other threads:[~2022-10-28 16:18 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
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 [this message]
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-7pYa8tq9qr@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).