Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 300256 - GStreamer plugins fail to compile under multilib project
Summary: GStreamer plugins fail to compile under multilib project
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal with 1 vote (vote)
Assignee: GStreamer package maintainers
URL:
Whiteboard:
Keywords:
: 340535 (view as bug list)
Depends on:
Blocks: portage-multilib
  Show dependency tree
 
Reported: 2010-01-09 05:42 UTC by madcabbit
Modified: 2012-12-19 16:05 UTC (History)
7 users (show)

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


Attachments
media-libs/gst-plugins-x-0.10.25 build.log (build.log,19.17 KB, text/plain)
2010-01-09 05:44 UTC, madcabbit
Details
emerge --info =media-plugins/gst-plugins-x-0.10.25 (emerge-info.txt,5.37 KB, text/plain)
2010-01-09 05:46 UTC, madcabbit
Details
make.conf (make.conf,905 bytes, text/plain)
2010-01-09 05:55 UTC, madcabbit
Details
patch to gst-plugins (,9.53 KB, text/plain)
2010-02-23 20:48 UTC, Miguel Marte
Details
gst-plugins-base-fix-la.patch (gst-plugins-base-fix-la.patch,4.58 KB, text/plain)
2010-02-23 22:54 UTC, Nathan Phillip Brink (binki) (RETIRED)
Details
gst-plugins-base-eclass-2.patch (gst-plugins-base-eclass-2.patch,3.71 KB, patch)
2010-11-13 14:55 UTC, Damien Thébault
Details | Diff
gst-plugins-base-fix-la.patch fixed for cdparanoia plugin (gst-plugins-base-fix-la.patch,4.63 KB, patch)
2011-10-07 22:17 UTC, Darragh Bailey
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description madcabbit 2010-01-09 05:42:35 UTC
media-libs/gst-plugins-x fails to compile with error "make: *** No rule to make target `//usr/lib64/libgstvideo-0.10.la', needed by `libgstximagesink.la'.  Stop."  Attempting other gst-plugins atoms also fail similarly, except st-plugins-base.  I've attempted 0.10.23 and 0.10.24 with the same results.  Compiling from vanilla source works, however.
Comment 1 madcabbit 2010-01-09 05:44:26 UTC
Created attachment 215772 [details]
media-libs/gst-plugins-x-0.10.25 build.log
Comment 2 madcabbit 2010-01-09 05:46:25 UTC
Created attachment 215774 [details]
emerge --info =media-plugins/gst-plugins-x-0.10.25
Comment 3 madcabbit 2010-01-09 05:47:48 UTC
emerge -pqv =media-plugins/gst-plugins-x-0.10.25
[ebuild  N    ] media-plugins/gst-plugins-x-0.10.25  USE="-lib32"
Comment 4 madcabbit 2010-01-09 05:55:45 UTC
Created attachment 215776 [details]
make.conf
Comment 5 Patrick Lauer gentoo-dev 2010-01-09 12:30:13 UTC
I'm slightly confused.
(1) I don't find any package by that name in the tree
(2) lib32 useflag - is that from the multilib overlay?
Comment 6 Rafał Mużyło 2010-01-09 13:43:14 UTC
/usr/lib/libgstvideo-0.10.so belongs to media-libs/gst-plugins-base
the problem is probably caused by gentoo scheme of building gstreamer plunins.
IIRC, la files are removed during install (which is a good thing, IMHO).

This simply needs a little (trivial) patch for relevant Makefile.am,
so it links with system copy of the lib, instead of looking for
la files.
Comment 7 madcabbit 2010-01-10 01:49:57 UTC
lib32 is multilib, but I'm not using it with this package.

And it should be media-plugins, so I've corrected it, sorry for the confusion.
Comment 8 madcabbit 2010-01-10 01:51:11 UTC
This also affects several other gst-plugins- packages, cdparanoia, alsa, gnomevfs, vorbis, ogg of the top of my head.
Comment 9 madcabbit 2010-01-10 01:57:51 UTC
I was able to get these packages to install by hacking the Makefile that's breaking it, since its pointing directly as "//usr/lib64", I changed it to "$(top_builddir)/gst-libs/gst/" like vanilla source, edited configure to not clobber this makefile, did a make in the directories it depended on, then after ocnfirming that running make in sys/ximage now worked, using ebuild to compile then merge succeeded, similar hacks worked for the other nonworking packages.
Comment 10 Rafał Mużyło 2010-01-10 14:26:47 UTC
What you should have done was editing relevant
Makefile.am, changing entries referring to la files
of libraries installed by a different package
to '-l<libname>', followed by eautomake (or a full
eautoreconf) - IIRC, most of these plugins do the later anyway.
Comment 11 Rafał Mużyło 2010-01-10 14:27:25 UTC
By 'editing' I meant 'patching', of course.
Comment 12 Miguel Marte 2010-02-23 20:48:19 UTC
Created attachment 220883 [details]
patch to gst-plugins

Here is a patch to fix the Makefiles, don't know if correct though.  You will need to edit the ebuilds to for a few plugins.  

add

src_unpack()
{
        unpack ${A}
        cd "${S}"
        epatch "${FILESDIR}/gst-plugins-base-0.10.25-la.patch"
}


