Compiling liboil-0.3.9 on NetBSD 3.0.1/macppc results in the following errors: Making all in powerpc if /bin/sh ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I /usr/pkg/include -Wall -Wa,-mregnames -D_BSD_SOURCE -D_GNU_SOURCE -I../.. -g -O2 -MT libpowerpc_la-abs.lo -MD -MP -MF ".deps/libpowerpc_la-abs.Tpo" -c -o libpowerpc_la-abs.lo `test -f 'abs.c' || echo './'`abs.c; then mv -f ".deps/libpowerpc_la-abs.Tpo" ".deps/libpowerpc_la-abs.Plo"; else rm -f ".deps/libpowerpc_la-abs.Tpo"; exit 1; fi mkdir .libs gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I /usr/pkg/include -Wall -Wa,-mregnames -D_BSD_SOURCE -D_GNU_SOURCE -I../.. -g -O2 -MT libpowerpc_la-abs.lo -MD -MP -MF .deps/libpowerpc_la-abs.Tpo -c abs.c -fPIC -DPIC -o .libs/libpowerpc_la-abs.o gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I /usr/pkg/include -Wall -Wa,-mregnames -D_BSD_SOURCE -D_GNU_SOURCE -I../.. -g -O2 -MT libpowerpc_la-abs.lo -MD -MP -MF .deps/libpowerpc_la-abs.Tpo -c abs.c -o libpowerpc_la-abs.o >/dev/null 2>&1 if /bin/sh ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I /usr/pkg/include -Wall -Wa,-mregnames -D_BSD_SOURCE -D_GNU_SOURCE -I../.. -g -O2 -MT libpowerpc_la-clip.lo -MD -MP -MF ".deps/libpowerpc_la-clip.Tpo" -c -o libpowerpc_la-clip.lo `test -f 'clip.c' || echo './'`clip.c; then mv -f ".deps/libpowerpc_la-clip.Tpo" ".deps/libpowerpc_la-clip.Plo"; else rm -f ".deps/libpowerpc_la-clip.Tpo"; exit 1; fi gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I /usr/pkg/include -Wall -Wa,-mregnames -D_BSD_SOURCE -D_GNU_SOURCE -I../.. -g -O2 -MT libpowerpc_la-clip.lo -MD -MP -MF .deps/libpowerpc_la-clip.Tpo -c clip.c -fPIC -DPIC -o .libs/libpowerpc_la-clip.o gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I /usr/pkg/include -Wall -Wa,-mregnames -D_BSD_SOURCE -D_GNU_SOURCE -I../.. -g -O2 -MT libpowerpc_la-clip.lo -MD -MP -MF .deps/libpowerpc_la-clip.Tpo -c clip.c -o libpowerpc_la-clip.o >/dev/null 2>&1 if /bin/sh ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I /usr/pkg/include -Wall -Wa,-mregnames -D_BSD_SOURCE -D_GNU_SOURCE -I../.. -g -O2 -MT libpowerpc_la-conv.lo -MD -MP -MF ".deps/libpowerpc_la-conv.Tpo" -c -o libpowerpc_la-conv.lo `test -f 'conv.c' || echo './'`conv.c; then mv -f ".deps/libpowerpc_la-conv.Tpo" ".deps/libpowerpc_la-conv.Plo"; else rm -f ".deps/libpowerpc_la-conv.Tpo"; exit 1; fi gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I /usr/pkg/include -Wall -Wa,-mregnames -D_BSD_SOURCE -D_GNU_SOURCE -I../.. -g -O2 -MT libpowerpc_la-conv.lo -MD -MP -MF .deps/libpowerpc_la-conv.Tpo -c conv.c -fPIC -DPIC -o .libs/libpowerpc_la-conv.o gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I /usr/pkg/include -Wall -Wa,-mregnames -D_BSD_SOURCE -D_GNU_SOURCE -I../.. -g -O2 -MT libpowerpc_la-conv.lo -MD -MP -MF .deps/libpowerpc_la-conv.Tpo -c conv.c -o libpowerpc_la-conv.o >/dev/null 2>&1 if /bin/sh ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I /usr/pkg/include -Wall -Wa,-mregnames -D_BSD_SOURCE -D_GNU_SOURCE -I../.. -g -O2 -MT libpowerpc_la-copy.lo -MD -MP -MF ".deps/libpowerpc_la-copy.Tpo" -c -o libpowerpc_la-copy.lo `test -f 'copy.c' || echo './'`copy.c; then mv -f ".deps/libpowerpc_la-copy.Tpo" ".deps/libpowerpc_la-copy.Plo"; else rm -f ".deps/libpowerpc_la-copy.Tpo"; exit 1; fi gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I /usr/pkg/include -Wall -Wa,-mregnames -D_BSD_SOURCE -D_GNU_SOURCE -I../.. -g -O2 -MT libpowerpc_la-copy.lo -MD -MP -MF .deps/libpowerpc_la-copy.Tpo -c copy.c -fPIC -DPIC -o .libs/libpowerpc_la-copy.o /var/tmp//ccTEzesh.s: Assembler messages: /var/tmp//ccTEzesh.s:63: Error: Unrecognized opcode: `lvsl' /var/tmp//ccTEzesh.s:64: Error: Unrecognized opcode: `lvx' /var/tmp//ccTEzesh.s:67: Error: Unrecognized opcode: `lvx' /var/tmp//ccTEzesh.s:68: Error: Unrecognized opcode: `vperm' /var/tmp//ccTEzesh.s:69: Error: Unrecognized opcode: `stvx' /var/tmp//ccTEzesh.s:70: Error: Unrecognized opcode: `vor' /var/tmp//ccTEzesh.s:98: Error: Unrecognized opcode: `lvx' /var/tmp//ccTEzesh.s:99: Error: Unrecognized opcode: `stvx' /var/tmp//ccTEzesh.s:184: Error: Unrecognized opcode: `lvsl' /var/tmp//ccTEzesh.s:185: Error: Unrecognized opcode: `lvx' /var/tmp//ccTEzesh.s:188: Error: Unrecognized opcode: `lvx' /var/tmp//ccTEzesh.s:190: Error: Unrecognized opcode: `lvx' /var/tmp//ccTEzesh.s:192: Error: Unrecognized opcode: `lvx' /var/tmp//ccTEzesh.s:194: Error: Unrecognized opcode: `lvx' /var/tmp//ccTEzesh.s:196: Error: Unrecognized opcode: `vperm' /var/tmp//ccTEzesh.s:197: Error: Unrecognized opcode: `vperm' /var/tmp//ccTEzesh.s:198: Error: Unrecognized opcode: `vperm' /var/tmp//ccTEzesh.s:199: Error: Unrecognized opcode: `vperm' /var/tmp//ccTEzesh.s:200: Error: Unrecognized opcode: `stvx' /var/tmp//ccTEzesh.s:202: Error: Unrecognized opcode: `stvx' /var/tmp//ccTEzesh.s:204: Error: Unrecognized opcode: `stvx' /var/tmp//ccTEzesh.s:206: Error: Unrecognized opcode: `stvx' /var/tmp//ccTEzesh.s:208: Error: Unrecognized opcode: `vor' *** Error code 1 Stop. make: stopped in /tmp/liboil-0.3.9/liboil/powerpc *** Error code 1 Stop. make: stopped in /tmp/liboil-0.3.9/liboil *** Error code 1 Stop. make: stopped in /tmp/liboil-0.3.9 *** Error code 1 Stop. make: stopped in /tmp/liboil-0.3.9 It looks like (to my less-than-knowledgable eyes) these are Altivec instructions which are causing the assembler some confusion. GCC version: Using built-in specs. Configured with: /home/nick/work/netbsd/src/tools/gcc/../../gnu/dist/gcc/configure --enable-long-long --disable-multilib --enable-threads --disable-symvers --build=i386-unknown-netbsdelf2.0. --host=powerpc--netbsd --target=powerpc--netbsd Thread model: posix gcc version 3.3.3 (NetBSD nb3 20040520) The machine in question is a 366MHz G3 (750-series) processor, which as far as I know doesn't support Altivec instructions.
I think the solution to this problem is quite simple. I think I misunderstood how liboil works, normally if I see Altivec instructions being compiled, I assume they will be called, but I infer that's not the case with liboil, rather it determines at run-time whether to apply them. (Or that's what the slide show posted on the wiki site suggests. I haven't had time to look at the code.) I was able to fix builds on NetBSD/macppc just by adding -maltivec and -mabi=altivec to the CFLAGS variable. NetBSD does not enable these by default during compiles (especially not on an install with a G3 processor). I understand another NetBSD user successfully compiled with these changes on a G4 though they encountered some relocation issues when trying to run gstreamer, but that's a separate problem. So the fix seems to be that if the configure script finds the compiler supports Altivec, and it does, and it's GCC, then the CFLAGS variable should be set to explicitly accommodate compiling Altivec instructions.
Uh, duh, add -maltivec on powerpc. Sorry I took so long to fix this.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.