Node:Allegro and GRX, Next:, Previous:No EXE, Up:Compiling

8.17 Building Allegro or GRX library fails

Q: When I try to build the Allegro library, liballeg.a, I get some cryptic message about register-opcode mismatch. What am I doing wrong?

Q: Why do I get these messages saying "fixed or forbidden register 0 (ax) was spilled" when I try to build Allegro?

Q: It seems I miss one of the source files from the Allegro distribution, because Make cannot find it when I try to build Allegro.

Q: I can't build Allegro: it keeps telling me that I "need to install gcc2721b.zip". But I already have GCC installed!

A: You should get the latest version of Allegro that is available either from SimTel.NET or from Shawn Hargreaves' site.

Versions of Allegro before 3.0 are known to have bugs which triggered register-opcode mismatch messages.

GCC 2.95 became more picky about some invalid use of clobber specifiers in Allegro's inline assembly, so what compiled with GCC 2.8.1 won't compile anymore; latest versions of Allegro (3.12 and above) correct that.

GRX versions 2.3 and older also have a few places where the newer GCC releases won't compile the inline assembly code. Ian Miller created two patch files that solve two different classes of problems with GRX 2.3 inline assembly, and made them available from his Web page: patches for the clobber list problem and patch for indirect calls. You will need to use the patch utility to apply these patch files, and then recompile the offending library. A DJGPP port of the GNU patch is available from SimTel.

For a general explanation of how to correct clobber list specifications in inline asm code so that they will compile with GCC 2.95 and later, see the GCC FAQ list.