[mythtv] Compile Mythtv on PS3
Nigel Pearson
nigel at ind.tansu.com.au
Wed Dec 20 06:11:30 UTC 2006
> gcc -c -pipe -w -O3 -Wall -Wno-switch -DPIC -fPIC -fno-common -
> D_REENTRANT
> -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DPREFIX=\"/usr/local\"
> -DLIBDIR=\"/usr/local/lib\" -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -
> DQT_SHARED
> -I/usr/lib/qt-3.3/mkspecs/default -I. -I/usr/local/include
> -I../../libs/libavcodec -I/usr/lib/qt-3.3/include -o cpu_accel.o
> cpu_accel.c
> {standard input}: Assembler messages:
> {standard input}:60: Error: unsupported relocation against v0
> {standard input}:60: Error: unsupported relocation against v0
> {standard input}:60: Error: unsupported relocation against v0
> make[2]: *** [cpu_accel.o] Error 1
From your preprocessor output, I can't see much wrong.
It is including the correct function (the PPC one at line 150).
Only strange thing is that it seems to be using the __APPLE__
version of the VAND macro:
#if defined(HAVE_ALTIVEC_H) && !defined(__APPLE__) /* gnu */
#define VAND(a,b,c) "vand " #a "," #b "," #c "\n\t"
#else /* apple */
#define VAND(a,b,c) "vand v" #a ",v" #b ",v" #c "\n\t"
#endif
asm volatile ("mtspr 256, %0\n\t"
VAND (0, 0, 0)
:
: "r" (-1));
which is being expanded as:
asm volatile ("mtspr 256, %0\n\t"
"vand v" "0" ",v" "0" ",v" "0" "\n\t"
:
: "r" (-1));
My suggested workarounds:
1) Turn off the CPU detection in libmythmpeg2.
Edit the file mythtv/libs/libmythmpeg2/config.h
and comment out the #define ACCEL_DETECT line.
That should get you compiling up to the next error.
2) Find if, and where __APPLE__ is being defined,
and rectify that. Write a test program:
% cat test.cpp
#ifdef __APPLE__
#error This is not an Apple!
#endif
%
and run gcc on it. If it fails with the error,
then that may be the problem. Try putting
something like
#undef __APPLE__
in MythTV's top level config.h,
and see if that gives you a non-error result?
Good luck.
--
Nigel Pearson, nigel at ind.tansu.com.au|"People say I'm strange,
Telstra Net. Eng., Sydney, Australia | does it make me a stranger?
Office: 9202 3900 Fax: 9261 3912 | My best friend was born
Mobile: 0408 664435 Home: 9792 6998 | in a manger" -DC Talk
More information about the mythtv-dev
mailing list