Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 320897

Summary: media-libs/mlt: fails with forced --as-needed
Product: Gentoo Linux Reporter: Diego Elio Pettenò (RETIRED) <flameeyes>
Component: New packagesAssignee: Gentoo Media-video project <media-video>
Severity: QA CC: esigra, oli.huber
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 129413    
Attachments: Build log
Dirty patch

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 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.

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 <> mlt-0.5.4.ebuild,
+  +files/mlt-0.5.4-asneeded.patch:
+  Fix building with -Wl,--as-needed wrt #320897 by Olivier Huber.