Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 629880 - media-sound/mpd-0.20.10 autoconfig check picks up host system's boost include path
Summary: media-sound/mpd-0.20.10 autoconfig check picks up host system's boost include...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-04 12:59 UTC by Matthias Gerstner
Modified: 2017-12-12 17:30 UTC (History)
3 users (show)

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


Attachments
suggested patch (0001-fix-mpd-boost-check.patch,1.14 KB, patch)
2017-09-04 13:04 UTC, Matthias Gerstner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Gerstner 2017-09-04 12:59:19 UTC
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.
Comment 1 Matthias Gerstner 2017-09-04 13:04:19 UTC
Created attachment 492254 [details, diff]
suggested patch

explicitly pass boost include path to configure to fix the issue
Comment 2 Fabian Groffen gentoo-dev 2017-09-12 18:48:14 UTC
@maintainers: could you please have a look at Matthias' patch?
Comment 3 Larry the Git Cow gentoo-dev 2017-12-12 17:30:47 UTC
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(+)