I'd give you more if I could figure out how, but it's dying somewhere in the asm and I'm not sure how to ferret out where since it's a temp file: /bin/sh ../libtool --tag=CC --mode=compile /usr/bin/gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/sw/include -Wall -force_cpusubtype_ALL -D_BSD_SOURCE -D_GNU_SOURCE -I.. -g -O2 -c -o liboil_0.3_la-liboilcpu.lo `test -f 'liboilcpu.c' || echo './'`liboilcpu.c /usr/bin/gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/sw/include -Wall -force_cpusubtype_ALL -D_BSD_SOURCE -D_GNU_SOURCE -I.. -g -O2 -c liboilcpu.c -fno-common -DPIC -o .libs/liboil_0.3_la-liboilcpu.o /var/tmp//ccvqR3pE.s:380:Parameter syntax error (parameter 1) make[1]: *** [liboil_0.3_la-liboilcpu.lo] Error 1 Is there an easy way to get gcc to tell me where the code's coming from?
Created attachment 5988 [details] This file was requested for debugging I had the same problem. Attached is a file that was requested on the mailing list for debugging purposes. I tried to compile on MacOSX 10.4.2, with gcc version 4.0.1
btw, it builds on 10.4/x86 now, just not on ppc
Created attachment 6101 [details] [review] asm patch for ppc I talked to one of the gcc folks who hangs around in darwin channels, and he says the attached patch fixes it (I don't understand asm *nor* altivec, so I can't speak for it's validity). He said, however: <pinskia> anyways the best way to have the illegal instruction to hit for altivec is asm volatile ("vor v0,v0,v0"); <RangerRick> ok <pinskia> which is a nop and does not change any register <pinskia> unlike their current check which changes v0 which could cause things to go bad <pinskia> #ifdef __MACH__ <pinskia> asm volatile ("vor v0,v0,v0"); <pinskia> #else <pinskia> asm volatile ("vor 0,0,0"); <pinskia> #endif <pinskia> is what is used in GCC
after more discussion, it was also discussed that the "correct" way to do this on osx is a sysctl: http://developer.apple.com/hardwaredrivers/ve/g3_compatibility.html
Created attachment 6103 [details] [review] using sysctl yeah, the previous asm patch caused osx to pop up a crash error, and the tests don't pass... However, with this new patch using sysctl (and the powerpc md5 code disabled) all tests pass on 10.3/ppc and 10.4/ppc. The mmx_engine.c file fails to compile on x86 though, with this error: /usr/bin/gcc -DHAVE_CONFIG_H -I. -I. -I.. -Os -I/fink/include -Wall -D_BSD_SOURCE -D_GNU_SOURCE -I.. -Os -c mmx_engine.c /var/tmp//cc4iMVAh.s:368:Alignment too large: 15. assumed. /var/tmp//cc4iMVAh.s:416:Alignment too large: 15. assumed. /var/tmp//cc4iMVAh.s:461:Alignment too large: 15. assumed. /var/tmp//cc4iMVAh.s:506:Alignment too large: 15. assumed. (and a billion more) changing ".align 16" to ".align 4" fixes it (and all tests pass), but I don't know what's actually happening there, so it's probably wrong. :) I also get some "OIL: ERROR liboilcpu.c 549: oil_cpu_detect_kernel_support(): Operating system is not known to support SSE. Assuming it does, which might cause problems" warnings, adding "&& !defined(__APPLE__)" fixes it.
looks like apple has the same sysctl as freebsd, so in liboilcpu.c you could really change the #ifdef __FreeBSD__ to: #if defined(__FreeBSD__) || defined(__APPLE__) test suite still passes with this enabled I realized that the sysctl bit is probably not portable to linux/ppc etc, so I guess it still needs to be refactored, but at least things are working on ppc for now, enough that I cna release fink packages. :)
Patch in comment#5 works for me (PPC MacosX 10.4).
Well, I got liboil itself to compile, along with most of the testsuite, using the patch in comment#5, but other tests and some of the example directories fail to compile: nader:~/tests/liboil/examples/md5 perim$ make /bin/sh ../../libtool --mode=link gcc -g -O2 -o md5sum md5sum-md5sum.o ../../liboil/ liboil-0.3.la gcc -g -O2 -o .libs/md5sum md5sum-md5sum.o ../../liboil/.libs/liboil-0.3.0.1.0.dylib -lm /usr/bin/ld: Undefined symbols: _oil_function_class_ptr_md5 collect2: ld returned 1 exit status make: *** [md5sum] Error 1 nader:~/tests/liboil/examples/taylor perim$ make /bin/sh ../../libtool --mode=link gcc -g -O2 -o example1 example1-example1.o ../../liboil/ liboil-0.3.la gcc -g -O2 -o .libs/example1 example1-example1.o ../../liboil/.libs/liboil-0.3.0.1.0.dylib -lm /usr/bin/ld: Undefined symbols: _oil_function_class_ptr_add_f32 _oil_function_class_ptr_multiply_f32 _oil_function_class_ptr_scalaradd_f32_ns _oil_function_class_ptr_scalarmultiply_f32_ns collect2: ld returned 1 exit status make: *** [example1] Error 1 etc
Ping. Please try compiling 0.3.11.
I can't reproduce this on 10.4/ppc with 0.3.11, marking as fixed.
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.