Skip to content
Bruce Mitchener edited this page Jan 6, 2014 · 1 revision

Note: Greg Sullivan holds all of the blame for the name.

Don't forget to check GooBugs for potential problems that could be tripping you up.

Building Goo Gotchas

I don't know how to build Goo

(use eval/g2c)
(g2c-goo)

It gives me a path error when I try to run ``g2c-goo/g2c-top``

You forgot* to set GOO_BUILD_ROOT, which otherwise defaults to the potentially non-useful value of '.'. (* Andrew votes to pummel whoever decided we needed a separate GOO_BUILD_ROOT that does not default to GOO_ROOT when omitted. Current hypothesis is therefore that James must be pummeled.)

Compilation Errors

I'm statically compiling a module into the goo image, and at run-time Goo segfaults on some kind of element access inside of fabbing a class.

Make sure that all parent classes are declared before their children.

Dynamic Compilation Errors

When I attempt to load a file, define a method, or otherwise invoke dynamic compilation, I am given a gcc error about being unable to find "grt.h" and/or "dlgrt.h"

Environment troubles again. Make sure that you have both GOO_ROOT and GOO_BUILD_ROOT set. When they are not set, Goo fails over to the defaults compiled in, which are now set by the configure script.

Alternatively, make sure that what Goo thinks is GOO_ROOT has either a

  • validly populated lib sub-directory
  • sym-link from lib to the c directory

The reason for this is that when dynamically compiling stuff, Goo does an -I of GOO_ROOT/lib (where GOO_ROOT is nabbed from the environment, or falls back on what was compiled in.)

Common Errors

ERROR: UNKNOWN FUNCTION () CALLED

The unknown function error is given during a method call when the function is checked and found out not to actually be a function. In this case, where the function cited is () (aka nil), it probably means that you tried to call a binding which doesn't exist. Check for typos and what not.

Typos

If your function takes no parameters, make very sure that you included an empty list after the function name, or horrible things may occur as goo thinks that your first statement is actually the parameter list. ERROR: No applicable methods error when calling GENERIC on SIGNATURE

This can happen for one of at least two reasons. Either you simply don't have a method that can deal with the type signature at all, or you've managed to confuse the multi-method dispatcher badly. An example of such a case follows:

(dc <foo> (<any>))
(dc <bar> (<any>))
(dc <foobar> (<foo> <bar>))
(dm gabba (a | <foo> mix)
  (msg out "FOOOOOO!\n"))
(dm gabba (a | <bar> mix | <int>)
  (msg out "BARRRRR!\n"))
(gabba (new <foobar>) 1)

results in

ERROR: No applicable methods error when calling #{Gen gabba (<any> <any>)} on (#{<foobar>} 1)

The key declaration that causes the failure is attaching a type of <int> to mix on the <bar> variant of gabba. Otherwise, the dispatcher would go with <foo> based on precedence. Anywho, this might may or may not be a bug, but either way you need to be wary of it.

Reader Gotchas

Logical and bitwise-or '|' gets gobbled by the reader.

Escape | with a #. Eg, #|.

Clone this wiki locally