pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

multimedia/x264-devel does not build on NetBSD/macppc

I have noticed that several packages have been updated to use
x264-devel, but that package does not build on NetBSD/macppc (both src
and pkgsrc current as of today).

During building I see:

mkdir common/ppc/.libs
 cc -c -O4 -ffast-math -O2 -Wall -I. -DARCH_PPC -DSYS_NETBSD
-DHAVE_PTHREAD -s -fomit-frame-pointer -maltivec -mabi=altivec
common/ppc/mc.c  -fPIC -DPIC -o common/ppc/.libs/mc.o
In file included from common/ppc/mc.c:34:
./x264.h:32:4: warning: #warning You must include stdint.h or
inttypes.h before x264.h
In file included from common/ppc/mc.c:39:
common/ppc/ppccommon.h:45: error: expected specifier-qualifier-list
before 'vector'
common/ppc/ppccommon.h:50: error: expected specifier-qualifier-list
before 'vector'
common/ppc/ppccommon.h:55: error: expected specifier-qualifier-list
before 'vector'

I don't know whether the #warning about stdint.h or inttypes.h is
important, but the messages from commom/ppc/ppccommon.h (and several
places) all occur because altivec.h is not included.

Several files in common/ppc (dct.c, deblock.c, mc.c, pixel.c,
predict.c, and quant.c) include this header in the following way:

#ifdef SYS_LINUX
#include <altivec.h>

I guess that this could patched to look like

#if defined(SYS_LINUX) || defined(__NetBSD__)
#include <altivec.h>

(The test for __NetBSD__ could be changed in to a test for an
appropriate SYS_xxx if such a symbol is defined to denote NetBSD).

After doing this, the next problem occurs:

(cd .libs && rm -f && ln -s ../
libtool  --mode=link cc -o x264 x264.o matroska.o muxers.o
-L/usr/lib -Wl,-R/usr/lib -Wl,-R/usr/pkg/lib -lm -lpthread -s
cc -o .libs/x264 x264.o matroska.o muxers.o -Wl,-R/usr/pkg/lib -s
-lm -lpthread  -Wl,--rpath -Wl,/usr/pkg/lib
./.libs/ undefined reference to `x264_cpu_detect'
gmake: *** [x264] Error 1
*** Error code 2

make: stopped in /home/NetBSD/pkgsrc/multimedia/x264-devel
*** Error code 1

This is because common/cpu.c does not define x264_cpu_detect of
ARCH_PPC is defined, but neither SYS_MACOSX nor SYS_LINUX is defined.

I have no patch to solve the latter issue, so I just report it here.

- Erik

Home | Main Index | Thread Index | Old Index