Setting up TclTkAquaBI and Ruby on OS X

Hi, I’ve been stuck trying to get this to work for days. Not sure how
to get this to work. Any help would be very much appreciated.

I’m running OS X 10.4.10 and I installed the latest TclTkAquaBI
(8.4.10) using the standard non-custom install.

Then I downloaded ruby-1.8.6 to my desktop. I ran the following

cd ~/Desktop/ruby-1.8.6
./configure --enable-tcltk-framework
sudo make install

make gave the following warnings:

dln.c: In function ‘dln_load’:
dln.c:1472: warning: ‘NSIsSymbolNameDefined’ is deprecated (declared
at /usr/include/mach-o/dyld.h:150)
dln.c:1475: warning: ‘NSLookupAndBindSymbol’ is deprecated (declared
at /usr/include/mach-o/dyld.h:158)

there were also a lot of these:

warning: pointer targets in passing argument 1 of
‘some_string_or_file’ differ in signedness

with sudo make install bash gave the following:

./miniruby ./instruby.rb --dest-dir="" --extout=".ext" --make=“make”
–mflags="" --make-flags="" --installed-list .installed.list –
installing binary commands
installing command scripts
installing library scripts
installing headers
installing manpages
installing extension objects
installing extension scripts

That seemed to work allright, but irb was broken. Typing “irb” into
bash gave the following:

dyld: NSLinkModule() error
dyld: Symbol not found: _rl_filename_completion_function
Referenced from: /usr/local/lib/ruby/1.8/i686-darwin8.10.1/
Expected in: flat namespace

To fix irb, I did the following:

cd ~/Desktop/ruby-1.8.6/ext/readline
ruby extconf.rb
sudo cp readline.bundle /usr/local/lib/ruby/site_ruby/1.8/i686-

Then I created a few one-line test files:
tktest.rb: require ‘tk’
tcltktest.rb: require ‘tcltk’
tcltklibtest.rb: require ‘tcltklib’

They all gave the same error:

dyld: NSLinkModule() error
dyld: Symbol not found: _Tcl_GetVar2
Referenced from: /usr/local/lib/ruby/1.8/i686-darwin8.10.1/
Expected in: flat namespace

Trace/BPT trap

Another one-line test file:
tcltest.rb: require ‘tcl’
gave a different error:

tktest.rb:1:in `require’: no such file to load – tcl (LoadError)
from tktest.rb:1

So I tried to fix tk sort of the same way irb was fixed:

cd ~/Desktop/ruby-1.8.6/ext/tk
ruby extconf.rb

But it gave an error:

checking for Tcl/Tk Framework… /usr/local/lib/ruby/1.8/mkmf.rb:
176:in initialize': Permission denied - mkmf.log (Errno::EACCES) from /usr/local/lib/ruby/1.8/mkmf.rb:176:inopen’
from /usr/local/lib/ruby/1.8/mkmf.rb:176:in open' from /usr/local/lib/ruby/1.8/mkmf.rb:203:inpostpone’
from /usr/local/lib/ruby/1.8/mkmf.rb:542:in checking_for' from extconf.rb:20:infind_framework’
from extconf.rb:33

I then tried “sudo ruby extconf.rb” and bash gave me the following:

checking for Tcl/Tk Framework… yes
checking for t_open() in -lnsl… no
checking for socket() in -lsocket… no
checking for dlopen() in -ldl… yes
checking for log() in -lm… no
creating Makefile

Next, I tried both “make” and “sudo make” and they both gave the same

make: Nothing to be done for `all’.

I think the problem might be in configuring ~/Desktop/ruby-1.8.6/ext/
tk/extconf.rb or somewhere else.

As I said, I’ve been banging my head against this for days now, trying
to get it to work. I would really appreciate any help at all even if
it’s just to point me in the right direction. Thanks.


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs