Mail Archives: cygwin/2001/06/06/18:54:25
Agostino Deligia schrieb am 2001-06-06, 9:13:
[...]
> > Did you do this
> >
> > ./configure --enable-shared
> > [...]
>
> I had to place the following X header files (from the Cygwin XFree86 project)
> in /usr/include/X11 before configuring with --enable-shared so that tcltklib
Yes, thats it! The x-includes were not found automagically!
Even if i tried to feed configure with the paths for X-includes
and X-libs, they got not compiled in ruby.
> would ger built and installed. Other than that, ruby 1.6.4 built
> out-of-the-box.
>
> X.h
> Xfuncproto.h
> Xlib.h
> Xosdefs.h
O.K. i stripped the build script down:
======================================
# extconf.rb for tcltklib
require 'mkmf'
dir_config("tk")
dir_config("tcl")
dir_config("X11")
tklib = with_config("tklib")
tcllib = with_config("tcllib")
stubs = enable_config("tcltk_stubs") || with_config("tcltk_stubs")
def find_tcl(tcllib, stubs)
paths = ["/usr/lib"]
func = stubs ? "Tcl_InitStubs" : "Tcl_FindExecutable"
if tcllib
find_library("tcl80", func, *paths)
end
end
def find_tk(tklib, stubs)
paths = ["/usr/lib"]
func = stubs ? "Tk_InitStubs" : "Tk_Init"
if tklib
find_library("tk80", func, *paths)
end
end
if have_header("tcl.h") && have_header("tk.h") &&
(/mswin32|mingw|cygwin/ =~ RUBY_PLATFORM || find_library("X11", "XOpenDisplay",
"/usr/X11R6/lib")) &&
find_tcl(tcllib, stubs) &&
find_tk(tklib, stubs)
$CPPFLAGS += ' -DUSE_TCL_STUBS -DUSE_TK_STUBS' if stubs
$CPPFLAGS += ' -D_WIN32' if /cygwin/ =~ RUBY_PLATFORM
create_makefile("tcltklib")
end
This creates that output:
=========================
$ ruby extconf.rb
checking for tcl.h... yes
checking for tk.h... no
It was the same at my other box...
I stripped down more:
=====================
$ ruby extconf.rb
creating Makefile
Now i need to check the Makefile,
because the include-paths are not set correctly:
$ make
[...]
In file included from tcltklib.c:13:
/usr/include/tk.h:77: X11/Xlib.h: No such file or directory
make: *** [tcltklib.o] Error 1
I did this:
===========
$ cd /usr/include
$ mkdir X11
$ mount -s -b h:/usr/X11R6/include/X11 /usr/include/X11
and had to add libtk80 and libtcl80 manually to:
LOCAL_LIBS = -ltcl80 -ltk80
$ cd back
$ make
runs fine now, the shared lib is ready.
After mounting, i ran the first script again:
=============================================
$ ruby extconf.rb
checking for tcl.h... yes
checking for tk.h... yes
checking for Tcl_FindExecutable() in -ltcl... yes
checking for Tk_Init() in -ltk... yes
creating Makefile
So it is simply the fact, that the Path of X-includes
is not compiled in ruby.
-gph
--
=^..^=
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -