Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 12257 - xvid 0.9.0 does not build on ppc
Summary: xvid 0.9.0 does not build on ppc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: High normal
Assignee: Rajiv Aaron Manglani (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-16 14:53 UTC by Rajiv Aaron Manglani (RETIRED)
Modified: 2006-02-04 06:03 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rajiv Aaron Manglani (RETIRED) gentoo-dev 2002-12-16 14:53:12 UTC
xvid-0.9.0.ebuild does not build on ppc:


>>> emerge (11 of 16) media-libs/xvid-0.9.0 to /
>>> md5 ;-) xvidcore-0.9.0.tar.bz2
>>> Unpacking source...
>>> Unpacking xvidcore-0.9.0.tar.bz2
ppc
>>> Source unpacked.
gcc -O3 -pipe -fsigned-char -Wall -Os -funroll-loops -ffast-math
-fstrict-aliasing -fomit-frame-pointer -fPIC   -c -o ../../src/decoder.o
../../src/decoder.c
gcc -O3 -pipe -fsigned-char -Wall -Os -funroll-loops -ffast-math
-fstrict-aliasing -fomit-frame-pointer -fPIC   -c -o ../../src/divx4.o
../../src/divx4.c
In file included from ../../src/decoder.c:66:
../../src/portab.h:143:6: #error Architecture not supported.
../../src/portab.h:349:10: #error Architecture not supported.
.... with many more errors.

if you look at portab.h you will see:

#if defined(ARCH_X86) || defined(ARCH_PPC) || defined(ARCH_MIPS)  ||
defined(ARCH_SPARC)
#    define CACHE_LINE  16
#    define ptr_t uint32_t
#elif defined(ARCH_IA64)
#    define CACHE_LINE  32
#    define ptr_t uint64_t
#else
#    error Architecture not supported.
#endif

and in the original makefiles there is stuff like:

# Constants which should not be modified
CFLAGS += -DLINUX
CFLAGS += -DARCH_PPC
CFLAGS += -DARCH_IS_BIG_ENDIAN

yet the ebuild has:

        if use ppc; then
                sed -e "s:^CC:#CC:" \
                        -e "s:^LIBDIR:#LIBDIR:" \
                        -e "s:^CFLAGS +=:#CFLAGS +=:" \
                        -e "s:^CFLAGS =:CFLAGS +=:" \
                        Makefile.linuxppc > Makefile

so the necessary -DARCH_xxx and others gets commented out.
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2002-12-16 15:05:32 UTC
I think the:

-------------------------------
        if use ppc; then
                sed -e "s:^CC:#CC:" \
                        -e "s:^LIBDIR:#LIBDIR:" \
                        -e "s:^CFLAGS +=:#CFLAGS +=:" \
                        -e "s:^CFLAGS =:CFLAGS +=:" \
                        Makefile.linuxppc > Makefile
-------------------------------

should be:

-------------------------------
        if use ppc; then
                sed -e "s:^CC:#CC:" \
                        -e "s:^LIBDIR:#LIBDIR:" \
                        -e "s:^CFLAGS +=:#CFLAGS +=:" \
                        -e "s:^CFLAGS =:CFLAGS +=:" \
                        -e "s:^#CFLAGS += -D:CFLAGS += -D:" \
                        Makefile.linuxppc > Makefile
-------------------------------

Like I told Rajiv, i think those seds are needed for cvs snapshots,
but cant remember now ..
Comment 2 Rajiv Aaron Manglani (RETIRED) gentoo-dev 2002-12-19 20:19:17 UTC
i removed those sed lines from ppc section of src_compile() since we are not
using a cvs snapshot for this ebuild. xvid now builds properly on ppc.