[mythtv] OT: qmake and distcc

Shawn Edwards sedwards at theedwards.org
Tue Jun 17 15:46:07 EDT 2003


 From the distcc manual (http://distcc.samba.org/manual/html/distcc-2.html):

To setup distcc to be compatible with the widest range of existing 
software, create a "masquerade directory" of compiler links that will 
invoke distcc. When the distcc-in-disguise gets invoked, it invokes the 
real compiler of the same name either on the local client machine, or on 
a remote volunteer host.

For instance, you could create the directory named /usr/lib/distcc/bin 
and populate it with links (symlinks are slightly easier to maintain in 
the long run, but use hard links if you prefer them):

# mkdir /usr/lib/distcc/bin
# cd /usr/lib/distcc/bin
# ln -s ../../../bin/distcc gcc
# ln -s ../../../bin/distcc cc
# ln -s ../../../bin/distcc g++
# ln -s ../../../bin/distcc c++

Then, to use distcc, a user just needs to put the directory 
/usr/lib/distcc/bin early in the PATH (and have set the DISTCC_HOSTS 
environment variable) and distcc will handle the rest. Note that this 
masquerade dir must occur on the PATH earlier than the directory that 
contains the actual compilers of the same names, and that any auxiliary 
programs that these compilers call (such as as or ld) must also be found 
on the PATH in a dir after the masquerade dir (since distcc calls out to 
the real compiler with a PATH value that has all dirs up to and 
including the masquerade dir trimmed off).

Personally, I use ccache instead of distcc, so I don't know if there is 
anything in qmake that will make distcc abend, so good luck :)

HTH

William Preston wrote:
> Dunno about y'all, but keeping up with recent myth releases is tough
> work--at least for my little machine.  I'd like to engage distcc
> (distcc.samba.org) to distribute the compile job amongst several machines
> that I have.  I can't quite seem to get qmake to behave, though--when it
> creates the Makefile for each individual program, it always sets the g++
> compiler to g++, instead of distcc (which, from what I understand, should be
> able to handle c or c++ code.)  ./configure didn't appear to grab my
> environment variable for CC either, so I manually set it in the config.mak
> file.  I also tried leaving config.mak unaltered and doing 'make -j4
> CC=distcc CXX=distcc' on the commandline, but it...still seems to be using
> g++ at random times, and (strangely) I need to run the make command twice
> (it dumps out in the middle for some reason.)
> 
> Is anyone doing this successfully, or is distcc just not an option for
> compiling myth?  Is it a matter of me not having my environment variables
> set up correctly?  I'd actually be a little surprised if the dev team didn't
> have this going for themselves, as recently myth compiles are starting to
> feel like samba source compiles  :)
> 
> 
> Example of what I'm talking about below.  Notice the switching from g++ to
> distcc.  My apologies if this is simply my inability to read the output
> properly:
> 
> 
> 
> cd i18n && make -f Makefile
> make[1]: Entering directory `/usr/src/mythcvs/mythtv/i18n'
> distcc -c -pipe -Wall -W -O2 -fomit-frame-pointer -pipe -march=i586 -mcpu=pe
> ntiumpro  -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DPREFIX=\"/usr/local\" -DMMX
>  -I/usr/lib/qt3/mkspecs/default -I. -I../../../../local/include -o dummy.o
> dummy.c
> g++  -o themes dummy.o
> g++  -o i18n dummy.o
> make[1]: Leaving directory `/usr/src/mythcvs/mythtv/themes'
> cd mythprogfind && make -f Makefile
> make[2]: Entering directory `/usr/src/mythcvs/mythtv/programs/mythprogfind'
> distcc -c -pipe -Wall -W -O3 -m3dnow -mmmx -msse -mfpmath=sse -march=athlon-
> xp -fomit-frame-pointer -D_REENTRANT  -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -
> DPREFIX=\"/usr/local\" -DMMX -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -I/usr/lib/qt
> 3/mkspecs/default -I. -I../../libs -I../../libs/libmyth -I../../../../../loc
> al/include -I/usr/lib/qt3/include -o main.o main.cpp
> make[1]: Leaving directory `/usr/src/mythcvs/mythtv/i18n'
> cd menutest && make -f Makefile
> make[2]: Entering directory `/usr/src/mythcvs/mythtv/programs/menutest'
> distcc -c -pipe -Wall -W -O3 -m3dnow -mmmx -msse -mfpmath=sse -march=athlon-
> xp -fomit-frame-pointer -D_REENTRANT  -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -
> DPREFIX=\"/usr/local\" -DMMX -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -I/usr/lib/qt
> 3/mkspecs/default -I. -I../../libs/libmyth -I../../../../../local/include -I
> /usr/lib/qt3/include -o main.o main.cpp
> make[1]: Leaving directory `/usr/src/mythcvs/mythtv/setup'
> cd mythfilldatabase && make -f Makefile
> make[2]: Entering directory
> `/usr/src/mythcvs/mythtv/programs/mythfilldatabase'
> distcc -c -pipe -Wall -W -O3 -m3dnow -mmmx -msse -mfpmath=sse -march=athlon-
> xp -fomit-frame-pointer -D_REENTRANT  -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -
> DPREFIX=\"/usr/local\" -DMMX -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -I/usr/lib/qt
> 3/mkspecs/default -I. -I../../libs -I../../../../../local/include -I/usr/lib
> /qt3/include -o filldata.o filldata.cpp
> make[2]: Leaving directory `/usr/src/mythcvs/mythtv/programs/mythepg'
> cd mythtranscode && make -f Makefile
> make[2]: Entering directory `/usr/src/mythcvs/mythtv/programs/mythtranscode'
> distcc -c -pipe -Wall -W -O3 -m3dnow -mmmx -msse -mfpmath=sse -march=athlon-
> xp -fomit-frame-pointer -D_REENTRANT  -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -
> DPREFIX=\"/usr/local\" -DMMX -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -I/usr/lib/qt
> 3/mkspecs/default -I. -I../../libs -I../../libs/libmyth -I../../libs/libmyth
> tv -I../../../../../local/include -I/usr/lib/qt3/include -o main.o main.cpp
> g++  -o menutest
> main.o   -L/usr/lib/qt3/lib -L/usr/X11R6/lib -L../../libs/libmyth -lmyth-0.1
> 0 -L/usr/X11R6/lib -lXinerama -lXv -lX11 -lXext -lXxf86vm -lqt-mt -lXext -lX
> 11 -lm -lpthread
> g++  -o mythprogfind
> main.o   -L/usr/lib/qt3/lib -L/usr/X11R6/lib -L../../libs/libmyth -L../../li
> bs/libmythtv -L../../libs/libavcodec -L../../libs/libvbitext -L../../libs/li
> bavformat -lmythtv -lavformat -lavcodec -lvbitext -lmyth-0.10 -L/usr/X11R6/l
> ib -lXinerama -lXv -lX11 -lXext -lXxf86vm -lmp3lame -lqt-mt -lXext -lX11 -lm
>  -lpthread
> make[2]: Leaving directory `/usr/src/mythcvs/mythtv/programs/menutest'
> cd mythtv && make -f Makefile
> 
> 
> 
> 
> 
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at snowman.net
> http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-dev

-- 
Shawn Edwards
sedwards at theedwards.org

My daughter might be an honor student at the Heisenberg Institute



More information about the mythtv-dev mailing list