Allegro port help
October 01, 2010 05:15PM
I have an Allegro-based game I am trying to port to the Wii. As the Wii does not have an Allegro port, I saw 3 possilibites:

1. Rewrite for a supported library (SDL or GRRLIB, for example).
2. Write a wrapper for a supported library that is compatible with Allegro's API (at least the functions I use).
3. Port Allegro.

I've decided to try my hand at option 3 (as it would probably be the least labor-intensive of the group). I've gotten devkitPro installed and can compile programs and run them on the Wii with no problem. When I try to compile Allegro, I start by running the configure script. Then, I run make. I get a bunch of messages go by as it compiles, along the lines of this:

powerpc-eabi-gcc -DALLEGRO_MODULES_PATH=\"/usr/local/lib/allegro\" -DHAVE_CONFIG_H -I. -Iinclude -Iinclude/allegro -I./include -I./include/allegro  -DALLEGRO_NO_ASM -DALLEGRO_LIB_BUILD   -O2 -funroll-loops -ffast-math -fomit-frame-pointer -Wall -Wno-unused  -fPIC -DALLEGRO_SHARED -c ./src/color.c -o obj/unix/shared/alleg/color.o
In file included from include/allegro/base.h:41,
                 from include/allegro.h:25,
                 from ./src/color.c:33:
include/allegro/internal/alconfig.h:305:1: warning: "stricmp" redefined
In file included from ./src/color.c:30:
c:\devkitpro\devkitppc\bin\../lib/gcc/powerpc-eabi/4.4.3/../../../../powerpc-eabi/include/string.h:89:1: warning: this is the location of the previous definition

Yes, I know that I'm not technically compiling for Unix, but I'm compiling in MSys and I don't know what other options to use in the configure script. I also know that I have to add machine-specific things to Allegro for the graphics, sound, input, and file drivers. Right now, I'm just trying to get it to compile as far as possible before I commit time to that part.

Anyway, after it's done a lot of compiling, it runs this and gets the following error message:

rm -f lib/unix/
powerpc-eabi-gcc -shared -o lib/unix/ obj/unix/shared/alleg/all
egro.o obj/unix/shared/alleg/blit.o obj/unix/shared/alleg/bmp.o obj/unix/shared/
alleg/clip3d.o obj/unix/shared/alleg/clip3df.o obj/unix/shared/alleg/colblend.o
obj/unix/shared/alleg/color.o obj/unix/shared/alleg/config.o obj/unix/shared/all
eg/datafile.o obj/unix/shared/alleg/dataregi.o obj/unix/shared/alleg/digmid.o ob
j/unix/shared/alleg/dither.o obj/unix/shared/alleg/dispsw.o obj/unix/shared/alle
g/drvlist.o obj/unix/shared/alleg/file.o obj/unix/shared/alleg/fli.o obj/unix/sh
ared/alleg/flood.o obj/unix/shared/alleg/font.o obj/unix/shared/alleg/fontbios.o
 obj/unix/shared/alleg/fontbmp.o obj/unix/shared/alleg/fontdat.o obj/unix/shared