Here is a list of the ebuilds that need to be modified
Alsa
Ogg
Vorbis
X
XVideo
Comment 13 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2010-02-23 22:54:24 UTC
Created attachment 220895 [details]
gst-plugins-base-fix-la.patch

Please ignore chibi-wing's patch. This one gets slightly closer to the heart of the problem and utilizes pkg-config to avoid having paths directly to libtool files. This appears to be enough to fix all gst plugins using the gst-plugins-base.eclass (hopefully).

This is useful for portage-multilib and also for people who don't like the _useless class_ of libtool archive files (not all are useless ;-) ).
Comment 14 Mart Raudsepp gentoo-dev 2010-03-10 11:20:37 UTC
So this issue would at least affect all split plugins that make use of a helper library. Adjusting the bug summary a bit.
This is low priority for me, as I don't believe multilib project should be just outright removing .la files like that. The last patch looks neat though at first glance though, but I might have some reservations about direct pkg-config calls in a Makefile.
Comment 15 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2010-03-10 18:16:42 UTC
(In reply to comment #14)
> This is low priority for me, as I don't believe multilib project should be just
> outright removing .la files like that.
True. Though, IMO, removing .la files when a package provides pkg-config files is good because .la and .pc files perform the same function in the case of normal libraries.

> The last patch looks neat though at
> first glance though, but I might have some reservations about direct pkg-config
> calls in a Makefile.
The calls to pkg-config are expanded before bash calls invokes sed. Just add an ``echo '' before the sed command to get an idea of what it's doing ;-). I would like to note that the whole sed expression thing started out as a hack to build the plugins separately from the rest of the gst package. Thus, the hack might as well go all the way and recognize that gst ships with pkg-config and intends plugins to use the pkg-config files. But this is a hack and I'm assuming that upstream doesn't want to include support for this sort of thing in their buildsystem.
Comment 16 Mart Raudsepp gentoo-dev 2010-10-12 12:28:16 UTC
*** Bug 340535 has been marked as a duplicate of this bug. ***
Comment 17 Ahmed Ammar (RETIRED) gentoo-dev 2010-10-12 12:54:43 UTC
(In reply to comment #14)
> So this issue would at least affect all split plugins that make use of a helper
> library. Adjusting the bug summary a bit.
> This is low priority for me, as I don't believe multilib project should be just
> outright removing .la files like that. The last patch looks neat though at
> first glance though, but I might have some reservations about direct pkg-config
> calls in a Makefile.

Here's a slightly different implementation, not using pkgconfig:

http://bugs.gentoo.org/attachment.cgi?id=250285

Also, for the embedded team this is useful as libtool is very broken in cross-environments. It creates library archives with /usr/lib paths instead of the correct cross-compile paths /usr/$chost/usr/lib. 
Comment 18 Damien Thébault 2010-11-13 14:20:34 UTC
(In reply to comment #17)
> Here's a slightly different implementation, not using pkgconfig:
> 
> http://bugs.gentoo.org/attachment.cgi?id=250285

This worked for me.
Comment 19 Damien Thébault 2010-11-13 14:55:38 UTC
Created attachment 254215 [details, diff]
gst-plugins-base-eclass-2.patch

It seems that for some plugins (media-plugins/gst-plugins-vorbis for example), Makefile.in contains @GST_MAJORMINOR@ instead of $(GST_MAJORMINOR).
This patch fix those too.
I changed the multiple line for "{"/"}" vs "("/")"  into "[{(]"/"[})]" because it started to be complicated, but feel free to do it another way.
Comment 20 Dallas 2011-03-24 10:25:33 UTC
I used binki's patch after I had switched to multilib-overlay, and that fixed my problems emerging gst-plugins-*.
Comment 21 Juho-Mikko Pellinen 2011-08-12 07:44:43 UTC
After applying the patch by Damien Thébault I finally got gst-plugins to compile successfully.
Comment 22 Darragh Bailey 2011-10-07 22:17:14 UTC
Created attachment 289163 [details, diff]
gst-plugins-base-fix-la.patch fixed for cdparanoia plugin

Fixes a bug in binki's patch with the wildcard pattern used to match libgstcdda la file.

configure: *** Orc acceleration enabled.

 * Building external plugin cdparanoia ...
make -j9 
make: *** No rule to make target `../../gst-libs/gst/cdda/libgstcdda-0.10.la', needed by `libgstcdparanoia.la'.  Stop.
make: *** Waiting for unfinished jobs....
  CC     libgstcdparanoia_la-gstcdparanoiasrc.lo
Comment 23 Gilles Dartiguelongue (RETIRED) gentoo-dev 2012-12-05 23:18:47 UTC
Could you guys give a shot at this again, new eclasses should be more friendly to this use case.
Comment 24 Damien Thébault 2012-12-06 06:48:02 UTC
I didn't have this issue again, so it is probably now fine.
Comment 25 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2012-12-19 15:53:21 UTC
(In reply to comment #23)
> Could you guys give a shot at this again, new eclasses should be more
> friendly to this use case.

Since you call prune_libtool_modules() and have modified the Makefiles to no longer reference the .la files but instead use pkg-config, and because I cannot reproduce this problem after testing the very small sample of gst-plugins-{base,x{,video}} ebuilds, I think this bug is quite fixed and that we can even remove the workaround for gst-plugins from the multilib fork of portage itself.
Comment 26 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-12-19 16:05:24 UTC
Thanks, marking as fixed then.