delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/07/15/18:56:47

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
X-Injected-Via-Gmane: http://gmane.org/
Path: not-for-mail
From: Charles Wilson <cwilson AT ece DOT gatech DOT edu>
Newsgroups: gmane.os.cygwin
Subject: Re: libtool dlopen [WAS: Guile and Readline won't play together]
Date: Mon, 15 Jul 2002 18:56:40 -0400
Lines: 97
Message-ID: <3D335328.6060307@ece.gatech.edu>
References: <000001c22bc5$138a5620$734b1cd3 AT Dell> <87sn2lnuwm DOT fsf AT peder DOT flower> <00ed01c22beb$6cbd4f10$1800a8c0 AT LAPTOP> <87y9cclicn DOT fsf_-_ AT peder DOT flower>
NNTP-Posting-Host: 1cust156.tnt6.atl4.da.uu.net
Mime-Version: 1.0
X-Trace: main.gmane.org 1026773794 21021 67.192.41.156 (15 Jul 2002 22:56:34 GMT)
X-Complaints-To: usenet AT main DOT gmane DOT org
NNTP-Posting-Date: Mon, 15 Jul 2002 22:56:34 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2
X-Accept-Language: en-us

On linux, does libguilereadline.so itself depend on libreadline.so ?  On 
cygwin, at least, cygguilereadline*.dll does NOT explicit depend on 
cygreadline*.dll -- and I think it should:

Your experiment seems to show that simply dlopen'ing the guilereadine 
library results in the rl_* functions begin available -- even tho you 
don't explicitly dlopen the readline library.  That says to me that, at 
least on linux, ldd libguildreadline.so should show an explicit 
dependency on libreadline.so. (This sort of explicit dependence does NOT 
appear in the relevent cygwin DLLs)

--Chuck

Jan Nieuwenhuizen wrote:

> "Robert Collins" <robert DOT collins AT syncretize DOT net> writes:
> 
> 
>>WAG time. Perhaps libtool is looking for the .la file via libtldl. As for
>>the segfault, no idea. I'll hazard a guess that no change will occur with
>>your rebuild though.
>>
> 
> Indeed.  No change did occur.  However, rebuilding cygltdl-3.dll from
> CVS, gives me:
> 
>     $ guile
>     ERROR: In procedure dynamic-link:
>     ERROR: file: "libguilereadline", message: "file not found"
> 
> Not found eh?  So what about:
> 
>     $ guile -c '(write (dynamic-link "/usr/lib/libguilereadline.la"))'
>     #<dynamic-object "/usr/lib/libguilereadline.la">
> 
> Ah, strange that we need to provide the full path, but looks nice.
> 
> Looking at readline.scm:
> 
>     (if (not (feature? 'readline))
>     (dynamic-call "scm_init_readline" (dynamic-link "libguilereadline")))
> 
> (if (not (feature? 'readline))
>     (scm-error 'misc-error
>                #f
>                "readline is not provided in this Guile installation"
>                '()
>                '()))
> 
> and changing the dynamic-link statement to:
> 
>     (dynamic-call "scm_init_readline" (dynamic-link "/usr/lib/libguilereadline.la")))
> 
> sadly gives:
> 
>     guile
>     ERROR: readline is not provided in this Guile installation
> 
> I compiled guile and libtool with debugging info, and ran guile under
> gdb.  It seems to dlopen, but no symbols get defined:
> 
>     $ gdb -nw /usr/bin/guile.exe
>     (gdb) dir libguile
>     Source directories searched: /usr/src/guile-1.5.6-4/libguile:$cdir:$cwd
>     (gdb) b main      
>     Breakpoint 1 at 0x401072: file /home/cygwin/netrel/src/guile-1.5.6-4/libguile/guile.c, line 88.
>     (gdb) r
>     Starting program: /usr/bin/guile.exe 
> 
>     Breakpoint 1, main (argc=1, argv=0x10192810)
>         at /home/cygwin/netrel/src/guile-1.5.6-4/libguile/guile.c:88
>     88	{
>     (gdb) b scm_error
>     Breakpoint 2 at 0x1000ccb0: file /home/cygwin/netrel/src/guile-1.5.6-4/libguile/error.c, line 79.
>     (gdb) c
>     Continuing.
>     guile> (dynamic-link "/usr/lib/libguilereadline.la")
>     #<dynamic-object "/usr/lib/libguilereadline.la">
>     guile> (error)
> 
>     Breakpoint 2, scm_error (key=0x101a2ec0, subr=0x0, message=0x101e7410 "?", 
>         args=0x2174, rest=0x2174)
>         at /home/cygwin/netrel/src/guile-1.5.6-4/libguile/error.c:79
>     79	  if (scm_gc_running_p)
> 
>     (gdb) p rl_<TAB><TAB> ...
> 
> 
> Doing the very same under Linux, shows the readline rl_* functions,
> after the linking.
> 
> Any clues as to how to proceed?
> 
> Jan.
> 
> 




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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