[Bdi4emc-help] axis 1.2.1-1 doesn't work (patch enclosed)

Jeff Epler jepler at unpythonic.net
Tue May 9 05:32:27 CEST 2006

Earlier this evening, a bdi4emc user on the #emc IRC channel reported
that the bdi4emc package of axis 1.2.1-1 doesn't run.  The symptom is
that axis prints one of the following error messages, and then emc exits:
    ImportError: /usr/lib/python2.3/site-packages/gcode.so: undefined symbol: _ZN7InifileC1Ev
    ImportError: /usr/lib/python2.3/site-packages/gcode.so: undefined symbol: _Z23SET_MOTION_CONTROL_MODEd
The error can be reproduced by typing this command at the shell:
    python -c 'import gcode'

After some investigation, I found two problems, one for each error.  A
patch to the source code of axis is included at the end of this message.  
This patch will be in the next bugfix release of the axis source code,
and I hope that for bdi4emc users Paul Corner will provide new debs with
this patch applied as well.

You may remember that there have been compatability problems between
bdi4emc and axis before now.  After the last time, I set up a local
system running bdi4emc, and every night the newest version of axis is
compiled against emc 1.0-39.  So I had rested easy believing I would get
an error message from my automated system before Paul let me know
there was a problem, and that I'd hear from Paul long before his users
ended up with a buggy package.  This didn't work out as planned. :(

In hindsight, there are two major problems:  First, because the steps
necessary to produce identical packages to the ones Paul makes are not
published, there may be differences between my testing system and the
actual packages that I have no control over.  This could be the reason
that the "Inifile" bug crept in.

Second, because the development process of bdi4emc is largely opaque,
I have no way of keeping up with internal changes, even when they might
impact axis.  Instead, I have to wait until after a new emc package
version, and then react to any changes made since the prior version.
This is the reason that the "SET_MOTION_CONTROL_MODE" bug was not caught
by my automated testing system.  

I very much want to keep axis running on new versions of bdi4emc,
because I believe it's the best GUI available for emc.  However, it is
sometimes a frustrating process.  If you can see a way to improve
things, please let me know.

Thanks for reading this far.  Here's the patch against axis 1.2.1 which
at least allows the test "python -c 'import gcode'" to succeed:

diff -ru python-axis-1.2.1/extensions/gcodemodule.cc python-axis-1.2.1-local/extensions/gcodemodule.cc
--- python-axis-1.2.1/extensions/gcodemodule.cc	2006-04-06 09:12:04.000000000 -0500
+++ python-axis-1.2.1-local/extensions/gcodemodule.cc	2006-05-08 21:09:39.000000000 -0500
@@ -455,6 +455,7 @@
 CANON_MOTION_MODE motion_mode;
 void SET_MOTION_CONTROL_MODE(CANON_MOTION_MODE mode, double tolerance) { motion_mode = mode; }
+void SET_MOTION_CONTROL_MODE(double tolerance) { }
 void SET_MOTION_CONTROL_MODE(CANON_MOTION_MODE mode) { motion_mode = mode; }
diff -ru python-axis-1.2.1/setup.py python-axis-1.2.1-local/setup.py
--- python-axis-1.2.1/setup.py	2006-03-20 21:30:01.000000000 -0600
+++ python-axis-1.2.1-local/setup.py	2006-05-08 21:06:59.000000000 -0500
@@ -112,6 +112,7 @@
         extra_link_args = [
             '-Wl,-rpath,%s' % os.path.join(emcroot, "plat/linux_rtai/lib"),
             os.path.join(emcroot, "src", ".tmp", "rs274.o"),
+            '-lnml', '-lm', '-lstdc++'

Jeff Epler <jepler at unpythonic.net>

More information about the Bdi4emc-help mailing list