Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 194148 - mplayer-1.0_rc1_p20070927-r1 does not build on fbsd with mga video card
Summary: mplayer-1.0_rc1_p20070927-r1 does not build on fbsd with mga video card
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: All FreeBSD
: High normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-28 23:01 UTC by Joe Peterson (RETIRED)
Modified: 2007-10-10 04:22 UTC (History)
1 user (show)

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


Attachments
Build log (build.log,53.71 KB, text/plain)
2007-09-28 23:02 UTC, Joe Peterson (RETIRED)
Details
mplayer-1.0_rc1_p20070927-r1.ebuild (mplayer-1.0_rc1_p20070927-r1.ebuild.diff,2.22 KB, patch)
2007-09-29 17:44 UTC, Joe Peterson (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Peterson (RETIRED) gentoo-dev 2007-09-28 23:01:27 UTC
Stating with mplayer-1.0_rc1_p20070927, the build seems to depend on a linux include file:

vo_mga.c:19:22: error: linux/fb.h: No such file or directory

(see attachment for full build log)

This is specific to when you have "mga" in VIDEO_CARDS.
Comment 1 Joe Peterson (RETIRED) gentoo-dev 2007-09-28 23:02:05 UTC
Created attachment 132137 [details]
Build log
Comment 2 Joe Peterson (RETIRED) gentoo-dev 2007-09-29 00:49:54 UTC
The problem is that the newer ebuilds explicitly enable mga video output by doing the following:

	use video_cards_mga && myconf="${myconf} --enable-mga"
	( use X && use video_cards_mga ) && myconf="${myconf} --enable-xmga"

whereas the older builds did not:

	use video_cards_mga || myconf="${myconf} --disable-mga"
	( use X && use video_cards_mga ) || myconf="${myconf} --disable-xmga"

The video output lib has many references to linux include dirs, so for now, we need to be able to disable compiling in video output support.  Can we have a new local use flag to enable video output?  This way, we can mask that flag on platforms like bsd where this is not ported yet.

(Correction: this is NOT a regression starting with mplayer-1.0_rc1_p20070927, but in the current tree, it fails starting with mplayer-1.0_rc1_p20070824.)
Comment 3 Steve Dibb (RETIRED) gentoo-dev 2007-09-29 02:12:22 UTC
(In reply to comment #2)
> The problem is that the newer ebuilds explicitly enable mga video output by
> doing the following:
> 
>         use video_cards_mga && myconf="${myconf} --enable-mga"
>         ( use X && use video_cards_mga ) && myconf="${myconf} --enable-xmga"
> 
> whereas the older builds did not:
> 
>         use video_cards_mga || myconf="${myconf} --disable-mga"
>         ( use X && use video_cards_mga ) || myconf="${myconf} --disable-xmga"

That's because the configuration argument changed, not because we're suddenly flipping it around.

'xmga' is still autodetect, so we can go back to letting it do that.  'mga' though needs to be forcibly enabled, since it will disable by default.

> The video output lib has many references to linux include dirs, so for now, we
> need to be able to disable compiling in video output support.  Can we have a
> new local use flag to enable video output?  This way, we can mask that flag on
> platforms like bsd where this is not ported yet.

Well, you could *probably* use use_video_mga as the use flag to mask it on, but I gather the QA police would hunt me down.
Comment 4 Joe Peterson (RETIRED) gentoo-dev 2007-09-29 02:21:58 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > The problem is that the newer ebuilds explicitly enable mga video output by
> > doing the following:
> > 
> >         use video_cards_mga && myconf="${myconf} --enable-mga"
> >         ( use X && use video_cards_mga ) && myconf="${myconf} --enable-xmga"
> > 
> > whereas the older builds did not:
> > 
> >         use video_cards_mga || myconf="${myconf} --disable-mga"
> >         ( use X && use video_cards_mga ) || myconf="${myconf} --disable-xmga"
> 
> That's because the configuration argument changed, not because we're suddenly
> flipping it around.

I guess it was disabled by default before, then, so I guess the --disable didn't really make a difference.

> 'xmga' is still autodetect, so we can go back to letting it do that.  'mga'
> though needs to be forcibly enabled, since it will disable by default.

In either case, I think there should be a way to suppress both, since the code for video output isn't ported to non-linux (at least AFAIK).

> > The video output lib has many references to linux include dirs, so for now, we
> > need to be able to disable compiling in video output support.  Can we have a
> > new local use flag to enable video output?  This way, we can mask that flag on
> > platforms like bsd where this is not ported yet.
> 
> Well, you could *probably* use use_video_mga as the use flag to mask it on, but
> I gather the QA police would hunt me down.

Why not add a new flag, "vidout", and do:

    ( use vidout && use video_cards_mga ) && myconf="${myconf} --enable-mga"
    ( use vidout && use X && use video_cards_mga ) && myconf="${myconf} --enable-xmga"

Or you could auto-detect xmga, but only if vidout is set.  This probably applies to other video cards as well that use libvo.

This way, if an arch not supporting libvo masks vidout, their build can succeed.
Comment 5 Joe Peterson (RETIRED) gentoo-dev 2007-09-29 17:44:19 UTC
Created attachment 132185 [details, diff]
mplayer-1.0_rc1_p20070927-r1.ebuild

Here's a possible way to patch the ebuild.  What I did was look at which vo_*.c files in libvo attempt to include files from /usr/include/linux.
Comment 6 Joe Peterson (RETIRED) gentoo-dev 2007-09-29 17:51:13 UTC
...note that to be more consistent, it might be better to disable every video output option (i.e. even the ones where no explicit linux include is referenced) when vidout is not set.
Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2007-09-29 18:09:40 UTC
(In reply to comment #4)
> > >         use video_cards_mga && myconf="${myconf} --enable-mga"
> > >         ( use X && use video_cards_mga ) && myconf="${myconf} > Why not add a new flag, "vidout", and do:
>     ( use vidout && use video_cards_mga ) && myconf="${myconf} --enable-mga"
>     ( use vidout && use X && use video_cards_mga ) && myconf="${myconf}
> --enable-xmga"

I'm not a fan of adding yet another useless USE flag when we could use something like:

use kernel_linux && use video_cards_mga && myconf="${myconf} --enable-mga"
use kernel_linux && use X && use video_cards_mga && myconf="${myconf} --enable-xmga"

Which would be transparent to users..

(I haven't tested it but this is what e.g. media-libs/libgii does) 
Comment 8 Steve Dibb (RETIRED) gentoo-dev 2007-09-29 19:32:26 UTC
(In reply to comment #7)
> (In reply to comment #4)
> > > >         use video_cards_mga && myconf="${myconf} --enable-mga"
> > > >         ( use X && use video_cards_mga ) && myconf="${myconf} > Why not add a new flag, "vidout", and do:
> >     ( use vidout && use video_cards_mga ) && myconf="${myconf} --enable-mga"
> >     ( use vidout && use X && use video_cards_mga ) && myconf="${myconf}
> > --enable-xmga"
> 
> I'm not a fan of adding yet another useless USE flag when we could use
> something like:
> 
> use kernel_linux && use video_cards_mga && myconf="${myconf} --enable-mga"
> use kernel_linux && use X && use video_cards_mga && myconf="${myconf}
> --enable-xmga"
> 
> Which would be transparent to users..
> 
> (I haven't tested it but this is what e.g. media-libs/libgii does) 
> 

I like drac's idda, and thanks for the original patch, but we cant add a 'vidout' flag, since mga is one of only many video out options.  mga would be more appopriate.
Comment 9 Joe Peterson (RETIRED) gentoo-dev 2007-09-29 21:20:42 UTC
Sure, drac's idea works for me.  I understand about the USE flag, but you couldn't use mga, since someone with a Matrox card will always want to mga set in order to pick up the Matrox X drivers and other stuff.  It's used for things other than mplayer.

So yeah, I'd go for drac's idea.
Comment 10 Steve Dibb (RETIRED) gentoo-dev 2007-10-10 04:22:56 UTC
Fixed in rc2