Summary: | vlc-0.8.1 build fails on deinterlace.c, function `MergeAltivec' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Michael Kiermaier <michael.kiermaier> |
Component: | Current packages | Assignee: | PPC Porters <ppc> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | media-video |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | PPC | ||
OS: | All | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Michael Kiermaier
2005-02-15 09:30:59 UTC
1 remove -fsigned char 2 looks like vlc doesn't think that there are non altivec ppc around anymore removing -fsigned-char does not change anything, the error subsists. the vlc ebuild uses the use-flag "altivec". It is not set on my iBook. Could there be an error handling this use-flag in the ebuild? It looks like something is wrong with the configure script. It seems to check whether gcc can compile altivec code, and then it seems to enable altivec. A simple workaround to get vlc to compile, is to comment out some lines in config.h after the configure script ended. config.h /should/ contain the following i think: /**************************/ /* Define if \$CC groks AltiVec inline assembly. */ /* #undef CAN_COMPILE_ALTIVEC */ /* Define if your compiler groks C AltiVec extensions. */ /* #undef CAN_COMPILE_C_ALTIVEC */ /**************************/ But as you will see, it will have a define for both. If it's not defined, then it will take a GenericMerge function in deinterlace.c. With the modified config.h, i got it to compile. (didn't do a lot of testing though) I don't have an altivec-less PPC to test on, however in configure.ac there are two tests for Altivec present, and your system would have to pass them in order for the correct DEFINES in config.h to occur. AC_CACHE_CHECK([if \$CC groks AltiVec inline assembly], [ac_cv_altivec_inline], [CFLAGS="${CFLAGS_save}" AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");], ac_cv_altivec_inline=yes, [CFLAGS="${CFLAGS_save} -Wa,-m7400" AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");], [ac_cv_altivec_inline="-Wa,-m7400"], ac_cv_altivec_inline=no) ])]) if test "${ac_cv_altivec_inline}" != "no"; then AC_DEFINE(CAN_COMPILE_ALTIVEC, 1, Define if \$CC groks AltiVec inline assembly.) if test "${ac_cv_altivec_inline}" != "yes"; then VLC_ADD_CFLAGS([idctaltivec],[${ac_cv_altivec_inline}]) VLC_ADD_CFLAGS([motionaltivec],[${ac_cv_altivec_inline}]) VLC_ADD_CFLAGS([memcpyaltivec],[${ac_cv_altivec_inline}]) VLC_ADD_CFLAGS([i420_yuy2_altivec],[${ac_cv_altivec_inline}]) VLC_ADD_CFLAGS([vlc],[${ac_cv_altivec_inline}]) fi ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}" fi and AC_CACHE_CHECK([if \$CC groks AltiVec C extensions], [ac_cv_c_altivec], [# Darwin test CFLAGS="${CFLAGS_save} -faltivec" AC_TRY_COMPILE([], [vec_ld(0, (unsigned char *)0);], [ac_cv_c_altivec="-faltivec"], [# Linux/PPC test (no flags) CFLAGS="${CFLAGS_save} ${CFLAGS_idctaltivec} -maltivec -mabi=altivec" AC_TRY_COMPILE([#ifdef HAVE_ALTIVEC_H #include <altivec.h> #endif], [vec_ld(0, (unsigned char *)0);], [ac_cv_c_altivec="" ac_cv_c_altivec_abi="-maltivec -mabi=altivec"], [# Linux/PPC test (old GCC versions) CFLAGS="${CFLAGS_save} ${CFLAGS_idctaltivec} -fvec" AC_TRY_COMPILE([#ifdef HAVE_ALTIVEC_H #include <altivec.h> #endif], [vec_ld(0, (unsigned char *)0);], [ac_cv_c_altivec="-fvec"], [ac_cv_c_altivec=no]) ]) ]) CFLAGS="${CFLAGS_save}"]) if test "${ac_cv_c_altivec}" != "no"; then AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, Define if your compiler groks C AltiVec extensions.) VLC_ADD_CFLAGS([vlc],[${ac_cv_c_altivec}]) VLC_ADD_CFLAGS([idctaltivec motionaltivec],[${ac_cv_c_altivec}]) VLC_ADD_CFLAGS([i420_yuy2_altivec memcpyaltivec deinterlace], [${ac_cv_c_altivec} ${ac_cv_c_altivec_abi}]) ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}" fi It only enables altivec ( see the AC_DEFINE() statements ) when the processor can compile altivec, otherwise it skips them. However, later in the configure script, altivec optimizations are turned on by default on PowerPC architectures. dnl dnl AltiVec acceleration dnl AC_ARG_ENABLE(altivec, [ --disable-altivec disable AltiVec optimizations (default enabled on PPC)], [ if test "${enable_altivec}" = "yes"; then ARCH="${ARCH} altivec"; VLC_ADD_BUILTINS([${ACCEL_MODULES}]) fi ], [ if test "${target_cpu}" = "powerpc"; then ARCH="${ARCH} altivec"; VLC_ADD_BUILTINS([${ACCEL_MODULES}]) fi ]) However, most of the vlc e-builds I looked at did had the correct altivec USE flag usage, and the latter example of setting altivec to on would be over-ridden by having a -altivec flag. Can you look in your config.h and see if the variables "CAN_COMPILE_C_ALTIVEC" and "CAN_COMPILE_ALTIVEC" are defined? If so it would be interesting to see how your compiler managed to pass the configure tests. If u uncomment the config.h.in line: /**************************/ /* Define if \$CC groks AltiVec inline assembly. */ /* #undef CAN_COMPILE_ALTIVEC */ /* Define if your compiler groks C AltiVec extensions. */ /* #undef CAN_COMPILE_C_ALTIVEC */ /**************************/ as described by Ruben, it works and emerge perfectly. Can you try with 0.8.2 ? PPC team, I don't have the hardware to look at this, can someone take a look? I've got the same problem on my ibook G3 with version 0.8.2 I tried version 0.8.4 beta1 and everything builds and works fine Is 0.8.4 fixed then? same error with media-video/vlc-0.8.4-r1 here on x86 ... what the...? altivec problems on x86 does not really seem the case. My iBook is broken, so at the moment I cannot test if it works. As soon as I get it repaired, I will test the new version. My iBook is back, thanks for your patience. 0.8.4 compiles without problems. |