When building media-sound/mpd on a prefix installation where the host also has boost libraries installed (i.e. headers in /usr/include/boost), the autoconf check (probably the one in `m4/ax_boost_base.m4`) picks up the host's boost include path instead of the one in the prefix. This leads to an additional include switch passed to the compiler '-I/usr/include' which will cause system headers of the host and the prefix to get mixed up resulting in compile errors. This bug is related to bug 629876 which causes the same behaviour in media-sound/mpd. I will attach a suggested patch for mpd which explicitly passed `--with-boost=` to point the autotools to the correct boost header location. This fixed the error for me. Reproducible: Always Steps to Reproduce: 1. emerge mpd (on a prefix installation where the host also has boost headers installed) Actual Results: mpd will fail to build, or at least additionally pass '-I/usr/include' to the compiler where it should not Expected Results: mpd should succeed to build, not passing '-I/usr/include' to the compiler. Also check BOOST_CPPFLAGS in config.log after calling configure for media-sound/mpd.
Created attachment 492254 [details, diff] suggested patch explicitly pass boost include path to configure to fix the issue
@maintainers: could you please have a look at Matthias' patch?
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d3ad96a836ec425fda6d6ed3088948165a65456 commit 2d3ad96a836ec425fda6d6ed3088948165a65456 Author: Matthias Gerstner <matthias.gerstner@suse.de> AuthorDate: 2017-09-04 12:30:13 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2017-12-12 17:30:28 +0000 media-sound/mpd: Fix mpd build on prefix profiles libmad recorded wrong pkgconfig cflags which caused configure in mpd to pick up an additional '-I /usr/include' which then broke because of mixing up std headers. Similarly the autoconf check for boost picks up the host system's /usr/include instead of the prefix's ${EPREFIX}/usr/include, leading to the same result as with libmad in the mpd build. An explicity --with-boost heals this. Closes: https://bugs.gentoo.org/629880 media-sound/mpd/mpd-0.20.12.ebuild | 1 + 1 file changed, 1 insertion(+)