Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 247844 - media-plugins/live: breaks with forced --as-needed
Summary: media-plugins/live: breaks with forced --as-needed
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: media-video herd
URL: http://www.gentoo.org/proj/en/qa/asne...
Whiteboard:
Keywords:
Depends on:
Blocks: as-needed
  Show dependency tree
 
Reported: 2008-11-20 23:59 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2017-03-22 17:42 UTC (History)
3 users (show)

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


Attachments
Build log (media-sound:mimd-0.30.1:20081120-231434.log,4.80 KB, text/plain)
2008-11-21 00:01 UTC, Diego Elio Pettenò (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2008-11-20 23:59:08 UTC
I'm reporting this bug because the package in summary breaks 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).

Check the attached build log.

Thanks,
Diego
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2008-11-21 00:01:16 UTC
Created attachment 172576 [details]
Build log
Comment 2 Alexis Ballier gentoo-dev 2008-11-21 00:04:23 UTC
not much to be done here imho: live produces only static libs normally, so people are expected to link to all libs; the shared libs is a gentoo invention
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2008-11-21 00:19:16 UTC
I know, I think I wrote most of it, I'll see to get it fixed too, but I had to open the bug or otherwise I would have forgotten about it.
Comment 4 Michael Orlitzky gentoo-dev 2017-03-22 07:19:30 UTC
The current stable media-plugins/live-2017.01.26 works, even with the modified GCC profile described in the blog post. Resolved? Or somebody want to double-check?
Comment 5 Alexis Ballier gentoo-dev 2017-03-22 16:32:57 UTC
still an issue i think:

 $ gcc foo.c -lBasicUsageEnvironment
/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../lib64/libBasicUsageEnvironment.so: undefined reference to `HashTable::Iterator::~Iterator()'
/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../lib64/libBasicUsageEnvironment.so: undefined reference to `HashTable::Iterator::Iterator()'
/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../lib64/libBasicUsageEnvironment.so: undefined reference to `strDup(char const*)'
/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../lib64/libBasicUsageEnvironment.so: undefined reference to `TaskScheduler::rescheduleDelayedTask(void*&, long, void (*)(void*), void*)'
/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../lib64/libBasicUsageEnvironment.so: undefined reference to `UsageEnvironment::~UsageEnvironment()'
/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../lib64/libBasicUsageEnvironment.so: undefined reference to `HashTable::HashTable()'
/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../lib64/libBasicUsageEnvironment.so: undefined reference to `typeinfo for HashTable::Iterator'
/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../lib64/libBasicUsageEnvironment.so: undefined reference to `TaskScheduler::internalError()'
/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../lib64/libBasicUsageEnvironment.so: undefined reference to `TaskScheduler::~TaskScheduler()'
/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../lib64/libBasicUsageEnvironment.so: undefined reference to `typeinfo for TaskScheduler'
/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../lib64/libBasicUsageEnvironment.so: undefined reference to `HashTable::~HashTable()'
/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../lib64/libBasicUsageEnvironment.so: undefined reference to `UsageEnvironment::internalError()'
/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../lib64/libBasicUsageEnvironment.so: undefined reference to `typeinfo for HashTable'
/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../lib64/libBasicUsageEnvironment.so: undefined reference to `TaskScheduler::TaskScheduler()'
/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../lib64/libBasicUsageEnvironment.so: undefined reference to `UsageEnvironment::UsageEnvironment(TaskScheduler&)'
/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../lib64/libBasicUsageEnvironment.so: undefined reference to `typeinfo for UsageEnvironment'
Comment 6 Michael Orlitzky gentoo-dev 2017-03-22 17:17:08 UTC
(In reply to Alexis Ballier from comment #5)
> still an issue i think:
> 
>  $ gcc foo.c -lBasicUsageEnvironment

Crap, I didn't realize that the build log was for a package that *depends on* media-plugins/live. Thanks for checking.

It looks like BasicUsageEnvironment needs to be linked against the regular UsageEnvironment. A few small changes make that work.

In config.gentoo-so-r1:

  -LINK_OPTS =            -L.
  +LINK_OPTS =            -L. -L../UsageEnvironment


And in BasicUsageEnvironment/Makefile.tail:

  +LIBS = -lUsageEnvironment
  +
   libBasicUsageEnvironment.$(LIB_SUFFIX): $(OBJS)
          $(LIBRARY_LINK)$@ $(LIBRARY_LINK_OPTS) \
  -               $(OBJS)
  +               $(OBJS) $(LIBS)

Maybe something else breaks after that, but "ldd libBasicUsageEnvironment.so" shows that it's linked against "libUsageEnvironment.so" at least.
Comment 7 Alexis Ballier gentoo-dev 2017-03-22 17:42:17 UTC
(In reply to Michael Orlitzky from comment #6)
> (In reply to Alexis Ballier from comment #5)
> > still an issue i think:
> > 
> >  $ gcc foo.c -lBasicUsageEnvironment
> 
> Crap, I didn't realize that the build log was for a package that *depends
> on* media-plugins/live. Thanks for checking.
> 
> It looks like BasicUsageEnvironment needs to be linked against the regular
> UsageEnvironment. A few small changes make that work.
> 
> In config.gentoo-so-r1:
> 
>   -LINK_OPTS =            -L.
>   +LINK_OPTS =            -L. -L../UsageEnvironment
> 
> 
> And in BasicUsageEnvironment/Makefile.tail:
> 
>   +LIBS = -lUsageEnvironment
>   +
>    libBasicUsageEnvironment.$(LIB_SUFFIX): $(OBJS)
>           $(LIBRARY_LINK)$@ $(LIBRARY_LINK_OPTS) \
>   -               $(OBJS)
>   +               $(OBJS) $(LIBS)
> 
> Maybe something else breaks after that, but "ldd
> libBasicUsageEnvironment.so" shows that it's linked against
> "libUsageEnvironment.so" at least.

yes something like that would work

it's been years but if I remember correctly it was not that easy since libs had circular deps