evanphx / rubinius

Rubinius, the Ruby VM

This URL has Read+Write access

rubinius / doc / common_problems.txt
100644 74 lines (48 sloc) 2.801 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Common Build Problems and Solutions
 
TODO: Imported from Lighthouse wiki. Likely outdated
 
These are typical error messages / scenarios that you may encounter at various
stages of building Rubinius, along with the typical causes and solutions.
 
## Before anything else
 
*Make certain that you do not have an old version of Rubinius installed
somewhere.* Executing new code using the old libraries will end in tears. The
name should be `librubinius-*` and the typical location is `/usr/local/lib/`
or `/usr/lib` but you can use `find` to make sure you get everything in case
your install location is strange.
 
Old .rbc files may be getting in the way. 'rake clean build' should eliminate
these problems.
 
 
## C Compilation Errors
 
### "undefined reference to '[some symbol]"
 
Try `rake distclean build` to make sure the entire C codebase is rebuilt.
 
### "error: IN_DONT_FOLLOW not declared"
 
On Linux at least, the inotify library may be used but for some reason, some
distributions' sys/inotify.h does not have the necessary constants. You can
either disable it in the configuration or try to use updated header files at
least from
[here](http://inotify.aiken.cz/?section=inotify&page=download&lang=en).
 
### "Unable to compile [extension].so/dylib/etc."
 
First, even if an extension fails to build, you should still be OK. Try
`shotgun/rubinius -v` to verify that Rubinius itself works.
 
### "glibtool: link: cannot build libtool library `librubinius.la' from
non-libtool objects: ..." (Mac OS X)
 
Make sure your `glibtool` is at least version 1.5. You may also have multiple
versions installed, use `` `which glibtool` `` to locate the one that is
currently being picked up. Typically this problem occurs if you have an
outdated version in `/sw/bin/glibtool` and a newer one in `/usr/bin/glibtool`.
 
### "MACOSX_DEPLOYMENT_TARGET ..."
 
The error message is probably complaining that it is supposedly set to 10.1 or
something; you can override this by giving the env explicitly on the command
line. The Rubinius code seems to be correct though so it is likely you have
that invalid #define in your system headers somewhere.
 
## Ruby Build Errors
 
### "... in `initialize': uninitialized constant Mutex::Channel"
 
Unset `$RUBYOPT` (usually set for Gems.)
 
### "Unable to find [ClassName]"
 
These are caused by some load order dependency not being properly constructed.
Determine which file needs which other file and insert a "depends on
[file].rb", then `rake build : load_order`.
 
### "Unable to find 'kernel/bootstrap/archive.rbc'" -- "Unable to run
runtime/stable/bootstrap.rba"
 
Either:
 
1. You have accidentally deleted/moved/etc. something in `runtime/` and you
can probably restore it with a quick `git checkout runtime/` ; or
1. Something is breaking in the loader, break out the GDB.