Hi,
I’m trying to build a universal MacOSX binary for my program (tuxmath) on a
new Intel iMac running Leopard (10.5). The program builds and installs
properly with “./configure; make; sudo make install” and runs fine.
When I try to do the ppc crossbuild, the ppc *.o files get generated OK, but
the linking fails (of course) because my SDL and other needed libs are
i386-only (I build SDL and friends on my machine using Fink).
So, I would like to get universal binary libs in place for SDL, SDL_image,
SDL_mixer, and SDL_ttf (also gettext, but that’s another story).
-
grabbing the SDL-1.2.13 dmg file and copying the framework
into /Library/Frameworks didn’t work, I assume because my program is
makefile-based rather than using XCode. -
Using the SDL-1.2.13 source, I tried the ‘fatbuild.sh’ script, which I
think is supposed to be what I need, but it fails:
janis-lehtinens-imac:SDL-1.2.13 dbruce$ sudo sh build-scripts/fatbuild.sh
Password:
checking build system type… i386-apple-darwin
checking host system type… powerpc-apple-darwin
checking for powerpc-apple-darwin-gcc… gcc-4.0 -arch ppc
checking for C compiler default output file name… rm: a.out.dSYM: is a
directory
a.out
checking whether the C compiler works… yes
checking whether we are cross compiling… yes
checking for suffix of executables…
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether gcc-4.0 -arch ppc accepts -g… yes
checking for gcc-4.0 -arch ppc option to accept ISO C89… unsupported
checking how to run the C preprocessor… /lib/cpp
configure: error: C preprocessor “/lib/cpp” fails sanity check
See `config.log’ for more details.
fwiw, no ‘config.log’ is written.
- I’ve also tried ./configure and make using CFLAGS="-O -g -arch i386 -arch
ppc" and LDFLAGS="-arch i386 -arch ppc", which fails at the linking stage
with:
ld: warning in build/.libs/mmx_main.o, file is not of required architecture
ld: warning in build/.libs/mmxp2_32.o, file is not of required architecture
ld: warning in build/.libs/x86_main.o, file is not of required architecture
ld: warning in build/.libs/x86p_16.o, file is not of required architecture
ld: warning in build/.libs/x86p_32.o, file is not of required architecture
Undefined symbols:
"_ConvertX86p32_24BGR888", referenced from:
_normal_blit_4 in SDL_blit_N.o
"_ConvertMMXpII32_16BGR555", referenced from:
_normal_blit_4 in SDL_blit_N.o
"_ConvertMMXpII32_16BGR565", referenced from:
_normal_blit_4 in SDL_blit_N.o
(and about twenty more “_ConvertMMX*” and “_ConvertX86*” undefined symbols).
Is there any established way to get universal binary versions of the SDL libs
onto a system for use in a makefile-based project?
Thanks,–
David Bruce