Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 320897 - media-libs/mlt: fails with forced --as-needed
Summary: media-libs/mlt: fails with forced --as-needed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High QA (vote)
Assignee: Gentoo Media-video project
URL: http://www.gentoo.org/proj/en/qa/asne...
Whiteboard:
Keywords:
Depends on:
Blocks: as-needed
  Show dependency tree
 
Reported: 2010-05-21 16:09 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2010-06-29 19:00 UTC (History)
2 users (show)

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


Attachments
Build log (mlt-0.5.4:20100521-143209.log,77.45 KB, text/plain)
2010-05-21 16:09 UTC, Diego Elio Pettenò (RETIRED)
Details
Dirty patch (mlt.patch,383 bytes, patch)
2010-06-17 17:19 UTC, Olivier Huber
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2010-05-21 16:09:25 UTC
I'm reporting this bug because the package in summary fails to build when forcing --as-needed on through spec files (check out http://blog.flameeyes.eu/2008/11/14/problems-and-mitigation-strategies-for-as-needed for details).

Please note that this bug _might_ apply to -Wl,--as-needed in LDFLAGS as well; in both cases it should be fixed. Also, if this is due to the package in question not respecting user-defined LDFLAGS, you should get to fix that too.

Check the attached build log.

Thanks,
Diego
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-05-21 16:09:42 UTC
Created attachment 232375 [details]
Build log
Comment 2 Kevin Pyle 2010-05-22 20:06:00 UTC
mlt_wrap.cxx was compiled with g++, but then linked with gcc.  Although this can be made to work, it is generally easier to use g++ to link an image that contains C++ object files, so that it automatically adds the proper C++ support libraries when it invokes ld.

There are also a few references to missing mlt symbols.  Those might require additional changes to resolve.
Comment 3 Olivier Huber 2010-06-17 17:19:08 UTC
Created attachment 235753 [details, diff]
Dirty patch

Here's a dirty hack that fixes the build process :

 - the Makefile is generated via swig. I don't know how to make it switch to g++, so I pass -lstdc++. I don't know what are the real differences between g++ and gcc, so it may be totally wrong. A gcc expert could shed some light on this.

 - It seems that it needs to be linked to mlt also.

The bottom line is that it compiles but I haven't tested the ruby bindings.
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2010-06-29 19:00:46 UTC
(In reply to comment #3)
> Created an attachment (id=235753) [details]
> Dirty patch

works for me, I'll see if I can write something better for up coming 0.5.6...

+  29 Jun 2010; Samuli Suominen <ssuominen@gentoo.org> mlt-0.5.4.ebuild,
+  +files/mlt-0.5.4-asneeded.patch:
+  Fix building with -Wl,--as-needed wrt #320897 by Olivier Huber.