successfully build ruby 1.8.7 on OpenBSD 4.5
./configure && make && make test && sudo make install
Installed RubyGems -
running ruby I got the following error:
WARNING: No database support: LoadError no such file to load -- iconv
After doing some googling i found the following fix:
$ cd ruby-1.8.7-p174/ext/iconv/
$ ruby extconf.rb --prefix=/usr/local --with-iconv-dir=/usr/local
checking for iconv() in iconv.h... no
checking for iconv() in -liconv... yes
checking for const of iconv() 2nd argument... no
creating Makefile
$ make
gcc -I. -I. -I/usr/local/lib/ruby/1.8/i386-openbsd4.5 -I. -I/usr/local/include -fPIC -g -O2 -c iconv.c
gcc -shared -fPIC -o iconv.so iconv.o -L. -L/usr/local/lib -Wl,-R/usr/local/lib -L/usr/local/lib -Wl,-R/usr/local/lib -L. -Wl,-E -liconv -lm -lc
$ sudo make install
/usr/bin/install -c -m 0755 iconv.so /usr/local/lib/ruby/site_ruby/1.8/i386-openbsd4.5
I'm using ruby for metasploit so having the following fix really save me a lot of trouble.
Monday, October 19, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment