[mythtv] Problems with circular dependency

Scott Theisen scott.the.elm at gmail.com
Wed Jun 10 08:04:24 UTC 2026


On 2026-06-05 15:37:35, David Hampton wrote:
> On Fri, 2026-06-05 at 12:10 -0400, Peter Bennett wrote:
>> Hi Scott
>>
>> There is a problem with libmythdvdnav in mythfrontend for android,
>> which
>> seems to originate from this commit:
>>
>> commit 5345afd2380609fc810c2afae8ed08e12d2912f5
>> Author:     Scott Theisen<scott.the.elm at gmail.com>
>> AuthorDate: Sun Jan 18 17:45:30 2026 -0500
>> Commit:     Scott Theisen<scott.the.elm at gmail.com>
>> CommitDate: Sat Jan 31 21:57:52 2026 -0500
>>
>>       Create IO wrapper forward declarations in libmythdvdnav
>>
>>       The values for Whence for lseek and Flags for open
>>       are defined in <unistd.h> and <fcntl.h>, respectively.
>>
>> This moves mythdvdio.cpp from libmythdvdnav to libmythtv, resulting
>> in a
>> dependency from libmythtv to  libmythdvdnav and then another
>> dependency
>> from libmythdvdnav to libmythtv.
> ISTR that this was also a circular dependency before, but was solved by
> making one of the libraries a x.a file instead of an x.so file.  Maybe
> I'm misremembering.
>
> David
>

I don't think moving the header file to libmythdvdnav is the problem, 
the circular dependency was always there.  (When the header file was in 
libmythtv, it was included by libmythdvdnav and the symbols were still 
undefined when linking libmythdvdnav.)

I think the problem is the subsequent changes David made to have CMake 
compile libmythdvdnav as a shared library on Android.  When it was 
compiled for Android previously as a static library, it didn't care that 
the symbols were undefined since the symbols are defined later when 
libmythtv is linked to the static library.

The proper way is to use something like what libbluray does for its 
virtual filesystem support ( 
https://code.videolan.org/videolan/libdvdread/-/merge_requests/40 ), and 
I had meant to look at rebasing that merge request after I updated 
MythTV's versions of libdvdread and libdvdnav, but I have been busy.  
However, it looks like someone else is already rebasing it ( 
https://code.videolan.org/videolan/libdvdread/-/merge_requests/80 ), so 
I'll look into that merge request and see if it gets merged.

Regards,

Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20260610/217da8ea/attachment.htm>


More information about the mythtv-dev mailing list