I'm trying to build from the latest buildroot and encountered this problem:
/buildroot/output/host/bin/x86_64-buildroot-linux-gnu-gcc -nostdlib -nostartfiles -shared -o /buildroot/output/build/glibc-2.36-44-g2628500f5dff1dd99c49a09b418b3b1ea3a6b5d3/build/elf/ld.so.new \
-Wl,-z,relro -Wl,-z,defs \
-Wl,-z,pack-relative-relocs \
/buildroot/output/build/glibc-2.36-44-g2628500f5dff1dd99c49a09b418b3b1ea3a6b5d3/build/elf/librtld.os -Wl,--version-script=/buildroot/output/build/glibc-2.36-44-g2628500f5dff1dd99c49a09b418b3b1ea3a6b5d3/build/ld.map \
-Wl,-soname=ld-linux-x86-64.so.2 /buildroot/output/host/lib/gcc/x86_64-buildroot-linux-gnu/11.3.0/../../../../x86_64-buildroot-linux-gnu/bin/ld: /buildroot/output/build/glibc-2.36-44-g2628500f5dff1dd99c49a09b418b3b1ea3a6b5d3/build/elf/librtld.os: in function `_dl_start_profile': (.text+0x93c7): undefined reference to `strcpy'
I directly clone the buildroot repo and generate .config file using make qemu_x86_64_defconfig
.
After that I run sudo make -j$(nproc)
and encounter this error
My kernel version is Ubuntu 5.15.0-50-generic
, my gcc version is 11.2.0, and my glibc version is Ubuntu GLIBC 2.35-0ubuntu3.1
Can someone tell me how to fix this problem please?
Thanks
This has been fixed in the current Buildroot master through commit https://gitlab.com/buildroot.org/buildroot/-/commit/e548b7642ac14f2440427cb6ae11242680d3d935.
Indeed as suggested by @dimich, if you're new to Buildroot, don't use the master branch, but a release tag. Indeed, the master branch is being developed, and so we have changes that we know are not fully ready yet. The update of glibc to version 2.36 is one such example that has been causing quite a bit of breakage that we are progressively fixing.