AW: [Tinyos-help] "undefined reference" during "make micaz sim"
Gaessler, Alexander
alexander.gaessler at siemens.com
Wed Sep 6 02:54:55 PDT 2006
Hi Phil,
thank you.
For my problem there was a work-aroung from you (i guess) by e-mail earlier:
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>
TOSSIM for TinyOS 2.0 currently does not work under Cygwin. It turns out to be a really nasty problem: in Windows, shared objects cannot have undefined references. The way most python modules work is that they link against the interpreter (e.g., for functions to manipulate basic data types). There are ways around it, but it's going to be some work (you have to create an importlib that the shared object can link against). It'll definitely be there for the full release. Until then, you can still run TOSSIM as a C++ program. The latter parts of the tutorial go into how to do this.
Alternatively, you can run Linux inside VMWare or Xen.
Scratch that. Kaisen Lin and I just figured it out. It looks like CVS is down right now, so I've put a fix up on the web:
http://csl.stanford.edu/~pal/tinyos/sim-cygwin.extra
Download this file and put it in your tinyos-2.x/support/make directory. Instead of typing 'make micaz sim' type 'make micaz sim-cygwin'. You'll still get some warnings about shadowed declarations (I'll clean those up when I can), but you should be able to compile and use TOSSIM under cygwin. I'll eventually fold this stuff into the basic sim.extra so it acts conditionally on whether you're under Cygwin. This file assumes that you have Python 2.3; if you have a different version, you might need to change the file a bit. Eventually, the 2.x install might detect this sort of thing, but for now you might need to tweak files a bit.
Phil
<<<<<<<<<<<<<<<<<<<<
<<<<<<<<<<<<<<<<<<<<
On Aug 25, 2006, at 2:23 PM, Alexander Gäßler wrote:
> I newly installed MS Windows XP Pro SP2 with German MUI package.
> I newly installed Cygwin 1.5.21-1 release.
> I newly installed and configured TinyOS 2.0 beta2 as described on
> www.tinyos.net.
> Everything works fine, tos-check-env too.
>
> But there was one problem during the make of TOSSIM files.
> I run "make micaz sim" when error messages appear concerning
> "undefined reference to <python_symbol_name>".
> I could not found any suggestion. Did one of you have?
>
> Thanks,
> Alex
It looks like the version of Python you have is different than what
the TOSSIM compilation sequence expects. The beta2 RPM currently does
not automatically determine what Python version you have and adjust
accordingly (it should). Type
python -V
Then go to support/make/sim.extra
And change the variable
PYTHON_VERSION
to be the first two digits of your python. E.g., if you have 2.4.1,
change it to be
PYTHON_VERSION=2.4
Also, check that you have a directory
/usr/lib/pythonX.Y
If you don't, you might need to download a python-devel RPM.
Phil
_______________________________________________
Tinyos-help mailing list
Tinyos-help at Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
More information about the Tinyos-help
mailing list