Technology Errors

Compiling ruby on OS X 10.5: readline.c:703: error: ‘filename_completion_function’ undeclared

When compiling Ruby 1.8.6 (in this case, p287) on OS X 10.5, you may encounter an error similar to the following:

readline.c: In function ‘filename_completion_proc_call’:
readline.c:703: error: ‘filename_completion_function’ undeclared (first use in this function)
readline.c:703: error: (Each undeclared identifier is reported only once
readline.c:703: error: for each function it appears in.)
readline.c:703: warning: assignment makes pointer from integer without a cast
readline.c: In function ‘username_completion_proc_call’:
readline.c:730: error: ‘username_completion_function’ undeclared (first use in this function)
readline.c:730: warning: assignment makes pointer from integer without a cast
make[1]: *** [readline.o] Error 1
make: *** [all] Error 1

Some sites suggest you will need to apply a series of patches to correct this issue and compile for Leopard, but this is not the case. Everything you need comes with OS X by default.

Technology Insights

Linux Commands to Install ImageMagick and RMagick

This is what I had to do to get it to work on CentOS 5. For some reason, FreeType would not work with yum so I built it from scratch. I’m not sure if the all the “yum install”s were needed, but I did it anyway.

#yum install freetype — did not work

cd /usr/local/src

wget http://download.savannah.gnu.org/releases/freetype/freetype-2.3.5.tar.gz

tar xvzf freetype-2.3.5.tar.gz

./configure

make

make install