Opened 18 years ago

Closed 18 years ago

#3946 closed defect (fixed)

PowerPC Altivec Linux SVN build broken

Reported by: anonymous Owned by: Nigel
Priority: major Milestone: unknown
Component: mythtv Version: head
Severity: low Keywords: powerpc altivec
Cc: Ticket locked: no

Description (last modified by Nigel)

Hey all, PowerPC Linux (Ubuntu 7.04 PPC) build appears to be broken, not sure why.

g++ -c -pipe -mcpu=ppc -mcpu=7450 -mpowerpc-gfxopt -I/usr/include/kde/artsc -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -Wall -W -fomit-frame-pointer -O3 -maltivec -ftree-vectorize -mabi=altivec -mpowerpc-gfxopt -maltivec -mabi=altivec -Wall -Wno-switch -Wpointer-arith -Wredundant-decls -Wno-non-virtual-dtor -D__STDC_CONSTANT_MACROS -I/usr/include/freetype2 -D_REENTRANT -DPIC -fPIC  -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DPREFIX=\"/usr/local/\" -DLIBDIR=\"/usr/local//lib\" -D_LARGEFILE_SOURCE -DUSING_OSS -DUSING_H264TOOLS -DUSING_X11 -DUSING_XV -DUSING_XVMCW -DUSING_OPENGL -DUSING_OPENGL_VIDEO -DUSING_FRONTEND -DUSING_V4L -DUSING_DBOX2 -DUSING_IPTV -DUSING_HDHOMERUN -DUSING_IVTV -DUSING_DVB -DUSING_BACKEND -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/default -I. -I/usr/local/include -I/usr/include -I../.. -I.. -I../libmyth -I../libavcodec -I../libavutil -I../libmythmpeg2 -Idvbdev -Impeg -Iiptv -I../libmythlivemedia/BasicUsageEnvironment/include -I../libmythlivemedia/groupsock/include -I../libmythlivemedia/liveMedia/include -I../libmythlivemedia/UsageEnvironment/include -I/usr/include/qt3 -I/usr/X11R6/include -I/usr/X11R6/include -o yuv2rgb.o yuv2rgb.cpp
yuv2rgb.cpp: In function ‘void altivec_i420_2vuy(uint8_t*, int, const uint8_t*, const uint8_t*, const uint8_t*, int, int, int, int, int)’:
yuv2rgb.cpp:922: error: cannot convert ‘bool’ to ‘unsigned int __vector__’ in initialization
yuv2rgb.cpp:924: error: could not convert ‘any_extra’ to ‘bool’
yuv2rgb.cpp: In function ‘void altivec_2vuy_i420(uint8_t*, uint8_t*, uint8_t*, int, int, int, const uint8_t*, int, int, int)’:
yuv2rgb.cpp:1119: error: cannot convert ‘bool’ to ‘unsigned int __vector__’ in initialization
yuv2rgb.cpp:1121: error: could not convert ‘any_extra’ to ‘bool’
make[2]: *** [yuv2rgb.o] Error 1
make[2]: Leaving directory `/home/plantain/mythtv/mythtv/libs/libmythtv'
make[1]: *** [sub-libmythtv] Error 2
make[1]: Leaving directory `/home/plantain/mythtv/mythtv/libs'
make: *** [sub-libs] Error 2

Hope this is a simple fix, feel free to mail/msg me if there's anything I can help with.

Thanks.

Attachments (1)

preproc.zip (49.9 KB) - added by anonymous 18 years ago.
preprocessor for yuv2rgb.cpp

Download all attachments as: .zip

Change History (10)

comment:1 Changed 18 years ago by Nigel

Description: modified (diff)

comment:2 Changed 18 years ago by anonymous

Could you maybe provide the preprocessor output of this source file?

