public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug compile/29484] New: gdb 12.1 fails to build on xtensa: undefined reference to `xtensa_tdep'
@ 2022-08-13 20:13 thomas.petazzoni at bootlin dot com
  2022-08-13 20:15 ` [Bug compile/29484] " thomas.petazzoni at bootlin dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: thomas.petazzoni at bootlin dot com @ 2022-08-13 20:13 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 29484
           Summary: gdb 12.1 fails to build on xtensa: undefined reference
                    to `xtensa_tdep'
           Product: gdb
           Version: 12.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: compile
          Assignee: unassigned at sourceware dot org
          Reporter: thomas.petazzoni at bootlin dot com
  Target Milestone: ---

Building gdb 12.1 for Xtensa fails with:

xtensa-tdep.o: In function `xtensa_gdbarch_init(gdbarch_info, gdbarch_list*)':
xtensa-tdep.c:(.text+0x1cd2): undefined reference to `xtensa_tdep'
xtensa-tdep.c:(.text+0x1ce9): undefined reference to `xtensa_tdep'
xtensa-tdep.c:(.text+0x1cf2): undefined reference to `xtensa_tdep'
xtensa-tdep.c:(.text+0x1cfc): undefined reference to `xtensa_tdep'
xtensa-tdep.c:(.text+0x1d12): undefined reference to `xtensa_tdep'
xtensa-tdep.o:xtensa-tdep.c:(.text+0x1d19): more undefined references to
`xtensa_tdep' follow
collect2: error: ld returned 1 exit status
Makefile:1903: recipe for target 'gdb' failed

gdb was configured as follows:

(cd
/builds/buildroot.org/toolchains-builder/build/output/build/host-gdb-12.1/build
&& rm -rf config.cache;
PATH="/builds/buildroot.org/toolchains-builder/build/xtensa-lx60--uclibc--bleeding-edge-2022.08-1/bin:/builds/buildroot.org/toolchains-builder/build/xtensa-lx60--uclibc--bleeding-edge-2022.08-1/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
PKG_CONFIG="/builds/buildroot.org/toolchains-builder/build/xtensa-lx60--uclibc--bleeding-edge-2022.08-1/bin/pkg-config"
PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
PKG_CONFIG_LIBDIR="/builds/buildroot.org/toolchains-builder/build/xtensa-lx60--uclibc--bleeding-edge-2022.08-1/lib/pkgconfig:/builds/buildroot.org/toolchains-builder/build/xtensa-lx60--uclibc--bleeding-edge-2022.08-1/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/builds/buildroot.org/toolchains-builder/build/xtensa-lx60--uclibc--bleeding-edge-2022.08-1/include"
CFLAGS="-O2
-I/builds/buildroot.org/toolchains-builder/build/xtensa-lx60--uclibc--bleeding-edge-2022.08-1/include"
CXXFLAGS="-O2
-I/builds/buildroot.org/toolchains-builder/build/xtensa-lx60--uclibc--bleeding-edge-2022.08-1/include"
LDFLAGS="-L/builds/buildroot.org/toolchains-builder/build/xtensa-lx60--uclibc--bleeding-edge-2022.08-1/lib
-Wl,-rpath,/builds/buildroot.org/toolchains-builder/build/xtensa-lx60--uclibc--bleeding-edge-2022.08-1/lib"
INTLTOOL_PERL=/usr/bin/perl CFLAGS="-O2
-I/builds/buildroot.org/toolchains-builder/build/xtensa-lx60--uclibc--bleeding-edge-2022.08-1/include"
LDFLAGS="-L/builds/buildroot.org/toolchains-builder/build/xtensa-lx60--uclibc--bleeding-edge-2022.08-1/lib
-Wl,-rpath,/builds/buildroot.org/toolchains-builder/build/xtensa-lx60--uclibc--bleeding-edge-2022.08-1/lib"
 CONFIG_SITE=/dev/null ./configure
--prefix="/builds/buildroot.org/toolchains-builder/build/xtensa-lx60--uclibc--bleeding-edge-2022.08-1"
--sysconfdir="/builds/buildroot.org/toolchains-builder/build/xtensa-lx60--uclibc--bleeding-edge-2022.08-1/etc"
--localstatedir="/builds/buildroot.org/toolchains-builder/build/xtensa-lx60--uclibc--bleeding-edge-2022.08-1/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=xtensa-buildroot-linux-uclibc --enable-static --without-uiout
--disable-gdbtk --without-x --enable-threads --disable-werror
--without-included-gettext --with-curses --without-mpfr --disable-binutils
--disable-install-libbfd --disable-ld --disable-gas --disable-gprof
--enable-tui
--with-python=/builds/buildroot.org/toolchains-builder/build/xtensa-lx60--uclibc--bleeding-edge-2022.08-1/bin/python3
--disable-sim )

Full build log available at
https://gitlab.com/buildroot.org/toolchains-builder/-/jobs/2875280883/artifacts/file/build/xtensa-lx60--uclibc--bleeding-edge-2022.08-1-build.log

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug compile/29484] gdb 12.1 fails to build on xtensa: undefined reference to `xtensa_tdep'
  2022-08-13 20:13 [Bug compile/29484] New: gdb 12.1 fails to build on xtensa: undefined reference to `xtensa_tdep' thomas.petazzoni at bootlin dot com
