Mac OS X Tiger comes with Tk?

  • Thread starter SpringFlowers AutumnMoon
  • Start date

S

SpringFlowers AutumnMoon

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
 
Ad

Advertisements

B

Ben Bleything

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

Looks like you didn't install X from the dev tools. I'd try that, it
makes sense that you would need it.

Ben
 
S

SpringFlowers AutumnMoon

Ben said:
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.
 
A

Andreas S.

SpringFlowers said:
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.
 
S

SpringFlowers AutumnMoon

Andreas said:
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:.
 
B

Ben Bleything

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
 
Ad

Advertisements

J

John Joyce

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.
 
R

Rick DeNatale

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?
 
R

Rick DeNatale

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?

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.
 
Ad

Advertisements

S

SpringFlowers AutumnMoon

Rick said:
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.
 
7

7stud --

Ben said:
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
 
7

7stud --

7stud said:
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.
 
B

Ben Bleything

...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
 
Ad

Advertisements

7

7stud --

Ben said:
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
 
M

Morton Goldberg

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
 
7

7stud --

Morton said:
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:

1) 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.

2) Click on the file:

Optional Installs.mpkg

It's not inside a directory, so you shouldn't have to go searching
through any folders.

2) 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.

3) Check X11 and click the Install button.
 
Ad

Advertisements


Top