You are not logged in.
Hello, I'm trying to build glibc with debugging information using the ABS.
gcc 8.2.1+20181127-1, glibc 2.28-6
Checkout glibc package:
asp checkout glibc
cd glibc/trunk
Edit PKGBUILD, adding debug option:
options=(debug !strip staticlibs)
Build packge:
MAKEFLAGS="-j16" makepkg -s
On two different systems (same packages, one is just a VM), this eventually fails:
gcc -D_FORTIFY_SOURCE=2 -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -nostdlib -nostartfiles -shared -o /home/chaos/build/glibc/trunk/src/glibc-build/elf/ld.so.new \
-Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both -Wl,-z,defs -Wl,-z,now \
/home/chaos/build/glibc/trunk/src/glibc-build/elf/librtld.os -Wl,--version-script=/home/chaos/build/glibc/trunk/src/glibc-build/ld.map \
-Wl,-soname=ld-linux-x86-64.so.2 \
-Wl,-defsym=_begin=0
/usr/bin/ld: /home/chaos/build/glibc/trunk/src/glibc-build/elf/librtld.os: in function `memcpy':
/usr/src/debug/glibc/elf/../string/bits/string_fortified.h:34: undefined reference to `__memcpy_chk'
/usr/bin/ld: /usr/src/debug/glibc/elf/../string/bits/string_fortified.h:34: undefined reference to `__memcpy_chk'
/usr/bin/ld: /usr/src/debug/glibc/elf/../string/bits/string_fortified.h:34: undefined reference to `__memcpy_chk'
/usr/bin/ld: /usr/src/debug/glibc/elf/../string/bits/string_fortified.h:34: undefined reference to `__memcpy_chk'
/usr/bin/ld: /usr/src/debug/glibc/elf/../string/bits/string_fortified.h:34: undefined reference to `__memcpy_chk'
collect2: error: ld returned 1 exit status
The best I can gather, this may have something to do with _FORTIFY_SOURCE? Is this an upstream problem with glibc's build scripts? Should I try building an older version of glibc?
EDIT: glibc builds successfully without the debug option
Last edited by ChaoticEnigma (2019-04-23 00:15:55)
Offline
I am unable to reproduce the issue using `extra-x86_64-build` from devtools.
glibc 2.28-6 with options=(debug !strip staticlibs)
Note I stopped the build when it reached check succesfully.
Offline
Thanks for pointing me in the right direction with the extra-x86_64-build script. I was eventually able to get the debug package to build by building it in a chroot.
In case anyone else finds this thread, I basically followed this page on the wiki:
https://wiki.archlinux.org/index.php/De … ean_chroot
Offline