<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://scarlet.deltasoft.com/index.php?action=history&amp;feed=atom&amp;title=Recompiling_ScarletDME</id>
	<title>Recompiling ScarletDME - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://scarlet.deltasoft.com/index.php?action=history&amp;feed=atom&amp;title=Recompiling_ScarletDME"/>
	<link rel="alternate" type="text/html" href="https://scarlet.deltasoft.com/index.php?title=Recompiling_ScarletDME&amp;action=history"/>
	<updated>2026-06-01T20:12:45Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.0</generator>
	<entry>
		<id>https://scarlet.deltasoft.com/index.php?title=Recompiling_ScarletDME&amp;diff=1187&amp;oldid=prev</id>
		<title>Geneb: Created page with &quot;==Compiling ScarletDME from source==  The first step is to &quot;clone into&quot; the git repository that has the ScarletDME source code. If you haven&#039;t done this yet, the command is:  ...&quot;</title>
		<link rel="alternate" type="text/html" href="https://scarlet.deltasoft.com/index.php?title=Recompiling_ScarletDME&amp;diff=1187&amp;oldid=prev"/>
		<updated>2013-06-25T15:49:15Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Compiling ScarletDME from source==  The first step is to &amp;quot;clone into&amp;quot; the git repository that has the ScarletDME source code. If you haven&amp;#039;t done this yet, the command is:  ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Compiling ScarletDME from source==&lt;br /&gt;
&lt;br /&gt;
The first step is to &amp;quot;clone into&amp;quot; the git repository that has the ScarletDME source code. If you haven&amp;#039;t done this yet, the command is:&lt;br /&gt;
&lt;br /&gt;
 git clone git://github.com/geneb/ScarletDME.git&lt;br /&gt;
&lt;br /&gt;
This will create a directory called ScarletDME and it will contain the full C and BASIC source code tree.&lt;br /&gt;
&lt;br /&gt;
If you just want to compile and install ScarletDME, it&amp;#039;s very simple:&lt;br /&gt;
&lt;br /&gt;
 make &lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
And you&amp;#039;re done! :)&lt;br /&gt;
&lt;br /&gt;
By default &amp;quot;make install&amp;quot; will place the system in &amp;#039;&amp;#039;&amp;#039;/usr/qmsys&amp;#039;&amp;#039;&amp;#039;, so you&amp;#039;ll need to either be root on the system you&amp;#039;re using or have access to root privilege commands via &amp;quot;sudo&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you do not want the files being installed into &amp;#039;&amp;#039;&amp;#039;/usr/qmsys&amp;#039;&amp;#039;&amp;#039;, you can edit the Makefile and change the line shown below to point where you&amp;#039;d like the installation action to put ScarletDME.&lt;br /&gt;
&lt;br /&gt;
 INSTROOT := /usr/qmsys&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you only want to update all the system data files from the source repository, you can use the make target &amp;quot;datafiles&amp;quot;.  This will copy all the system data into the INSTROOT location. Note that it WILL OVER-WRITE ANY EXISTING DATA!  Please use the &amp;quot;datafiles&amp;quot; target with caution.&lt;br /&gt;
&lt;br /&gt;
If you want to start from a clean slate, there is a make target called &amp;quot;clean&amp;quot; that will remove all the object files from the &amp;quot;gplobj&amp;quot; directory.  The make target &amp;quot;distclean&amp;quot; will also remove the compiled binaries as well as the terminfo database.  &lt;br /&gt;
&lt;br /&gt;
The terminfo database can be built by hand with the following command executed from the root of the ScarletDME source directory:&lt;br /&gt;
&lt;br /&gt;
 bin/qmtic -pterminfo terminfo.src&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Recompiling the original GPL OpenQM==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you alter the C code in gplsrc simply run &amp;quot;qm -stop&amp;quot;, 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:&lt;br /&gt;
&lt;br /&gt;
    * remove -Werror&lt;br /&gt;
    * add -Wno-packed&lt;br /&gt;
    * add -Wno-pointer-sign&lt;br /&gt;
&lt;br /&gt;
Recent Ubuntu (11.10) and other distributiuons have moved some of the library locations.  You may have to edit the QMLIBS line in the buildgpl script.  Try these&lt;br /&gt;
&lt;br /&gt;
    * QMLIBS=&amp;quot;-lm -lcrypt -ldl&amp;quot;&lt;br /&gt;
    * QMLIBS=&amp;quot;-Wl,--no-as-needed -lm -lcrypt -ldl&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you change the basic programs in GPL.BP, however, you first need to compile them. First login to the sysprog account using &amp;quot;qm - Internal&amp;quot;; 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&amp;#039;t exist immediately after an install, I&amp;#039;d suggest avoiding &amp;quot;* CHANGED&amp;quot; unless you actually want to compile them all. Finally exit qm and run .buildgpl. I&amp;#039;m not sure why this is necessary, but without it the changes only appear in the system account; running buildgpl propagates the changes properly.&lt;br /&gt;
&lt;br /&gt;
Quick checklist:&lt;br /&gt;
&lt;br /&gt;
After changing some C-code:&lt;br /&gt;
&lt;br /&gt;
    * cd /usr/qmsys&lt;br /&gt;
    * qm -stop&lt;br /&gt;
    * ./buildgpl&lt;br /&gt;
    * qm -start&lt;br /&gt;
&lt;br /&gt;
After changing Basic code:&lt;br /&gt;
&lt;br /&gt;
    * qm -Internal &amp;quot;BASIC GPL.BP progname&amp;quot;&lt;br /&gt;
    * ./buildgpl&lt;br /&gt;
&lt;br /&gt;
Gene and Ashley discovered that there was a missing file that prevented QPROC being recompiled.  TODO:- recall and document this.&lt;/div&gt;</summary>
		<author><name>Geneb</name></author>
		
	</entry>
</feed>