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 Thu, 17 Dec 2015, Greg Troxel wrote:

> Next is to look at the configure log and the libvpx build system to
> figure out why it's leaving it out.

The problem seems to be that "powerpc--netbsd" was treated at "generic-gnu"
rather than "linux", so linux-specific configuration steps were skipped.
This caused "-lm -lrt" to be omitted from the shared library linkage.

Adding "powerpc-linux-gcc" in the "all_targets" assignment in
"$WRKSRC/configure" and a corresponding "powerpc*)" case for "tgt_isa"
detection/selection in "$WRKSRC/build/make/configure.sh" allows it to
link properly.

Now, I get:

$ ldd /usr/pkg/lib/libvpx.so  
/usr/pkg/lib/libvpx.so:
        -lm.0 => /usr/lib/libm.so.0
        -lgcc_s.1 => /usr/lib/libgcc_s.so.1
        -lc.12 => /usr/lib/libc.so.12
        -lrt.1 => /usr/lib/librt.so.1
        -lpthread.1 => /usr/lib/libpthread.so.1

Additional patches (in LOCALPATCHES for now):

+--- configure.orig	2015-12-17 12:12:31.000000000 -0600
++++ configure	2015-12-17 12:13:49.000000000 -0600
+@@ -111,6 +111,7 @@ all_platforms="${all_platforms} armv7-wi
+ all_platforms="${all_platforms} armv7s-darwin-gcc"
+ all_platforms="${all_platforms} mips32-linux-gcc"
+ all_platforms="${all_platforms} mips64-linux-gcc"
++all_platforms="${all_platforms} powerpc-linux-gcc"
+ all_platforms="${all_platforms} sparc-linux-gcc"
+ all_platforms="${all_platforms} sparc-solaris-gcc"
+ all_platforms="${all_platforms} x86-android-gcc"

+--- build/make/configure.sh.orig	2015-12-17 12:12:30.000000000 -0600
++++ build/make/configure.sh	2015-12-17 12:16:53.000000000 -0600
+@@ -661,6 +661,9 @@ process_common_toolchain() {
+       *i[3456]86*)
+         tgt_isa=x86
+         ;;
++      powerpc*)
++        tgt_isa=powerpc
++        ;;
+       *sparc*)
+         tgt_isa=sparc
+         ;;

With the above, ffmpeg010 configures successfully on macppc.

-- 
|/"\ 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