[geos-devel] Compiling with Ruby support

Michael Moore stuporglue at gmail.com
Tue Mar 12 17:19:17 PDT 2013


I'm trying to compile GEOS with Ruby support. I'm using the latest
source code from git, and I'm on Debian.

I'm a little rusty on my g++ flags and can't figure out why g++ can't
find libruby. Could someone point me in the right direction?

make[5]: Entering directory `/fatty/src/libgeos/swig/ruby'
/bin/bash ../../libtool --tag=CXX   --mode=link g++ -DGEOS_INLINE
-pedantic -Wall -ansi -Wno-long-long  -ffloat-store -g -O2
-no-undefined  -module -avoid-version -L/usr/lib  -o geos.la -rpath
/usr/local/lib/site_ruby/1.9.1/x86_64-linux geos_la-geos_wrap.lo
../../capi/libgeos_c.la -llibruby-1.9.1.so.1.9.1
libtool: link: g++  -fPIC -DPIC -shared -nostdlib
.libs/geos_la-geos_wrap.o   -Wl,-rpath
-Wl,/fatty/src/libgeos/capi/.libs -L/usr/lib
../../capi/.libs/libgeos_c.so -llibruby-1.9.1.so.1.9.1
-L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu
-L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.7/../../..
-lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/4.7/crtendS.o
-O2   -Wl,-soname -Wl,geos.so -o .libs/geos.so
/usr/bin/ld: cannot find -llibruby-1.9.1.so.1.9.1
collect2: error: ld returned 1 exit status
make[5]: *** [geos.la] Error 1

libruby-1.9.1.so.1.9.1 does exist in /usr/lib

stuporglue at speed:/fatty/src/libgeos/swig/ruby$ ls -l
-rw-r--r-- 1 root root 2072592 Feb 23 08:57 /usr/lib/libruby-1.9.1.so.1.9.1

Here are the ruby variables from the Makefile.
RUBY = /usr/bin/ruby
RUBY_BIN_DIR = /usr/bin
RUBY_EXTENSION_DIR = /usr/local/lib/site_ruby/1.9.1/x86_64-linux
RUBY_INCLUDE_DIR = /usr/include/ruby-1.9.1
RUBY_LIB_DIR = /usr/lib
RUBY_SHARED_LIB = libruby-1.9.1.so.1.9.1
RUBY_SITE_ARCH = x86_64-linux
RUBY_SO_NAME = libruby-1.9.1.so.1.9.1

Thank you,
Michael Moore

More information about the geos-devel mailing list