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.
Created attachment 197003 [details]
*** Bug 298000 has been marked as a duplicate of this bug. ***
The library is definitely broken, it's not a problem of tests only.
I'm very sympathetic to fixing as-needed issues, but this goes a bit over my head. So some help here would be very welcome.
Is the undefined reference to clock_gettime the only issue here? And would it then be enough to add `append-ldflags -lrt`?
No. You do the append-ldflags and you leave it as broken as it was before with an extra QA warnings.
Patch the Makefile.am to add -lrt to the LIBADD for the library.
I added a patch to rb_libtorrent-0.14.8-r1.ebuild (revision 1.2). Please let me know if that fixes the issue.
Created attachment 219641 [details, diff]
fixing as-needed issues
(In reply to comment #6)
> I added a patch to rb_libtorrent-0.14.8-r1.ebuild (revision 1.2). Please let me
> know if that fixes the issue.
I doesn't work for me. I suppose it should be target_LIBADD. Nevertheless, the supplied patch should do the trick.
Well, this doesn't fix the issue.
This is from trying to run net-p2p/deluge-1.2.2:
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/deluge/ui/gtkui/gtkui.py", line 275, in _on_reactor_start
File "/usr/lib/python2.6/site-packages/deluge/ui/client.py", line 531, in start_classic_mode
self._daemon_proxy = DaemonClassicProxy(self.__event_handlers)
File "/usr/lib/python2.6/site-packages/deluge/ui/client.py", line 408, in __init__
self.__daemon = deluge.core.daemon.Daemon(classic=True)
File "/usr/lib/python2.6/site-packages/deluge/core/daemon.py", line 136, in __init__
from deluge.core.core import Core
File "/usr/lib/python2.6/site-packages/deluge/core/core.py", line 36, in <module>
from deluge._libtorrent import lt
File "/usr/lib/python2.6/site-packages/deluge/_libtorrent.py", line 59, in <module>
import libtorrent as lt
ImportError: /usr/lib/libtorrent-rasterbar.so.5: undefined symbol: clock_gettime
Only happens w/ LD_AS_NEEDED="1"
(In reply to comment #8)
> Well, this doesn't fix the issue.
"this" ? The current in Portage, or the patch in Comment #7 ?
Created attachment 225059 [details, diff]
(In reply to comment #9)
> "this" ? The current in Portage, or the patch in Comment #7 ?
Sorry, not clear enough; this == current portage ;) Comment #7 works fine.
Attached an updated patch for 0.14.9, also includes the 0.14.6-configure-ldflags-fix.patch since I really dislike the patch-on-top-of-patched-file approach.
I've applied this latest patch to 0.14.9-r1. Feel free to reopen if the problem reappears.