/alleg/fontgrx.o obj/unix/shared/alleg/fonttxt.o obj/unix/shared/alleg/fsel.o ob
j/unix/shared/alleg/gfx.o obj/unix/shared/alleg/glyph.o obj/unix/shared/alleg/gr
aphics.o obj/unix/shared/alleg/gsprite.o obj/unix/shared/alleg/gui.o obj/unix/sh
ared/alleg/guiproc.o obj/unix/shared/alleg/inline.o obj/unix/shared/alleg/joysti
ck.o obj/unix/shared/alleg/keyboard.o obj/unix/shared/alleg/lbm.o obj/unix/share
d/alleg/libc.o obj/unix/shared/alleg/lzss.o obj/unix/shared/alleg/math.o obj/uni
x/shared/alleg/math3d.o obj/unix/shared/alleg/midi.o obj/unix/shared/alleg/mixer
.o obj/unix/shared/alleg/modesel.o obj/unix/shared/alleg/mouse.o obj/unix/shared
/alleg/pcx.o obj/unix/shared/alleg/poly3d.o obj/unix/shared/alleg/polygon.o obj/
unix/shared/alleg/quantize.o obj/unix/shared/alleg/quat.o obj/unix/shared/alleg/
readbmp.o obj/unix/shared/alleg/readfont.o obj/unix/shared/alleg/readsmp.o obj/u
nix/shared/alleg/rle.o obj/unix/shared/alleg/rotate.o obj/unix/shared/alleg/scen
e3d.o obj/unix/shared/alleg/sound.o obj/unix/shared/alleg/spline.o obj/unix/shar
ed/alleg/stream.o obj/unix/shared/alleg/text.o obj/unix/shared/alleg/tga.o obj/u
nix/shared/alleg/timer.o obj/unix/shared/alleg/unicode.o obj/unix/shared/alleg/v
table.o obj/unix/shared/alleg/vtable15.o obj/unix/shared/alleg/vtable16.o obj/un
ix/shared/alleg/vtable24.o obj/unix/shared/alleg/vtable32.o obj/unix/shared/alle
g/vtable8.o obj/unix/shared/alleg/alsa5.o obj/unix/shared/alleg/alsa9.o obj/unix
/shared/alleg/alsamidi.o obj/unix/shared/alleg/arts.o obj/unix/shared/alleg/sgia
l.o obj/unix/shared/alleg/jack.o obj/unix/shared/alleg/udjgpp.o obj/unix/shared/
alleg/udrvlist.o obj/unix/shared/alleg/uesd.o obj/unix/shared/alleg/ufile.o obj/
unix/shared/alleg/ugfxdrv.o obj/unix/shared/alleg/ujoydrv.o obj/unix/shared/alle
g/ukeybd.o obj/unix/shared/alleg/umain.o obj/unix/shared/alleg/umodules.o obj/un
ix/shared/alleg/umouse.o obj/unix/shared/alleg/uoss.o obj/unix/shared/alleg/uoss
midi.o obj/unix/shared/alleg/uptimer.o obj/unix/shared/alleg/usigalrm.o obj/unix
/shared/alleg/usnddrv.o obj/unix/shared/alleg/ustimer.o obj/unix/shared/alleg/us
ystem.o obj/unix/shared/alleg/uthreads.o obj/unix/shared/alleg/utimer.o obj/unix
/shared/alleg/modexsms.o obj/unix/shared/alleg/cblit16.o obj/unix/shared/alleg/c
blit24.o obj/unix/shared/alleg/cblit32.o obj/unix/shared/alleg/cblit8.o obj/unix
/shared/alleg/ccpu.o obj/unix/shared/alleg/ccsprite.o obj/unix/shared/alleg/cgfx
15.o obj/unix/shared/alleg/cgfx16.o obj/unix/shared/alleg/cgfx24.o obj/unix/shar
ed/alleg/cgfx32.o obj/unix/shared/alleg/cgfx8.o obj/unix/shared/alleg/cmisc.o ob
j/unix/shared/alleg/cscan15.o obj/unix/shared/alleg/cscan16.o obj/unix/shared/al
leg/cscan24.o obj/unix/shared/alleg/cscan32.o obj/unix/shared/alleg/cscan8.o obj
/unix/shared/alleg/cspr15.o obj/unix/shared/alleg/cspr16.o obj/unix/shared/alleg
/cspr24.o obj/unix/shared/alleg/cspr32.o obj/unix/shared/alleg/cspr8.o obj/unix/
shared/alleg/cstretch.o obj/unix/shared/alleg/czscan15.o obj/unix/shared/alleg/c
zscan16.o obj/unix/shared/alleg/czscan24.o obj/unix/shared/alleg/czscan32.o obj/
unix/shared/alleg/czscan8.o obj/unix/shared/alleg/ccolconv.o -s -L/c/devkitPro/l
ibogc/lib/wii -L/c/devkitPro/libogc/lib/wii -Wl,-h, -lm
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/4.4.3/ecrti.o: could not read
 symbols: File format not recognized
collect2: ld returned 1 exit status
make: *** [lib/unix/] Error 1

I have a feeling it's because I'm cross-compiling on a PC. Are there certain switches or options I need to use with the configure script to make this work?

Re: Allegro port help
October 01, 2010 07:12PM
First off, I give you HUGE thanks for doing this. A port of ALLEGRO for Wii would really open up wide doors for homebrew development (I was actually an ALLEGRO developer before I became a Wii homebrew developer so I'm really excited to see this).

Secondly, using 4.2.3 of ALLEGRO and the UNIX builds are definitely the best way to go about porting the library.

I took at look at the source to 4.2.3 on my end to see if I could reproduce your problem and so far I've been unsuccessful in getting the configure script to run (should probably try a different linux distro). I was wondering if you could share your alunixac.h header generated by the script with me?

Lastly, I wrote a simple makefile for compiling the library for Wii: [] . I don't know if it will help you out at all but you could try it and see I guess.
(My makefile does a static compilation as giantpune suggests below)

Edited 1 time(s). Last edit at 10/02/2010 01:26AM by Arikado.
Re: Allegro port help
October 02, 2010 01:17AM
it is still trying to make a .so.. lib/unix/ these are dynamic linked libraries. you need to configure it to make a static linked library ( "*.a" ).
Re: Allegro port help
October 10, 2010 06:23PM
Ever since this post DarkNation and I have been working pretty hard on getting ALLEGRO to run on the Wii and we've had a fair bit of success.

You can find the fruit of our labor here: []

Still a lot to do but a lot has already been done. We'd love it if some more people would help out.
Sorry, only registered users may post in this forum.

Click here to login