I am having problems with the latest buildroot. If I take a stock buildroot checkout from git, run make menuconfig, then save and make, it compiles. If I then run make menuconfig, choose Kernel -> Kernel type -> linux (same version as Linux headers), then do a make, the build fails. The build fails when it tries to compile module-init-tools. The makefiles call /usr/lib/ccache/gcc, which fails saying "/usr/bin/ld: cannot find -lc". Please see attached build log.
Created attachment 1591 [details] Listing of build showing breakage.
The ccache setting was not changed, so it has the default value of unset. mjd@milhouse ~/src/buildroot $ grep CCACHE .config # BR2_CCACHE is not set # BR2_PACKAGE_CCACHE_TARGET is not set mjd@milhouse ~/src/buildroot $
This is because glibc static library is missing on the host. On Fedora "yum install glibc-static" solves this problem. However I admit that buildroot could check and report that you need to install it.
Interesting. Why is the host's static version of libc needed? (And thanks for the workaround)
Or looking a little higher up the cause-of-failure tree, why is module-init-tools being compiled with ccache (when it's turned off in the config)?
Hello buildroot guys, anyone had some time to look at this please?
Mitch, with the merge of the linux-cleanup work, the module-init-tools package has been upgraded and migrated to the autotools infrastructure. So it is possible that the problem you're seeing has been fixed. Can you give a try at the latest Buildroot git ?
(In reply to comment #7) > Mitch, with the merge of the linux-cleanup work, the module-init-tools package > has been upgraded and migrated to the autotools infrastructure. So it is > possible that the problem you're seeing has been fixed. > > Can you give a try at the latest Buildroot git ? Hi, I'm getting this error: make[2]: Entering directory `buildroot/output/build/host-module-init-tools-3.11/build' /usr/lib64/ccache/gcc -Ibuildroot/output/host/include -Ibuildroot/output/host/usr/include -Wunused -Wall -static -Lbuildroot/output/host/lib -Lbuildroot/output/host/usr/lib -Wl,-rpath,buildroot/output/host/usr/lib -o insmod.static insmod.o libmodtools.a /usr/bin/ld: cannot find -lc collect2: ld returned 1 exit status with git and ccache enabled , and yum install glibc-static , fixes the problem. but what should I do ? disable CCACHE or use glibc-static ?
(In reply to comment #8) > but what should I do ? disable CCACHE or use glibc-static ? short of us hacking the module-init-tools makefile, it is building a static version of insmod - So I would say install the glibc package.
The issue was in fact that glibc-static was missing on the user host system. We have added a FAQ entry in Buildroot documentation to document this. See http://git.buildroot.net/buildroot/commit/?id=706683b8b912aa3304d71652d7a4a74d8b74f58e