[mythtv] Undefined reference in libmyth
Anton Farygin
rider at altlinux.com
Tue Nov 27 21:59:04 UTC 2007
Nigel Pearson пишет:
>> This problem in circle dependency in myth libraries.
>>
>>
>> libmythupnp reverse depends to libmyth, and libmyth depends on
>> libmythupnp:
>> $ ldd -r libs/libmythupnp/libmythupnp-0.20.so|grep libmyth
>> libmyth-0.20.so.0 => /usr/lib/libmyth-0.20.so.0 (0xb7bda000)
>> libmythui-0.20.so.0 => /usr/lib/libmythui-0.20.so.0
>> (0xb716b000)
>>
>> This is impossible - link libmyth with libmythupnp, and libmythupnp
>> with
>> libmyth at one time without unresolved symbols. How to fix it ?
>
>
> You are right about the dependencies - that isn't ideal,
> but it isn't the only myth library with that problem.
> libmythui also has cross-dependencies with libmyth.
Yes, and i write this hack for build mythtv RPM:
%make_build || echo 'LIBS += -L../libmythui -lmythui-%libversion'
>>libs/libmyth/libmyth.pro && \
rm -f libs/libmyth/lib*.so* && %make_build QMAKE=qmake-qt3
>
>
>
> I did test builds on Mac OS X (GCC 4.0.1) and Linux
> (GCC 4.1.2, GNU ld 2.17) without problems.
I build mythtv rpm for ALT Linux:
gcc: 4.1.1 20070105 (ALT Linux, build 4.1.1-alt11
GNU ld version 2.17.50.0.6 20061020
ld in ALT Linux use enabled by default --as-needed flag, and rpm check
all binary files for unresolved symbols before creating package.
>
>
> I will try to remove the libmyth dependencies
> from libmythupnp as soon as possible,
Thanx.
> but as a hacky workaround for you,
> try having alternating libraries on the link line.
> e.g. -lmythupnp-0.20 -lmyth-0.20 -lmythupnp-0.20
No. if ld use --as-needed flag, alternative libraries in linker cmdline
ingnored by ld.
>
> (simple edit to programs/programs-libs.pro)
More information about the mythtv-dev
mailing list