Some of you might have already encountered this error when trying to build glibc or any other package which has dependency on glibc.
error: GNU libiconv not in use but included iconv.h is from libiconv
I recently got this error in multiple projects which had glibc build dependency. In fact glibc is a universal package, most things (everything?) relies on the standard C library eventually. I believe quite a lot of people are going to see this problem at least once.
First time I got this error when I was trying to add a package into my Buildroot environment which had direct dependency on glibc. Another day the same error appeared when I was making “sato” image using Yocto/Poky project. Both times my build system was an Ubuntu 12.04.4 LTS server machine. I spent lot of time debugging in my projects to find any configuration or recipe problem, but ended up finding a strange problem. My Ubuntu system has both libiconv and iconv provided by glibc. It had two different ‘iconv.h’ files,
‘/usr/include/iconv.h’ (glibc) and ‘/usr/local/include/iconv.h’ (GNU libiconv). Ubuntu is a distribution which relies on glibc implementation of iconv, that is the reason it does not provide a libiconv package. But some how a partial installation of ‘libiconv’ was present on the server. I renamed ‘/usr/local/include/iconv.h’ and ‘/usr/local/bin/iconv’ and that solved the glibc error in both projects.