[Buildroot] undefined reference to __stack_chk_fail_local

Cyb3r H3r0 alaglevelcyb0rg at gmail.com
Mon Jul 18 07:27:04 UTC 2022


Hello All,

While compiling buildroot-2022.02.3, the compilation failed due to several
undefined references to __stack_chk_fail_local. The target toolchain used
is glibc itself. Here are more details

ar cr libdmalloc.a append.o arg_check.o compat.o dmalloc_rand.o
dmalloc_tab.o env.o heap.o chunk.o error.o user_malloc.o
ar cr libdmallocth.a append.o arg_check.o compat.o dmalloc_rand.o
dmalloc_tab.o env.o heap.o chunk_th.o error_th.o user_malloc_th.o
/home/ubuntu/buildroot-2022.02.3/output/host/bin/i686-buildroot-linux-gnu-gcc-ranlib
libdmalloc.a
/home/ubuntu/buildroot-2022.02.3/output/host/bin/i686-buildroot-linux-gnu-gcc-ranlib
libdmallocth.a
rm -f libdmalloc.so libdmalloc.so.t
/home/ubuntu/buildroot-2022.02.3/output/host/bin/i686-buildroot-linux-gnu-ld
-shared --whole-archive -soname libdmalloc.so -o libdmalloc.so.t
libdmalloc.a
rm -f libdmallocth.so libdmallocth.so.t
/home/ubuntu/buildroot-2022.02.3/output/host/bin/i686-buildroot-linux-gnu-ld
-shared --whole-archive -soname libdmallocth.so -o libdmallocth.so.t
libdmallocth.a
/home/ubuntu/buildroot-2022.02.3/output/host/bin/i686-buildroot-linux-gnu-ld:
libdmalloc.a(append.o): in function `append_long':
append.c:(.text+0xbc): undefined reference to `__stack_chk_fail_local'
/home/ubuntu/buildroot-2022.02.3/output/host/bin/i686-buildroot-linux-gnu-ld:
libdmalloc.a(append.o): in function `append_ulong.localalias':
append.c:(.text+0x15d): undefined reference to `__stack_chk_fail_local'
/home/ubuntu/buildroot-2022.02.3/output/host/bin/i686-buildroot-linux-gnu-ld:
libdmalloc.a(append.o): in function `append_vformat':
append.c:(.text+0x6d9): undefined reference to `__stack_chk_fail_local'
/home/ubuntu/buildroot-2022.02.3/output/host/bin/i686-buildroot-linux-gnu-ld:
libdmalloc.a(append.o): in function `loc_vfprintf':
append.c:(.text+0x7d3): undefined reference to `__stack_chk_fail_local'
/home/ubuntu/buildroot-2022.02.3/output/host/bin/i686-buildroot-linux-gnu-ld:
libdmalloc.a(dmalloc_tab.o): in function `table_find':
dmalloc_tab.c:(.text+0x2d6): undefined reference to `__stack_chk_fail_local'
/home/ubuntu/buildroot-2022.02.3/output/host/bin/i686-buildroot-linux-gnu-ld:
libdmalloc.a(dmalloc_tab.o):dmalloc_tab.c:(.text+0x8d7): more undefined
references to `__stack_chk_fail_local' follow
/home/ubuntu/buildroot-2022.02.3/output/host/bin/i686-buildroot-linux-gnu-ld:
libdmallocth.a(append.o)make[2]: *** [Makefile:302: libdmalloc.so] Error 1
: in function `append_long':
append.c:(make[2]: *** Waiting for unfinished jobs....
.text+0xbc): undefined reference to `__stack_chk_fail_local'
/home/ubuntu/buildroot-2022.02.3/output/host/bin/i686-buildroot-linux-gnu-ld:
libdmallocth.a(append.o): in function `append_ulong.localalias':
append.c:(.text+0x15d): undefined reference to `__stack_chk_fail_local'
/home/ubuntu/buildroot-2022.02.3/output/host/bin/i686-buildroot-linux-gnu-ld:
libdmallocth.a(append.o): in function `append_vformat':
append.c:(.text+0x6d9): undefined reference to `__stack_chk_fail_local'
/home/ubuntu/buildroot-2022.02.3/output/host/bin/i686-buildroot-linux-gnu-ld:
libdmallocth.a(append.o): in function `loc_vfprintf':
append.c:(.text+0x7d3): undefined reference to `__stack_chk_fail_local'
/home/ubuntu/buildroot-2022.02.3/output/host/bin/i686-buildroot-linux-gnu-ld:
libdmallocth.a(dmalloc_tab.o): in function `table_find':
dmalloc_tab.c:(.text+0x2d6): undefined reference to `__stack_chk_fail_local'
/home/ubuntu/buildroot-2022.02.3/output/host/bin/i686-buildroot-linux-gnu-ld:
libdmallocth.a(dmalloc_tab.o):dmalloc_tab.c:(.text+0x8d7): more undefined
references to `__stack_chk_fail_local' follow
make[2]: *** [Makefile:315: libdmallocth.so] Error 1
make[1]: *** [package/pkg-generic.mk:293:
/home/ubuntu/buildroot-2022.02.3/output/build/dmalloc-5.6.5/.stamp_built]
Error 2
make: *** [Makefile:84: _all] Error 2

I am also attaching the .config file for reference.

Warm Regards,
Cyb0rG
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildroot.org/pipermail/buildroot/attachments/20220718/9ffcd882/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config
Type: application/octet-stream
Size: 151963 bytes
Desc: not available
URL: <http://lists.buildroot.org/pipermail/buildroot/attachments/20220718/9ffcd882/attachment.obj>


More information about the buildroot mailing list