delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/06/06/18:54:25

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
From: "Gerrit P. Haase" <gerrit DOT haase AT t-online DOT de>
Organization: Esse keine toten Tiere
To: cygwin AT cygwin DOT com
Date: Thu, 7 Jun 2001 00:53:16 +0200
MIME-Version: 1.0
Subject: Re: ruby-1.6.4 on cygwin
Reply-to: gerrit DOT haase AT t-online DOT de
Message-ID: <3B1ED07C.19051.120A220B@localhost>
In-reply-to: <20010606091318.A1316@ADELIGIA>
References: <20010606210540 DOT A4055311 AT iij4u DOT or DOT jp>; from madokam AT dd DOT iij4u DOT or DOT jp on Wed, Jun 06, 2001 at 09:05:40PM +0900
X-mailer: Pegasus Mail for Win32 (v3.12cDE)

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019