I thought it is said that Mac OS X Tiger comes with Tk?
when i do ruby
require ‘tk’
it gives the following
dyld: NSLinkModule() error
dyld: Library not loaded: /usr/X11R6/lib/libX11.6.dylib
Referenced from: /usr/lib/ruby/1.8/powerpc-darwin8.0/tcltklib.bundle
Reason: image not found
Trace/BPT trap
On Sun, Oct 14, 2007, SpringFlowers AutumnMoon wrote:
Referenced from: /usr/lib/ruby/1.8/powerpc-darwin8.0/tcltklib.bundle
Reason: image not found
Trace/BPT trap
Looks like you didn’t install X from the dev tools. I’d try that, it
makes sense that you would need it.
Ben
Ben B. wrote:
On Sun, Oct 14, 2007, SpringFlowers AutumnMoon wrote:
Referenced from: /usr/lib/ruby/1.8/powerpc-darwin8.0/tcltklib.bundle
Reason: image not found
Trace/BPT trap
Looks like you didn’t install X from the dev tools. I’d try that, it
makes sense that you would need it.
is that X11 (X window)? how would that be installed (from dev tools)?
thanks.
Andreas S. wrote:
SpringFlowers AutumnMoon wrote:
Ben B. wrote:
On Sun, Oct 14, 2007, SpringFlowers AutumnMoon wrote:
Referenced from: /usr/lib/ruby/1.8/powerpc-darwin8.0/tcltklib.bundle
Reason: image not found
Trace/BPT trap
Looks like you didn’t install X from the dev tools. I’d try that, it
makes sense that you would need it.
is that X11 (X window)? how would that be installed (from dev tools)?
You can find it on your Tiger DVD or download it from Apple. But I don’t
understand why TK even depends on X, it doesn’t use the X server.
actually, i found those files in
/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib
so I tried to use
ruby -I /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib test.rb
and it won’t work…
and then I set the PATH in bash to the following and it won’t work
either:
PATH=/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/powerpc/bin:/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib:/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6:/bin:/sbin:/usr/bin:/usr/sbin:.
SpringFlowers AutumnMoon wrote:
Ben B. wrote:
On Sun, Oct 14, 2007, SpringFlowers AutumnMoon wrote:
Referenced from: /usr/lib/ruby/1.8/powerpc-darwin8.0/tcltklib.bundle
Reason: image not found
Trace/BPT trap
Looks like you didn’t install X from the dev tools. I’d try that, it
makes sense that you would need it.
is that X11 (X window)? how would that be installed (from dev tools)?
You can find it on your Tiger DVD or download it from Apple. But I don’t
understand why TK even depends on X, it doesn’t use the X server.
On Sun, Oct 14, 2007, SpringFlowers AutumnMoon wrote:
Ben B. wrote:
On Sun, Oct 14, 2007, SpringFlowers AutumnMoon wrote:
Referenced from: /usr/lib/ruby/1.8/powerpc-darwin8.0/tcltklib.bundle
Reason: image not found
Trace/BPT trap
Looks like you didn’t install X from the dev tools. I’d try that, it
makes sense that you would need it.
is that X11 (X window)? how would that be installed (from dev tools)?
Yes, it’s X11. It’s in the Dev Tools image that you download from
Apple, or installed as part of your OS installation.
Ben
John J. wrote:
You can find it on your Tiger DVD or download it from Apple. But I
don’t
understand why TK even depends on X, it doesn’t use the X server.
Many libs in X11 can be used by software without using the X server
itself.
So either I have to find my original Mac OS X DVD, or I can download it
from the net…
is it this page?
Apple Open Source
when i click
download the X11User.pkg
it says the page can’t be found
SpringFlowers AutumnMoon wrote:
John J. wrote:
You can find it on your Tiger DVD or download it from Apple. But I
don’t
understand why TK even depends on X, it doesn’t use the X server.
Many libs in X11 can be used by software without using the X server
itself.
So either I have to find my original Mac OS X DVD, or I can download it
from the net…
is it this page?
Apple Open Source
when i click
download the X11User.pkg
it says the page can’t be found
By the way I also installed ActiveTcl on the Mac, can’t I just start
using Tk? Wow, so big a procedure before being able to use Tk.
This thread got me looking into my (rather new) macbooks ruby
installation.
I installed ruby using macports right after getting the machine. I
don’t even have tk.rb to require.
Looking around at macports, it seems that there are TWO port variants
for the ruby port related to tk
one is called just tk, the other mactk.
I’m not sure but I suspect that the tk variant requires X11, and that
the mactk variant doesn’t.
I’m still very much an OSX newbie, my last Mac was a ppc which
couldn’t run anything past OS 8.something, and I’ve been using Linux
for some time. I’m not clear yet on what’s the best way to try to
rebuild ruby using port to add the mactk variant. Do I need to
uninstall and reinstall or is there a better way?
–
Rick DeNatale
My blog on Ruby
http://talklikeaduck.denhaven2.com/
On 10/15/07, Rick DeNatale [email protected] wrote:
the mactk variant doesn’t.
I’m still very much an OSX newbie, my last Mac was a ppc which
couldn’t run anything past OS 8.something, and I’ve been using Linux
for some time. I’m not clear yet on what’s the best way to try to
rebuild ruby using port to add the mactk variant. Do I need to
uninstall and reinstall or is there a better way?
Just to follow up, I did this:
$port deactivate ruby
$port install ruby +mactk
This made my current ruby install inactive, then installed a new
version with the mactk option.
The pickaxe Tk hello world application runs and it is using native OSX
widgets.
A variation on this is probably the trick to get around the X11
dependency.
–
Rick DeNatale
My blog on Ruby
http://talklikeaduck.denhaven2.com/
Rick Denatale wrote:
Just to follow up, I did this:
$port deactivate ruby
$port install ruby +mactk
This made my current ruby install inactive, then installed a new
version with the mactk option.
that’s weird… my Mac doesn’t have “port”
hm… although i don’t like the installation process of Linux, its
sudo get-apt install ruby
is quite good…
when i type
ruby -v
it even told me ruby is not available and i could type the “sudo
get-apt” line above to get it. i wonder if Mac has something like that
too.
SpringFlowers AutumnMoon wrote:
that’s weird… my Mac doesn’t have “port”
The port command is part of MacPorts, a.k.a. DarwinPorts.
Ben B. wrote:
On Sun, Oct 14, 2007, SpringFlowers AutumnMoon wrote:
Referenced from: /usr/lib/ruby/1.8/powerpc-darwin8.0/tcltklib.bundle
Reason: image not found
Trace/BPT trap
Looks like you didn’t install X from the dev tools. I’d try that, it
makes sense that you would need it.
How do you ‘instal X from the dev tools’?
On the Mac OS X Install Disc 1, there are these files(among others):
/Volumes/Mac OS X Install Disc 1/Xcode Tools/Packages/DeveloperTools.pkg
/Volumes/Mac OS X Install Disc 1/Xcode Tools/Packages/X11SDK.pkg
7stud – wrote:
Ben B. wrote:
On Sun, Oct 14, 2007, SpringFlowers AutumnMoon wrote:
Referenced from: /usr/lib/ruby/1.8/powerpc-darwin8.0/tcltklib.bundle
Reason: image not found
Trace/BPT trap
Looks like you didn’t install X from the dev tools. I’d try that, it
makes sense that you would need it.
How do you ‘instal X from the dev tools’?
On the Mac OS X Install Disc 1, there are these files(among others):
/Volumes/Mac OS X Install Disc 1/Xcode Tools/Packages/DeveloperTools.pkg
/Volumes/Mac OS X Install Disc 1/Xcode Tools/Packages/X11SDK.pkg
…or would it be easiest to reinstall Xcode in its entirety and then
check a box that says to install X? I went through the setup for the
Xcode installation before canceling out of it , and under “Software
Development Kits” there was an entry for “X11 SDK”, but it was grayed
out.
On Sat, Oct 27, 2007, 7stud – wrote:
…or would it be easiest to reinstall Xcode in its entirety and then
check a box that says to install X? I went through the setup for the
Xcode installation before canceling out of it , and under “Software
Development Kits” there was an entry for “X11 SDK”, but it was grayed
out.
Honestly, I’m not sure. It’s been a long time since I installed the dev
tools on Tiger and I don’t remember all the steps. You could try
running the X11 sdk installer directly and see if it will let you.
Otherwise, you could try deleting your /Developer and reinstalling, but
that’s sort of a lame option.
You might be able to build what you need out of MacPorts as well, but I
don’t know. Sorry.
Ben
On Oct 28, 2007, at 9:42 PM, 7stud – wrote:
On Install Disc1, I went into the directory Xcode Tools>Packages, and
then I clicked on the file X11SDK.pkg, and an installation wizard
guided
me through a simple installation, which only required that I enter my
password. But when I try to run the following program:
I think what you are looking for isn’t in Xcode Tools. It’s in
Optional Installs.mkpkg under Applications in the Installation Type
panel.
Regards, Morton
Ben B. wrote:
On Sat, Oct 27, 2007, 7stud – wrote:
…or would it be easiest to reinstall Xcode in its entirety and then
check a box that says to install X? I went through the setup for the
Xcode installation before canceling out of it , and under “Software
Development Kits” there was an entry for “X11 SDK”, but it was grayed
out.
Honestly, I’m not sure. It’s been a long time since I installed the dev
tools on Tiger and I don’t remember all the steps. You could try
running the X11 sdk installer directly and see if it will let you.
Otherwise, you could try deleting your /Developer and reinstalling, but
that’s sort of a lame option.
You might be able to build what you need out of MacPorts as well, but I
don’t know. Sorry.
On Install Disc1, I went into the directory Xcode Tools>Packages, and
then I clicked on the file X11SDK.pkg, and an installation wizard guided
me through a simple installation, which only required that I enter my
password. But when I try to run the following program:
require ‘tk’
I get the same error message as before:
dyld: NSLinkModule() error
dyld: Library not loaded: /usr/X11R6/lib/libX11.6.dylib
Referenced from: /usr/lib/ruby/1.8/universal-darwin8.0/tcltklib.bundle
Reason: image not found
Trace/BPT trap
7stud – wrote:
For future searchers these are the steps:
I am using os x 10.4.7 and ruby 1.8.2.
Morton G. wrote:
On Oct 28, 2007, at 9:42 PM, 7stud – wrote:
On Install Disc1, I went into the directory Xcode Tools>Packages, and
then I clicked on the file X11SDK.pkg, and an installation wizard
guided
me through a simple installation, which only required that I enter my
password. But when I try to run the following program:
I think what you are looking for isn’t in Xcode Tools. It’s in
Optional Installs.mkpkg under Applications in the Installation Type
panel.
Regards, Morton
My god. You’ve done it.
I couldn’t figure out what the heck you were referring to because the
disc1 contents window had six icons in it: one was the Xcode Tools
directory and none of the other icons was Optional Installs.mpkg. So I
did a search with Finder, and Finder said that the file Optional
Installs.mpkg was on disc1. What the?! Then I expanded the disc1
contents window, and voila! some other icons magically appeared at the
bottom. I don’t think the default for that page should be icon view!
For future searchers these are the steps:
-
Slide the “Mac OS X Install Disc1” into your drive. A window that
says “Mac OS X Install Disc 1” will pop up showing you the contents of
the disc. Drag the window open as big as you can; or up in the menu
bar, click on View>as List.
-
Click on the file:
Optional Installs.mpkg
It’s not inside a directory, so you shouldn’t have to go searching
through any folders.
- A wizard will lead you through the install. When you get to the page
that says:
Custom Install on “Macintosh HD(or whatever destination you chose on the
previous page)”
…click on the arrow to the left of Applications to reveal a list of
choices.
- Check X11 and click the Install button.