[mythtv] Mac OS X Linker Flags
Andrew Kimpton
awk at awkward.org
Thu Sep 21 03:16:44 UTC 2006
programs/programs-libs.pro has the following line it :
macx:using_firewire:using_backend:LIBS += -F$${CONFIG_MAC_AVC} -
framework AVCVideoServices
which in conjunction with the line :
LIBS += -F$${CONFIG_MAC_AVC} -framework AVCVideoServices
inside the macx { using_firewire:using_backend {} } conditional block
of libs/libmythtv/libmythtv.pro
means that every program which links against libmythtv (which seems
to be all of them - I don't see a distinction between frontend and
backend) must also be a bundle and include the AVCVideoServices
framework inside it.
This - makes the resultant binaries large and also means that you
can't make a 'console' version of the helper apps like
mythfilldatabase - which in turn means that we need to either do
special symlinks or other packaging tricks on Mac OS X. It also means
that the even the mythfrontend app must include this framework even
though it never talks to the firewire settop box directly !
A small amount of rearranging of the flags - moving the LIBS line
above to mythbackend, and removing LIBS line from programs-libs.pro
fixes this and means that only the mythbackend needs the framework
and to be a bundle. Adding
CONFIG += console
to mythfilldatabase.pro (and others too) will make them a console/
command line app in exactly the same way they are on a traditional
Unix system.
I can make up patches and submit a ticket for this but before I do :
There *IS* one catch though ! If anyone ever calls to the Darwin
Firewire code(eg darwin-firewirechannel.cpp) without linking against
the framework they'll crash (unresolved symbols at runtime). Now I
can't see why anything other than the backend daemon (and setup ??)
would ever do that, but unless there's a library reorganization it's
always a possibility that it could silently happen.
So.... I did see some recent discussion around circular dependancies
and the like, and I've been struggling to understand the divisions in
the libraries. There doesn't seem to be a clean (these libraries for
backend stuff - those libraries for frontends) division between
things. Is there a plan to work on this at all ?
Andrew 8-)
P.S. Can a qmake expert confirm/deny that the CONFIG += console
setting is benign on Linux/Unix ?
More information about the mythtv-dev
mailing list