| Summary: | GDB will not build | ||
|---|---|---|---|
| Product: | buildroot | Reporter: | Roland Franke <fli4l> |
| Component: | Other | Assignee: | unassigned |
| Status: | RESOLVED MOVED | ||
| Severity: | normal | CC: | buildroot, yann.morin.1998 |
| Priority: | P5 | ||
| Version: | 2024.02 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
|
Description
Roland Franke
2024-03-16 16:31:41 UTC
Here are some additional information: The host is a x86_64 system. But i will try to cross-compile for a x86_64 but also for x86 (i586) systems. Now the build from GDB (Host-GDB) for the x86 (i586) system will still fail also when i have include the first named patch. I will get as error: /home/roland/.fbr/fbr-4.0-test_1_2024-x86/buildroot/output/per-package/gdb/host/bin/../lib/gcc/i586-buildroot-linux-uclibc/13.2.0/../../../../i586-buildroot-linux-uclibc/bin/ld: ../gdbsupport/libgdbsupport.a(common-exceptions.o): non-canonical reference to canonical protected function `__pthread_key_create' in /home/roland/.fbr/fbr-4.0-test_1_2024-x86/buildroot/output/per-package/gdb/host/i586-buildroot-linux-uclibc/sysroot/lib/libc.so.1 /home/roland/.fbr/fbr-4.0-test_1_2024-x86/buildroot/output/per-package/gdb/host/bin/../lib/gcc/i586-buildroot-linux-uclibc/13.2.0/../../../../i586-buildroot-linux-uclibc/bin/ld: failed to set dynamic section sizes: bad value collect2: error: ld returned 1 exit status any suggestion what is here to do? Maybe the patch will not work in all situations? Sorry for the latest information. Have just seen that i have for my x86(i586) used the GCC 13.2.0 and not the same version (GCC 12.3.0) as used for the x86_64 build. But this tell us, that also for GCC 13.2.0 the identical patch 0004-libgcc-Exclude-UCLIBC-from-GLIBC-thread-check.patch what is used for GCC 12.3.0 is need there also. Maybe by version GCC 11.4.0 also. The background for the named pach come from: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111322 From there are the information taken to patch the build of GCC. Please read '22.6. Reporting issues/bugs or getting help' ([1]) and '8.2. Understanding when a full rebuild is necessary' ([2]), please try to provide and (minimal) .config or defconfig file reproducing your failure on a complete build (e.g. 'make clean && make gdb')... Which toolchain? Another reference to the mentioned patch, see [3]... [1] https://buildroot.org/downloads/manual/manual.html#reporting-bugs [2] https://buildroot.org/downloads/manual/manual.html#full-rebuild [3] https://github.com/crosstool-ng/crosstool-ng/blob/master/packages/gcc/13.2.0/0013-libgcc-Exclude-UCLIBC-from-GLIBC-thread-check.patch Hello, sorry for my mistake. As already written will i work with a Debian 11 (Bullseye) X86_64 host. There will be the standard-version of GCC, C++, and all other need packages installed. I will work here with the buildroot 2024.02 Version what is the actually official version. I will be build ing here with uClibc and GCC (Not musl) .I have here a few additional packages installed, but the main packages be complete the identical version as come with the 2024.02 version. Note that i normal work with BR2_PER_PACKAGE_DIRECTORY=y With this the complete build (without GDB (Host and target) will run fine. As soon as i activate the GDB should be build (Can be at last as additional build, but also after an complete clean and also with only GDB to build) i will running into the error given in the first information. After a while of search i have found the official patch for GCC as informed in the note from 18.03.2024, what is the identical one as you have informed in your link [3]. It was suggested at least only as information that this build will fail here and that the patch has solved my problem. So that it will be in your hands, if you accept that and made an official patch for buildroot (Till sometime GCC will patch the system self and the patch here by buildroot went to not longer need. If you not accept that, it will be also ok for me, as i had my system at work. The build failed by me in the configuration: BR2_ARCH_HAS_TOOLCHAIN_BUILDROOT=y BR2_ARCH="x86_64" BR2_NORMALIZED_ARCH="x86_64" BR2_ENDIAN="LITTLE" BR2_GCC_TARGET_ARCH="nocona" BR2_BINFMT_SUPPORTS_SHARED=y BR2_READELF_ARCH_NAME="Advanced Micro Devices X86-64" BR2_X86_CPU_HAS_MMX=y BR2_X86_CPU_HAS_SSE=y BR2_X86_CPU_HAS_SSE2=y BR2_X86_CPU_HAS_SSE3=y BR2_x86_nocona=y BR2_TOOLCHAIN_BUILDROOT_UCLIBC=y BR2_KERNEL_HEADERS_6_1=y BR2_TOOLCHAIN_BUILDROOT_WCHAR=y BR2_PTHREAD_DEBUG=y BR2_TOOLCHAIN_BUILDROOT_USE_SSP=y BR2_BINUTILS_VERSION_2_40_X=y BR2_TOOLCHAIN_BUILDROOT_CXX=y BR2_CCACHE=y BR2_PER_PACKAGE_DIRECTORIES=y BR2_SSP_REGULAR=y BR2_RELRO_PARTIAL=y BR2_UCLIBC_TARGET_ARCH="x86_64" BR2_GCC_VERSION="12.3.0" BR2_GDB_VERSION="13.2" Do not tailor the configuration by hand, use 'make savedefconfig' instead, I doubt your given config reproduces the problem as neither BR2_PACKAGE_HOST_GDB nor BR2_PACKAGE_GDB are set... Problem not reproducable on openSUSE Tumbleweed with the following defconfig for me (using buildroot git master): BR2_x86_nocona=y BR2_TOOLCHAIN_BUILDROOT_UCLIBC=y BR2_KERNEL_HEADERS_6_1=y BR2_TOOLCHAIN_BUILDROOT_WCHAR=y BR2_PTHREAD_DEBUG=y BR2_TOOLCHAIN_BUILDROOT_USE_SSP=y BR2_BINUTILS_VERSION_2_40_X=y BR2_TOOLCHAIN_BUILDROOT_CXX=y BR2_PACKAGE_HOST_GDB=y BR2_CCACHE=y BR2_PER_PACKAGE_DIRECTORIES=y BR2_SSP_REGULAR=y BR2_RELRO_PARTIAL=y BR2_PACKAGE_GDB=y BR2_PACKAGE_GDB_SERVER=y BR2_PACKAGE_GDB_DEBUGGER=y Thank you for your report.
The issue tracker for the Buildroot project has been moved to
the Gitlab.com issue tracker:
https://gitlab.com/buildroot.org/buildroot/-/issues
We are taking this opportunity to close old issues in this old
tracker. If you believe your issue is still relevant, please
open one in the new issue tracker.
Thank you!
|