cd libs/libmythtv
g++ -c -pipe -mcpu=ppc -mcpu=7450 -mpowerpc-gfxopt -I/usr/include/kde/artsc -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -Wall -W -fomit-frame-pointer -O3 -maltivec -ftree-vectorize -mabi=altivec -mpowerpc-gfxopt -maltivec -mabi=altivec -Wall -Wno-switch -Wpointer-arith -Wredundant-decls -Wno-non-virtual-dtor -D__STDC_CONSTANT_MACROS -I/usr/include/freetype2 -D_REENTRANT -DPIC -fPIC  -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DPREFIX=\"/usr/local/\" -DLIBDIR=\"/usr/local//lib\" -D_LARGEFILE_SOURCE -DUSING_OSS -DUSING_H264TOOLS -DUSING_X11 -DUSING_XV -DUSING_XVMCW -DUSING_OPENGL -DUSING_OPENGL_VIDEO -DUSING_FRONTEND -DUSING_V4L -DUSING_DBOX2 -DUSING_IPTV -DUSING_HDHOMERUN -DUSING_IVTV -DUSING_DVB -DUSING_BACKEND -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/default -I. -I/usr/local/include -I/usr/include -I../.. -I.. -I../libmyth -I../libavcodec -I../libavutil -I../libmythmpeg2 -Idvbdev -Impeg -Iiptv -I../libmythlivemedia/BasicUsageEnvironment/include -I../libmythlivemedia/groupsock/include -I../libmythlivemedia/liveMedia/include -I../libmythlivemedia/UsageEnvironment/include -I/usr/include/qt3 -I/usr/X11R6/include -I/usr/X11R6/include -E >preproc.txt

and attach/mail preproc.txt

Changed 18 years ago by anonymous

Attachment: preproc.zip added

preprocessor for yuv2rgb.cpp

comment:3 in reply to:  2 Changed 18 years ago by anonymous

Hello,

I'm facing the same problem trying to compile mythtv on Macmini PPC.

I have attached the requested preprocessor file for the cpp file yuv2rgb

comment:4 Changed 18 years ago by Nigel

Just did a successful test build then on my G4. No errors. Note that a MacMini? build will have different arguments (if it is running OS X):

% cd src/mythtv/libs/libmythtv
% rm yuv2rgb.o
% make yuv2rgb.o
g++ -c -pipe -mcpu=7450 -mpowerpc-gfxopt -Wno-long-double -F/System/Library/Frameworks/{AGL,ApplicationServices,Carbon,Cocoa,OpenGL,QuickTime}.framework/Frameworks -F/System/Library/PrivateFrameworks/{DVD}.framework/Frameworks -Wall -W -fomit-frame-pointer -O3 -faltivec -Wall -Wno-switch -Wpointer-arith -Wredundant-decls -Wno-non-virtual-dtor -D__STDC_CONSTANT_MACROS -fno-inline-functions -I/Volumes/Myth-Xcode2.4/.osx-packager/build/include/freetype2 -I/Volumes/Myth-Xcode2.4/.osx-packager/build/include -DPIC -fPIC  -DUSING_APPLEREMOTE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DPREFIX=\"/Volumes/Myth-Xcode2.4/.osx-packager/build\" -DLIBDIR=\"/Volumes/Myth-Xcode2.4/.osx-packager/build/lib\" -D_LARGEFILE_SOURCE -DUSING_H264TOOLS -DUSING_DVDV -DUSING_FRONTEND -DUSING_DBOX2 -DUSING_IPTV -DUSING_HDHOMERUN -DUSING_BACKEND -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_ACCESSIBILITY_SUPPORT -I/Volumes/Myth-Xcode2.4/.osx-packager/build/mkspecs/default -I. -I../../../../../build/include -I../../../../../build/include -I../.. -I.. -I../libmyth -I../libavcodec -I../libavutil -I../libmythmpeg2 -Idvbdev -Impeg -Iiptv -I../libmythlivemedia/BasicUsageEnvironment/include -I../libmythlivemedia/groupsock/include -I../libmythlivemedia/liveMedia/include -I../libmythlivemedia/UsageEnvironment/include -I/Volumes/Myth-Xcode2.4/.osx-packager/src/qt-mac-free-3.3.6/include -o yuv2rgb.o yuv2rgb.cpp
In file included from yuv2rgb.cpp:41:
/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/include/altivec.h:44:2: warning: #warning Ignoring <altivec.h> because "-faltivec" specified
% ls -l yuv2rgb.o
-rw-r--r--   1 nigel    staff        7640 Sep 11 04:36 yuv2rgb.o

