Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 392619 - dev-util/pkgconfig-0.26 fails building in prefix
Summary: dev-util/pkgconfig-0.26 fails building in prefix
Status: RESOLVED INVALID
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-30 14:22 UTC by Moritz Schlarb
Modified: 2011-12-03 20:02 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,9.78 KB, text/plain)
2011-11-30 14:24 UTC, Moritz Schlarb
Details
emerge --info =dev-util/pkgconfig-0.26 (build-info,3.75 KB, text/plain)
2011-11-30 14:24 UTC, Moritz Schlarb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Moritz Schlarb 2011-11-30 14:22:00 UTC
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
Comment 1 Moritz Schlarb 2011-11-30 14:24:06 UTC
Created attachment 294315 [details]
build.log
Comment 2 Moritz Schlarb 2011-11-30 14:24:24 UTC
Created attachment 294317 [details]
emerge --info =dev-util/pkgconfig-0.26
Comment 3 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2011-11-30 14:48:20 UTC
Is this a gcc compiled with USE=vanilla ?
Comment 4 Fabian Groffen gentoo-dev 2011-12-02 17:47:20 UTC
configure invents these, I passed the right values in the ebuild now, but I doubt that fixes your compilation issue.  Is popt installed?
Comment 5 Fabian Groffen gentoo-dev 2011-12-02 17:48:37 UTC
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
Comment 6 Moritz Schlarb 2011-12-03 19:57:36 UTC
(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!
Comment 7 Fabian Groffen gentoo-dev 2011-12-03 20:01:14 UTC
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.
Comment 8 Fabian Groffen gentoo-dev 2011-12-03 20:02:11 UTC
Use the Prefix toolchain, it has a good reason to be there.