Running Pymite 9 on Ubuntu 12.04

144 views
Skip to first unread message

Christophe Meyers

unread,
Jul 1, 2012, 11:58:55 AM7/1/12
to python-o...@googlegroups.com
Hi,

I have in mind to run Pymite on the Arduino Mega.
I installed Pymite 9 and am running Python 2.6.5 via Pythonbrew.
My platform is Ubuntu 12.04 on 32-bit.

Tried running the default Make file for the Desktop platform.
Also installed the necessary gcc compiler.
However I run into continuous errors.
There seemed to be a problem with the definition of functions, so I reordered and corrected the naming of lines 192 to 217 in 'pm.h'.
The order is now :
   #include "mem.h"
   #include "plat_interface.h"
   #include "pmFeatureDependencies.h"
   #include "pmEmptyPlatformDefs.h"
   #include "sli.h"
   #include "obj.h"
   #include "seq.h"
   #include "tuple.h"
   #include "strobj.h"
   #include "heap.h"
   #include "int.h"
   #include "seglist.h"
   #include "list.h"
   #include "dict.h"
   #include "codeobj.h"
   #include "func.h"
   #include "module.h"
   #include "frame.h"
   #include "interp.h"
   #include "img.h"
   #include "global.h"
   #include "class.h"
   #include "thread.h"
   #include "float.h"
   #include "plat_interface.h"
   #include "bytearray.h"

However I now get the following error message :
   heap.c:35:2: error: #warning PM_HEAP_SIZE not defined in src/platform/<yourplatform>/pmfeatures.h [-Werror=cpp]
   heap.c:129:18: error: ‘PM_HEAP_SIZE’ undeclared here (not in a function)
   heap.c: In function ‘heap_init’:
   heap.c:377:45: error: left-hand operand of comma expression has no effect [-Werror=unused-value]
   cc1: all warnings being treated as errors
   make[2]: *** [heap.o] Error 1
   rm frame.o func.o bytearray.o codeobj.o dict.o global.o float.o class.o
   make[2]: Leaving directory `/home/christophe/.pythonbrew/build/Python-2.6.5/pymite-09/src/vm'
   make[1]: *** [../../vm/libpmvm_desktop.a] Error 2
   make[1]: Leaving directory `/home/christophe/.pythonbrew/build/Python-2.6.5/pymite-09/src/platform/desktop'
   make: *** [all] Error 2

What do I need to correct in the code ?
Thanks in advance

Christophe

Dean Hall

unread,
Jul 2, 2012, 1:02:37 AM7/2/12
to python-o...@googlegroups.com
You didn't show the exact errors you had, but it sounds like you ran into the "Linux has a pm.h header file" bug.
#1 Recommendation (and I just added it to the FAQ):
Use the latest code from the repository rather than the release packages.

NOTE: Latest code will assume a 64-bit arch (desktop64), so you'll have to select a 32-bit platform manually:

$ make PLATFORM=desktop

!!Dean
> --
> You are subscribed to the "python-on-a-chip" (or p14p for short) Google Group.
> Site: http://groups.google.com/group/python-on-a-chip

Christophe Meyers

unread,
Jul 2, 2012, 9:46:18 AM7/2/12
to python-o...@googlegroups.com
Thanks Dean,

I downloaded the latest version from the repository package.

Fixed most of the issues, although I have a problem with 'sli.c'.
Am told :
   sli.c:194:5: error: this decimal constant is unsigned only in ISO C90 [-Werror]

Tried fixing this by adding long and unsigned prefixes to the declaration of the 'number' variable of type int32_t.
What do I have to change in the 'sli.c' file ?

Thanks

Christophe

Dean Hall

unread,
Jul 2, 2012, 10:00:40 AM7/2/12
to python-o...@googlegroups.com
We just found that one last week.
Comment out the if-block in question; it handles a special case.
See the mail archives for other Linux build issues.

!!Dean
Reply all
Reply to author
Forward
0 new messages