@ 2022-08-13 20:15 ` thomas.petazzoni at bootlin dot com
  2022-08-14  1:55 ` simark at simark dot ca
  2022-08-14  7:50 ` thomas.petazzoni at bootlin dot com
  2 siblings, 0 replies; 4+ messages in thread
From: thomas.petazzoni at bootlin dot com @ 2022-08-13 20:15 UTC (permalink / raw)
  To: gdb-prs

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

Thomas Petazzoni <thomas.petazzoni at bootlin dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jcmvbkbc at gcc dot gnu.org

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug compile/29484] gdb 12.1 fails to build on xtensa: undefined reference to `xtensa_tdep'
  2022-08-13 20:13 [Bug compile/29484] New: gdb 12.1 fails to build on xtensa: undefined reference to `xtensa_tdep' thomas.petazzoni at bootlin dot com
  2022-08-13 20:15 ` [Bug compile/29484] " thomas.petazzoni at bootlin dot com
@ 2022-08-14  1:55 ` simark at simark dot ca
  2022-08-14  7:50 ` thomas.petazzoni at bootlin dot com
  2 siblings, 0 replies; 4+ messages in thread
From: simark at simark dot ca @ 2022-08-14  1:55 UTC (permalink / raw)
  To: gdb-prs

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

Simon Marchi <simark at simark dot ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |simark at simark dot ca

--- Comment #1 from Simon Marchi <simark at simark dot ca> ---
I tried to reproduce (using the xtensa-lx60--uclibc--bleeding-edge-2021.11-1
toolchain), but I get these errors:

dwarf2/index-write.o: in function `std::vector<unsigned char,
gdb::default_init_allocator<unsigned char, std::allocator<unsigned char> >
>::resize(unsigned int)':                                
/home/simark/Downloads/xtensa-lx60--uclibc--bleeding-edge-2021.11-1/xtensa-buildroot-linux-uclibc/include/c++/11.2.0/bits/stl_vector.h:940:(.text+0x405):
dangerous relocation: call8: call target
 out of range:
_ZNSt6vectorIhN3gdb22default_init_allocatorIhSaIhEEEE17_M_default_appendEj

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug compile/29484] gdb 12.1 fails to build on xtensa: undefined reference to `xtensa_tdep'
  2022-08-13 20:13 [Bug compile/29484] New: gdb 12.1 fails to build on xtensa: undefined reference to `xtensa_tdep' thomas.petazzoni at bootlin dot com
  2022-08-13 20:15 ` [Bug compile/29484] " thomas.petazzoni at bootlin dot com
  2022-08-14  1:55 ` simark at simark dot ca
@ 2022-08-14  7:50 ` thomas.petazzoni at bootlin dot com
  2 siblings, 0 replies; 4+ messages in thread
From: thomas.petazzoni at bootlin dot com @ 2022-08-14  7:50 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #2 from Thomas Petazzoni <thomas.petazzoni at bootlin dot com> ---
Here is how to reproduce:

$ git clone -b toolchains.bootlin.com-2022.08
https://github.com/bootlin/buildroot-toolchains.git
$ cat > .config
BR2_xtensa=y
BR2_XTENSA_CUSTOM=y
BR2_XTENSA_OVERLAY_FILE="https://github.com/jcmvbkbc/xtensa-toolchain-build/raw/95291b7c39e6f790d0b2f062c945a630290f2c81/overlays/xtensa_dc233c.tar.gz"
BR2_KERNEL_HEADERS_5_4=y
BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
BR2_PTHREAD_DEBUG=y
BR2_BINUTILS_VERSION_2_39_X=y
BR2_BINUTILS_GPROFNG=y
BR2_GCC_VERSION_12_X=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_TOOLCHAIN_BUILDROOT_FORTRAN=y
BR2_GCC_ENABLE_OPENMP=y
BR2_PACKAGE_HOST_GDB=y
BR2_PACKAGE_HOST_GDB_TUI=y
BR2_PACKAGE_HOST_GDB_PYTHON3=y
BR2_GDB_VERSION_12=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_GDB=y
# BR2_TARGET_ROOTFS_TAR is not set
^D
$ make olddefconfig
$ make
[...]
  CXX    init.o
  CXXLD  gdb
/usr/bin/ld: xtensa-tdep.o: in function `xtensa_gdbarch_init(gdbarch_info,
gdbarch_list*)':
xtensa-tdep.c:(.text+0x2c46): undefined reference to `xtensa_tdep'
/usr/bin/ld: xtensa-tdep.c:(.text+0x2c65): undefined reference to `xtensa_tdep'
/usr/bin/ld: xtensa-tdep.c:(.text+0x2c6c): undefined reference to `xtensa_tdep'
/usr/bin/ld: xtensa-tdep.c:(.text+0x2c85): undefined reference to `xtensa_tdep'
/usr/bin/ld: xtensa-tdep.c:(.text+0x2c9a): undefined reference to `xtensa_tdep'
/usr/bin/ld: xtensa-tdep.o:xtensa-tdep.c:(.text+0x2ca9): more undefined
references to `xtensa_tdep' follow
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:1904: gdb] Error 1
make[3]: *** [Makefile:11455: all-gdb] Error 2
make[2]: *** [Makefile:1001: all] Error 2
make[1]: *** [package/pkg-generic.mk:293:
/home/thomas/buildroot/buildroot-toolchains/output/build/host-gdb-12.1/.stamp_built]
Error 2
make: *** [Makefile:84: _all] Error 2

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-08-14  7:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-13 20:13 [Bug compile/29484] New: gdb 12.1 fails to build on xtensa: undefined reference to `xtensa_tdep' thomas.petazzoni at bootlin dot com
2022-08-13 20:15 ` [Bug compile/29484] " thomas.petazzoni at bootlin dot com
2022-08-14  1:55 ` simark at simark dot ca
2022-08-14  7:50 ` thomas.petazzoni at bootlin dot com

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).