While running "emerge -e --with-bdeps=y @world" fails at Emerging (152 of 266) sys-libs/glibc-2.36-r5::gentoo Does glibc need a special make.conf that overrides the general portage one? Reproducible: Always
I can not post what I see on the xterm because the test is too long. see https://genunix.com/dclarke/linux/gentoo_sparcv9/202302270930.txt
The problem was the make.conf for portage wherein I wanted non-optimized binaries with debugging information and not stripped after the fact. When running "emerge -e --with-bdeps=y @world" the glibc build fails as it seems to need some gcc builtin stuff. Maybe. I will ask the sourceware people. The solution is to change the make.conf slightly : gentoo_cdrom# cat /mnt/gentoo/etc/portage/make.conf # These settings were set by the catalyst build script that automatically # built this stage. # Please consult /usr/share/portage/config/make.conf.example for a more # detailed example. # # glibc blows up with these flags # COMMON_FLAGS= -m64 -g -O0 -fno-builtin -fno-fast-math # -mno-app-regs -mcpu=ultrasparc -mtune=ultrasparc -mno-vis -pipe # FEATURES="nostrip" COMMON_FLAGS="-m64 -g -O0 -mcpu=ultrasparc -mtune=ultrasparc -mno-vis -pipe" ACCEPT_LICENSE="* -@EULA" CFLAGS="${COMMON_FLAGS}" CXXFLAGS="${COMMON_FLAGS}" FCFLAGS="${COMMON_FLAGS}" FFLAGS="${COMMON_FLAGS}" # WARNING: Changing your CHOST is not something that should be done lightly. # Please consult https://wiki.gentoo.org/wiki/Changing_the_CHOST_variable before changing. CHOST="sparc64-unknown-linux-gnu" # NOTE: This stage was built with the bindist Use flag enabled # This sets the language of build output to English. # Please keep this setting intact when reporting bugs. LC_MESSAGES=C # University of Waterloo GENTOO_MIRRORS="https://mirror.csclub.uwaterloo.ca/gentoo-distfiles/" gentoo_cdrom# That allows glibc to compile. After glibc is done I guess I can go back to the non-optimized CFLAGS with debug information.
Please attach a build log and provide emerge --info. Change the bug status back to UNCONFIRMED once this has been provided.
(In reply to Mike Gilbert from comment #3) > Please attach a build log and provide emerge --info. > Change the bug status back to UNCONFIRMED once this has been provided. Sorry but this "build log" ? where would that be ? in /var/log somewhere ?
The error message tells you where it is, it's in /var/tmp/portage/sys-libs/glibc*/temp/build.log. Also, -fno-builtin is dangerous, NOT an optimisation, and not sommething you should build glibc with.
(In reply to Sam James from comment #5) > The error message tells you where it is, it's in > /var/tmp/portage/sys-libs/glibc*/temp/build.log. > > Also, -fno-builtin is dangerous, NOT an optimisation, and not sommething you > should build glibc with. Your log (.txt) from xterm says: ``` * If you need support, post the output of `emerge --info '=sys-libs/glibc-2.36-r5::gentoo'`, * the complete build log and the output of `emerge -pqv '=sys-libs/glibc-2.36-r5::gentoo'`. * The complete build log is located at '/var/tmp/portage/sys-libs/glibc-2.36-r5/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-libs/glibc-2.36-r5/temp/environment'. * Working directory: '/var/tmp/portage/sys-libs/glibc-2.36-r5/work/build-sparc64-sparc64-unknown-linux-gnu-nptl' * S: '/var/tmp/portage/sys-libs/glibc-2.36-r5/work/glibc-2.36' ```
-O0 already disables optimizations, any flags you add on top of that are either redundant or dangerous. glibc cannot be built without optimizations and the ebuild will bump the opt level to 1 in that case. your best bet for debugging is -Og -ggdb3.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7386333115feaee9a8bf6ab314b0106ba77f196 commit f7386333115feaee9a8bf6ab314b0106ba77f196 Author: Sam James <sam@gentoo.org> AuthorDate: 2023-02-28 03:33:23 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-02-28 03:33:23 +0000 sys-libs/glibc: filter -fno-builtin Makes no sense for glibc, as it's the thing providing the non-builtins. Closes: https://bugs.gentoo.org/898098 Signed-off-by: Sam James <sam@gentoo.org> sys-libs/glibc/glibc-2.36-r7.ebuild | 3 +++ sys-libs/glibc/glibc-2.37.ebuild | 3 +++ sys-libs/glibc/glibc-9999.ebuild | 3 +++ 3 files changed, 9 insertions(+)