Emerging fails with the following error lines: /opt/gcc/4.6.1/usr/bin/gcc -DHAVE_CONFIG_H -I. -DPKG_CONFIG_PC_PATH="\"/data/zdv/prefix/usr/lib/pkgconfig:/data/zdv/prefix/usr/share/pkgconfig\"" -DPKG_CONFIG_SYSTEM_INCLUDE_PATH="\"/usr/include\"" -DPKG_CONFIG_SYSTEM_LIBRARY_PATH="\"/usr/lib\"" -I/data/zdv/prefix/usr/include/glib-2.0 -I/data/zdv/prefix/usr/lib/glib-2.0/include -O2 -pipe -fomit-frame-pointer -c main.c main.c:27:18: fatal error: popt.h: No such file or directory compilation terminated. make[2]: *** [main.o] Error 1 make[2]: *** Waiting for unfinished jobs.... parse.c:31:18: fatal error: popt.h: No such file or directory compilation terminated. make[2]: *** [parse.o] Error 1 make[2]: Leaving directory `/tmp/prefix/portage/dev-util/pkgconfig-0.26/work/pkg-config-0.26' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/tmp/prefix/portage/dev-util/pkgconfig-0.26/work/pkg-config-0.26' make: *** [all] Error 2 * ERROR: dev-util/pkgconfig-0.26 failed (compile phase): * emake failed As you can see, there are some unprefixified include and library paths in the compiler line. When I check the generated Makefile, there are some lines that seem to be generating these paths: oldincludedir = /usr/include system_include_path = /usr/include system_library_path = /usr/lib and INCLUDES = \ -DPKG_CONFIG_PC_PATH="\"$(pc_path)\"" \ -DPKG_CONFIG_SYSTEM_INCLUDE_PATH="\"$(system_include_path)\"" \ -DPKG_CONFIG_SYSTEM_LIBRARY_PATH="\"$(system_library_path)\"" \ -I/data/zdv/prefix/usr/include/glib-2.0 -I/data/zdv/prefix/usr/lib/glib-2.0/include \ $(popt_includes) I wonder why it succeeded to build before and why no one else seems to be having the issue... :[ Reproducible: Always
Created attachment 294315 [details] build.log
Created attachment 294317 [details] emerge --info =dev-util/pkgconfig-0.26
Is this a gcc compiled with USE=vanilla ?
configure invents these, I passed the right values in the ebuild now, but I doubt that fixes your compilation issue. Is popt installed?
from configure run: checking for default search path for .pc files... ${libdir}/pkgconfig:${datadir}/pkgconfig checking for --with-system-include-path... /usr/include checking for --with-system-library-path... /usr/lib
(In reply to comment #3) > Is this a gcc compiled with USE=vanilla ? In fact, it is the gcc from the host system, so you could assume that it is vanilla... I know that this isn't appreciated and maybe not even supported, but popt is installed in $EPREFIX. $EPREFIX/usr/include/popt.h exists, The paths are correct now: checking for --with-system-include-path... /data/zdv/prefix/usr/include checking for --with-system-library-path... /data/zdv/prefix/usr/lib but the error is still the same (although the paths are specified as -Ds.)... gcc -DHAVE_CONFIG_H -I. -DPKG_CONFIG_PC_PATH="\"/data/zdv/prefix/usr/lib/pkgconfig:/data/zdv/prefix/usr/share/pkgconfig\"" -DPKG_CONFIG_SYSTEM_INCLUDE_PATH="\"/data/zdv/prefix/usr/include\"" -DPKG_CONFIG_SYSTEM_LIBRARY_PATH="\"/data/zdv/prefix/usr/lib\"" -I/data/zdv/prefix/usr/include/glib-2.0 -I/data/zdv/prefix/usr/lib/glib-2.0/include -O2 -pipe -fomit-frame-pointer -c main.c main.c:27:18: fatal error: popt.h: No such file or directory But I'm wondering, why the Paths aren't set as -I variables? If I set CPATH=$EPREFIX/usr/include, it compiles!
With your host-gcc you'll never be able to correctly merge in Gentoo Prefix. You can try and set CPPFLAGS and LDFLAGS, but that still is no guarantee.
Use the Prefix toolchain, it has a good reason to be there.