« Return to Thread: TclTKAqua8.5.2 with ruby-tk on 10.3.9

TclTKAqua8.5.2 with ruby-tk on 10.3.9

by Ryutaro Amano :: Rate this Message:

Reply to Author | View in Thread

Hi all. I am Ryutaro Amano.

I installed TclTkAqua-8.5.2 on 10.3.9 (PowerPCMac, XCode1.5,  
november2004gccupdater_7k579).

And I installed ruby-1.8.7-p22.
extconf.rb of ruby-1.8.7-p22/ext/tk/extconf.rb can't find header files  
of tcltk.
patch
------------------------------------------------------------------
--- extconf.rb (revision 17422)
+++ extconf.rb (working copy)
@@ -378,11 +378,11 @@

tclver, tkver = check_tcltk_version(tcltk_version)

-if have_header("tcl.h") && have_header("tk.h") &&
-    ( tcltk_framework ||
-        ( ( !use_X || find_X11(x11_ldir2, x11_ldir) ) &&
-            find_tcl(tcllib, stubs, tclver, *tcl_ldir_list) &&
-            find_tk(tklib, stubs, tkver, *tk_ldir_list) ) )
+if ( tcltk_framework ||
+       ( have_header("tcl.h") && have_header("tk.h") &&
+           ( !use_X || find_X11(x11_ldir2, x11_ldir) ) &&
+           find_tcl(tcllib, stubs, tclver, *tcl_ldir_list) &&
+           find_tk(tklib, stubs, tkver, *tk_ldir_list) ) )
   $CPPFLAGS += ' -DUSE_TCL_STUBS -DUSE_TK_STUBS' if stubs
   $CPPFLAGS += ' -D_WIN32' if /cygwin/ =~ RUBY_PLATFORM
-----------------------------------------------------------------------

./configure --enable-shared --enable-pthread --enable-tcltk-framework
make

compiling tk
*****************************************************************************
**
** PTHREAD SUPPORT MODE WARNING:
**
**   Ruby is compiled with --enable-pthread, but your Tcl/Tk library
**   seems to be compiled without pthread support. Although you can
**   create the tcltklib library, this combination may cause errors
**   (e.g. hangs or segmentation faults). If you have no reason to
**   keep the current pthread support status, we recommend you  
reconfigure
**   and recompile the libraries so that both or neither support  
pthreads.
**
**   If you want change the status of pthread support, please recompile
**   Ruby without "--enable-pthread" configure option or recompile Tcl/
Tk
**   with "--enable-threads" configure option (if your Tcl/Tk is later
**   than or equal to Tcl/Tk 8.1).
**
*****************************************************************************
gcc -I. -I../.. -I../../. -I../.././ext/tk -DHAVE_TCL_H -DHAVE_TK_H -
DHAVE_RB_HASH_LOOKUP -DRUBY_VERSION=\"1.8.7\" -DRUBY_RELEASE_DATE=
\"2008-06-20\"  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -I/Library/
Frameworks/Tcl.framework/Headers -I/Library/Frameworks/Tk.framework/
Headers -DWITH_TCL_ENABLE_THREAD=0 -fno-common -g -O2  -fno-common -
pipe -fno-common   -c stubs.c
gcc -I. -I../.. -I../../. -I../.././ext/tk -DHAVE_TCL_H -DHAVE_TK_H -
DHAVE_RB_HASH_LOOKUP -DRUBY_VERSION=\"1.8.7\" -DRUBY_RELEASE_DATE=
\"2008-06-20\"  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -I/Library/
Frameworks/Tcl.framework/Headers -I/Library/Frameworks/Tk.framework/
Headers -DWITH_TCL_ENABLE_THREAD=0 -fno-common -g -O2  -fno-common -
pipe -fno-common   -c tcltklib.c
cc -dynamic -bundle -undefined suppress -flat_namespace -o ../../.ext/
powerpc-darwin7.9.0/tcltklib.bundle stubs.o tcltklib.o -L. -L../.. -
L.  -framework Tk -framework Tcl    -lruby -ldl  -lpthread -ldl -lobjc
ld: Undefined symbols:
_copyfile referenced from Tcl expected to be defined in libSystem
_OSSpinLockLock referenced from Tcl expected to be defined in libSystem
_OSSpinLockTry referenced from Tcl expected to be defined in libSystem
_OSSpinLockUnlock referenced from Tcl expected to be defined in  
libSystem
_pthread_atfork referenced from Tcl expected to be defined in libSystem
_HIThemeSetFill referenced from Tk expected to be defined in Carbon
_HIThemeSetStroke referenced from Tk expected to be defined in Carbon
_HIThemeSetTextFill referenced from Tk expected to be defined in Carbon
_CGContextFillEllipseInRect referenced from Tk expected to be defined  
in Carbon
_CGContextStrokeEllipseInRect referenced from Tk expected to be  
defined in Carbon
_HIShapeCreateEmpty referenced from Tk expected to be defined in Carbon
_HIShapeIntersectsRect referenced from Tk expected to be defined in  
Carbon
_HIWindowGetProxyFSRef referenced from Tk expected to be defined in  
Carbon
_HIWindowSetProxyFSRef referenced from Tk expected to be defined in  
Carbon
make[1]: *** [../../.ext/powerpc-darwin7.9.0/tcltklib.bundle] Error 1
make: *** [all] Error 1

I removed  TclTkAqua-8.5.2 and installed tcltk-8.5.2 from source.

tcl-8.5.2
cd macosx
./configure --enable-threads --enable-shared --enable-framework
make
sudo make install

tk-8.5.2
cd macosx
./configure --enable-threads --enable-shared --enable-aqua --enable-
framework
make
sudo make install

ruby-1.8.7-p22

./configure --enable-shared --enable-pthread --enable-tcltk-framework
make (no error)
sudo make install

Widget of riby-tk works fine.

On 10.4.11 or 10.5.3, TclTkAqua-8.5.2 has no problem with ruby-tk.

What's wrong on 10.3.9 ?

Ryutaro Amano
wn9r-amn@...



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Tcl-mac mailing list
tcl-mac@...
https://lists.sourceforge.net/lists/listinfo/tcl-mac

 « Return to Thread: TclTKAqua8.5.2 with ruby-tk on 10.3.9

LightInTheBox - Buy quality products at wholesale price!