Recompiling QM

From ScarletDME
Jump to navigation Jump to search

Recompiling OpenQM

If you want to recompile OpenQM there are two different sections you need to look at: the C code and the QMBasic code. If you make any changes to the code then you really should run buildgpl again, as this basically rebuilds the system from the ground up.

If you alter the C code in gplsrc simply run "qm -stop", then buildgpl. This will compile your code and link it into the main routines. Depending upon compiler and library versions you may need to change some of the QM_GCC_OPTIONS in the buildgpl script. Try these in various combinations:

   * remove -Werror
   * add -Wno-packed
   * add -Wno-pointer-sign

If you change the basic programs in GPL.BP, however, you first need to compile them. First login to the sysprog account using "qm - Internal"; this allows you to compile the internal subroutines that would normally throw a compiler error. Then compile your altered routine. As GPL.BP.OUT doesn't exist immediately after an install, I'd suggest avoiding "* CHANGED" unless you actually want to compile them all. Finally exit qm and run .buildgpl. I'm not sure why this is necessary, but without it the changes only appear in the system account; running buildgpl propagates the changes properly.

Quick checklist:

After changing some C-code:

   * cd /usr/qmsys
   * qm -stop
   * ./buildgpl
   * qm -start

After changing Basic code:

   * qm -Internal "BASIC GPL.BP progname"
   * ./buildgpl

Gene and Ashley discovered that there was a missing file that prevented QPROC being recompiled. TODO:- recall and document this.