Discussion:
Transterpreter
Thiago Castro Ferreira
2009-11-04 15:35:08 UTC
Permalink
Hello all,

I am having problems with the Transterpreter's installation. Let me explain. I
follow the instructions of the webpage:
http://projects.cs.kent.ac.uk/projects/kroc/trac/wiki/Installation

According to it, you have to give the instructions on the Terminal of Linux:

./build --prefix=/usr/local/kroc --with-toolchain=tvm

But in the terminal appears that message:

*** Installation failed ***


The KRoC installation failed. If the messages above don't help you work
out why, please mail:

kroc-bugs-***@public.gmane.org

attaching the "typescript" file and a description of your system (e.g.

architecture, operating system version, etc.).

Am I doing the correct steps in the installation?
I use the Ubuntu 9.04 in a AMD Turion 3.5 with
2GB of
RAM.

I need to install TVM to compile codes in occam-pi to use them in a
sensor called Gumstix.

Other question is:
When I compile a occam-pi code on JEdit, that code can runs on Computers with
Linux, if that computer has the TVM? Because my teacher, Jó Ueyama, said to me
that the Gumstix's sensor runs Linux and I want to know if I compile a occam-pi
code on JEdit (Windows), I can run that code on the Gumstix.


Thank you,
Thiago.
Adam Sampson
2009-11-05 19:16:17 UTC
Permalink
Post by Thiago Castro Ferreira
*** Installation failed ***
The KRoC installation failed. If the messages above don't help you work
attaching the "typescript" file and a description of your system (e.g.
architecture, operating system version, etc.).
We can't tell why this is happening without seeing the typescript file
-- the actual error will be somewhere further up than the bit you
quoted, and the other details in the file give useful information about
how the KRoC tree has been built on your system. Please could you follow
the instructions in that message, and we'll investigate further?
Post by Thiago Castro Ferreira
When I compile a occam-pi code on JEdit, that code can runs on
Computers with Linux, if that computer has the TVM? Because my
teacher, Jó Ueyama, said to me that the Gumstix's sensor runs Linux
and I want to know if I compile a occam-pi code on JEdit (Windows), I
can run that code on the Gumstix.
Yep, that's the idea -- you can cross-compile a Transterpreter program
on one system and run it on another. The only thing you may need to
worry about is that you probably have a fairly old version of the JEdit
environment installed (since we've not done a release of it in ages),
which won't match the bytecode format that the latest version of the
Transterpreter expects if you built it from KRoC Subversion. We're
currently working towards a new release which'll fix this; in the
meantime you should be able to cross-compile using the command-line
tools, or update the tools used by your existing JEdit environment
(possibly -- Christian/Jon?).

Thanks,
--
Adam Sampson <http://offog.org/>
Matt Jadud
2009-11-05 20:50:20 UTC
Permalink
Post by Adam Sampson
Transterpreter expects if you built it from KRoC Subversion. We're
currently working towards a new release which'll fix this; in the
meantime you should be able to cross-compile using the command-line
tools, or update the tools used by your existing JEdit environment
(possibly -- Christian/Jon?).
The easiest thing would be to build your occam-pi system, and compile
on the command-line. The reason this is a good idea (I think) is
because you'll probably need to do that for the Gumstix anyway (that
is, use the command-line).

For example, compiling an occam program on the command-line looks like:

occbuild --program myfile.occ

This will produce a bytecode file (myfile.tbc) and executable
(myfile). When you're using the Transterpreter (if you specify it when
you do your compilation, as you have above), the executable is just a
small shell script that (essentially) does this:

tvm myfile.tbc

That is, it runs the TVM with the bytecode file as input.

(Switching gears)

The only problem with replacing the bits in JEdit is that you'd have
to replace the plugin as well as the binary executables for the linker
and runtime. That is really best done with a new release. But, yes: if
you run "occbuild" under Windows, it will produce a bytecode file that
you can still run on the Gumstix under Linux using a Gumstix-native
version of the TVM.

As Adam said, follow the instructions in the error file generated by
the compiler, and it will make helping you diagnose your error much
easier.

Cheers,
Matt
Thiago Castro Ferreira
2009-11-08 17:06:20 UTC
Permalink
Hello All,
Like you ask me, attached are the typescript of the error. Only to remember, the instructions I follow were:

./build --prefix=/usr/local/kroc --with-toolchain=tvm

http://projects.cs.kent.ac.uk/projects/kroc/trac/wiki/Installation




____________________________________________________________________________________
Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com
Matt Jadud
2009-11-08 19:05:42 UTC
Permalink
Hi Thiago,

When you do the build, there should be a file that gets created called
"typescript". I just did a fresh build under 8.04 (I don't have a v9
Ubuntu VM, but I'll create one shortly to see if something weird
happens for me), and my typescript starts out like this:

[BEGIN PASTE OF TYPESCRIPT]
KRoC typescript file, generated at Sun Nov  8 13:15:46 EST 2009

Build arguments: --prefix=/home/occam/kroc-tmp --with-toolchain=tvm
uname -a: Linux xubuntu-embedded 2.6.24-16-generic #1 SMP Thu Apr 10
13:23:42 UTC 2008 i686 GNU/Linux


*** Generating build system ***

autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
[END PASTE OF TYPESCRIPT]

and it ends like this:

[BEGIN PASTE OF TYPESCRIPT]
 /usr/bin/install -c -m 644 'm4/occam-opengl.m4'
'/home/occam/kroc-tmp/share/aclocal/occam-opengl.m4'
 /usr/bin/install -c -m 644 'm4/occam-pkg.m4'
'/home/occam/kroc-tmp/share/aclocal/occam-pkg.m4'
 /usr/bin/install -c -m 644 'm4/occam-sdl.m4'
'/home/occam/kroc-tmp/share/aclocal/occam-sdl.m4'
 /usr/bin/install -c -m 644 'm4/occbuild.m4'
'/home/occam/kroc-tmp/share/aclocal/occbuild.m4'
 /usr/bin/install -c -m 644 'm4/tvm.m4'
'/home/occam/kroc-tmp/share/aclocal/tvm.m4'
make[2]: Leaving directory `/home/occam/svn/kroc-thiago'
make[1]: Leaving directory `/home/occam/svn/kroc-thiago'

*** Installation successful ***
[END PASTE OF TYPESCRIPT]

The typescript gives us a lot more information; it looks like you gave
us a copy-paste of the terminal. That might be enough to help someone
else on the team, but I really need to see the typescript if I'm going
to help dig through what your toolchain did/where the build failed.

 If you could please find the typescript file, and attach that to an
email, that would be great. Mine is about 800K, but since your build
is failing, it will probably be smaller/shorter.

Cheers,
Matt
Adam Sampson
2009-11-08 21:11:37 UTC
Permalink
Post by Thiago Castro Ferreira
Like you ask me, attached are the typescript of the error.
Aha -- you're the second person to report that problem this week, and
the combination of the two reports helped find the cause. :)

There were some out-of-date autogenerated files that had been
accidentally added to the KRoC stable source tree (dispatch_ins.c,
etc.). I've removed them; please could you "svn update" your tree, and
manually remove:

runtime/libtvm/dispatch_ins.c
runtime/libtvm/jumptbl_ex_sec.c
runtime/libtvm/jumptbl_pri.c
runtime/libtvm/jumptbl_sec.c

if they're still present after the update, then try again?

Thanks,
--
Adam Sampson <http://offog.org/>
Loading...