comment:5 Changed 18 years ago by bander.ajba@…

hello nigel,

the latest svn compiles with no problems on my macbook OSX 10.4 . but my mac linux/ppc/gentoo is throwing the same error as my freind in who issued the ticket. the compiler complains about type conversion. FYI, I have tried hardcoding the boolian "any_extra" to both true and false. both compilation trail were successful. however mythtv fails when entering LiveTV/playingVideo/WatchRecordings.

any hints??

comment:6 Changed 18 years ago by anonymous

Thanks for the clarification. Looks like I need to download and install a PPC linux distro.

comment:7 Changed 18 years ago by Nigel

Owner: changed from Isaac Richards to Nigel
Status: newassigned

OK. Have installed 7.04 on my PB G4 400, did a few apt-get installs, and am now building mythtv src. I get a similar error:

nigel@TitaniumG4:~/mythtv/libs/libmythtv$ make yuv2rgb.o
g++ -c -pipe -Wall -W -fomit-frame-pointer -O3 -maltivec -mabi=altivec -Wall -Wno-switch -Wpointer-arith -Wredundant-decls -Wno-non-virtual-dtor -D__STDC_CONSTANT_MACROS -I/usr/include/freetype2 -D_REENTRANT -DPIC -fPIC  -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DPREFIX=\"/usr/local\" -DLIBDIR=\"/usr/local/lib\" -D_LARGEFILE_SOURCE -DUSING_OSS -DUSING_H264TOOLS -DUSING_X11 -DUSING_XV -DUSING_XVMCW -DUSING_FRONTEND -DUSING_V4L -DUSING_DBOX2 -DUSING_IPTV -DUSING_HDHOMERUN -DUSING_IVTV -DUSING_DVB -DUSING_BACKEND -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -I/usr/share/qt3/mkspecs/default -I. -I/usr/local/include -I/usr/include -I../.. -I.. -I../libmyth -I../libavcodec -I../libavutil -I../libmythmpeg2 -Idvbdev -Impeg -Iiptv -I../libmythlivemedia/BasicUsageEnvironment/include -I../libmythlivemedia/groupsock/include -I../libmythlivemedia/liveMedia/include -I../libmythlivemedia/UsageEnvironment/include -I/usr/share/qt3/include -o yuv2rgb.o yuv2rgb.cpp
yuv2rgb.cpp: In function ‘void altivec_i420_2vuy(uint8_t*, int, const uint8_t*, const uint8_t*, const uint8_t*, int, int, int, int, int)’:
yuv2rgb.cpp:922: error: cannot convert ‘bool’ to ‘unsigned int __vector__’ in initialization
yuv2rgb.cpp:924: error: could not convert ‘any_extra’ to ‘bool’
yuv2rgb.cpp: In function ‘void altivec_2vuy_i420(uint8_t*, uint8_t*, uint8_t*, int, int, int, const uint8_t*, int, int, int)’:
yuv2rgb.cpp:1119: error: cannot convert ‘bool’ to ‘unsigned int __vector__’ in initialization
yuv2rgb.cpp:1121: error: could not convert ‘any_extra’ to ‘bool’
make: *** [yuv2rgb.o] Error 1

comment:8 Changed 18 years ago by Nigel

(In [14493]) Workaround GCC 4.1.2 bug(?) where bool is preprocessed into something strange: attribute((altivec(bool))) unsigned which neither I or the compiler can understand :-) See #3946 Also simplified the boolean stride/extra checking. (u_extra and v_extra are either both zero, or not)

comment:9 Changed 18 years ago by Nigel

Resolution: fixed
Status: assignedclosed

The pre-processor was mangling the bool type somehow. Easiest fix was to remove it.
A clean build with the latest source (and that fix) worked for me. Bander, if you are still having problems after a "make distclean; ./configure; make" then try a debug build, and please create a new Trac ticker with the gdb output

Note: See TracTickets for help on using tickets.