LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org

No diff available--this is the first major revision. (minor diff, author diff)

What to do when your patch seems ready for integration

Just because your patch seems to work, that doesnt necessarily mean the package build following the integration into the git.linuxcnc.org repo will succeed.

To assure this, follow the recipe below.

Note - there might still be build failures for different architectures than your CPU. For instance, amd64 builds are notorious for requiring stricter typing than x86 builds, e.g. on printf-style arguments. But the recipe below should assure at least the build for your CPU architecure succeeds; the buildbot logs will then hint what the problem with other architectures could be.

Preparing a contribution to LinuxCNC

After testing your changes and checking them into git, please assure the following steps work:

First, clean the build tree so your test build does not accidentially rely on files which were not checked into git and hence will not be present when pushing the change - first test like so:

 $ cd emc2-dev

 # shows which files 'git clean -xdf' will remove so only the files in
 # the repo are in the build tree - carefully check the list so you
 # dont accidentially remove a valuable file!
 $ git clean -xdn 

 # when all valuable files are in the git repo or out of the way, clean up:
 $ git clean -xdf

 # now configure, and build:
 $ cd src
 $ ./autogen.sh
 $ ./configure <configure options>
 $ make

This should complete successfully. To see the full detail of command line options, use 'make V=1'.

Running the regression tests

After the build completes, run the regression tests:

 $ . ../scripts/rip-environment
 $ runtests

This should complete without errors.

NB: if LinuxCNC is already running, some of the tests (HAL, RTAPI) will fail. Dont panic - close LinuxCNC, wait a few seconds. and then re-run the tests.

Building the Debian package

To make sure the buildbot does not trip - at least for your current CPU architecture - follow these steps:

 $ cd emc2-dev/debian/
 # see the options for debian/configure: 
 $ /configure 
 configure: Set up debian/ files to build for a particular kernel

    configure sim
        Build for a system without a realtime kernel

    configure [kernel-version]
        Build for the realtime kernel [kernel-version], such as 2.6.12-magma

    configure -r
        Build for the currently running kernel

    configure -a
        If the currently running kernel has realtime extensions, use it.
        Otherwise use any available realtime kernel it can find.

 # e.g. decide to build the sim packages: 
 $ ./configure sim
 $ cd ..
 $ dpkg-checkbuilddeps 
 $ fakeroot debian/rules binary

If you have a multicore CPU, you might replace the last line by

 $ DEB_BUILD_OPTIONS=parallel=<number of cores> fakeroot debian/rules binary

This will run for a while and produce in the directory above emc2-dev the following files (version numbers might vary):


If this step fails, also the buildbot will fail to complete successfully because these are the steps it takes.

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org
This page is read-only. Follow the BasicSteps to edit pages. | View other revisions
Last edited March 14, 2013 4:29 pm by MichaelHaberler (diff)
Published under a Creative Commons License