pkgsrc-Users archive

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

Re: missing math functions on powerpc (macppc)?



On Fri, 18 Dec 2015, Frank Wille wrote:

> Which pkgsrc is that? When I build libvpx on sandpoint 7.0 with

This is pkgsrc-HEAD, "frozen" in preparation for pkgsrc-2015Q4.  As
such "libvpx" is v1.5.0.

> pkgsrc-2015Q3 then the PowerPC-entries in configure and configure.sh are
> already (or still) present:
> 
> configure:
> all_platforms="${all_platforms} ppc32-darwin8-gcc"
> all_platforms="${all_platforms} ppc32-darwin9-gcc"
> all_platforms="${all_platforms} ppc32-linux-gcc"
> all_platforms="${all_platforms} ppc64-darwin8-gcc"
> all_platforms="${all_platforms} ppc64-darwin9-gcc"
> all_platforms="${all_platforms} ppc64-linux-gcc"
> 
> configure.sh:
>       *powerpc64*)
>         tgt_isa=ppc64
>         ;;
>       *powerpc*)
>         tgt_isa=ppc32
>         ;;

These no-longer exist in pkgsrc-HEAD w/libvpx 1.5.0.


> Although... I'm running into a compiler bug when trying to build libvpx:
> 
> ---8<---
>     [CC] vp9/encoder/vp9_temporal_filter.c.o
> libtool: compile:  gcc -O2 -maltivec -DNDEBUG -O3 -fPIC -U_FORTIFY_SOURCE
> -D_FORTIFY_SOURCE=0 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wall
> -Wdeclaration-after-statement -Wdisabled-optimization -Wpointer-arith
> -Wtype-limits -Wcast-qual -Wvla -Wimplicit-function-declaration
> -Wuninitialized -Wunused-variable -Wunused-but-set-variable
> -Wno-unused-function -I.
> -I/usr/pkgsrc-2015Q3-70/multimedia/libvpx/work/libvpx-1.4.0 -Wextra -c
> vp9/encoder/vp9_temporal_filter.c  -fPIC -DPIC -o
> vp9/encoder/.libs/vp9_temporal_filter.c.o
> rs6000_secondary_reload_inner:17027, type = load
> (parallel [
>         (set (reg:V8HI 82 5)
>             (mem:V8HI (and:SI (reg:SI 65 lr [orig:1018 D.10745 ] [1018])
>                     (const_int -16 [0xfffffffffffffff0])) [18
> MEM[(__uint16_t *)_890 & 4294967280B]+0 S16 A128]))
>         (clobber (reg:SI 21 21))
>     ])
> vp9/encoder/vp9_temporal_filter.c: In function
> 'vp9_temporal_filter_apply_c':
> vp9/encoder/vp9_temporal_filter.c:162:1: internal compiler error: in
> rs6000_secondary_reload_fail, at config/rs6000/rs6000.c:16818
>  }
>  ^
> no stack trace because unwind library not available
> ---8<---
> 
> 
> But even without compiler bug libvpx would never work on my machine
> (PPC8241, G2 core), as configure assumes that AltiVec is always present. :|

See pkg/49600 and the hack I posted therein.  I've since derived a
better one:

+--- multimedia/libvpx/hacks.mk.tmp	2015-12-14 16:21:17.000000000 -0600
++++ multimedia/libvpx/hacks.mk	2015-12-17 09:40:36.000000000 -0600
+@@ -10,3 +10,17 @@ PKG_HACKS+=		sparc-gcc-lock-up
+ BUILDLINK_TRANSFORM+=	rm:-O[0-9]*
+ .  endif
+ .endif
++ 
++### GCC 4.8.5 w/"-O3" produces broken library with undefined references.
++### See PR pkg/5xxxx for more details.
++.if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "powerpc"
++.  include "../../mk/compiler.mk"
++.  if !empty(CC_VERSION:Mgcc-4.[89].*)
++PKG_HACKS+=		powerpc-undefined-refs-with-level-3-optimization
++SUBST_CLASSES+=		libs
++SUBST_STAGE.libs=	post-patch
++SUBST_MESSAGE.libs=	Eliminate "-O3" from C{,XX}FLAGS
++SUBST_FILES.libs=	build/make/configure.sh
++SUBST_SED.libs=		-e '/enabled small/s, ||  *check_add_cflags -O3$$,,'
++.  endif
++.endif

-- 
|/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645



Home | Main Index | Thread Index | Old Index