www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/05/29/17:00:56

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
Message-ID: <974181.17033.qm@web25004.mail.ukl.yahoo.com>
Date: Fri, 29 May 2009 21:00:36 +0000 (GMT)
From: Marco Atzeri <marco_atzeri AT yahoo DOT it>
Subject: Re: R: [1.7] does LD_PRELOAD support more than 1 dll ?
To: cygwin AT cygwin DOT com
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

--- Ven 29/5/09, Christopher Faylor  ha scritto:

> Da: Christopher Faylor=20
> Oggetto: Re: R: [1.7] does LD_PRELOAD support more than 1 dll ?
> A: cygwin
> Data: Venerd=EC 29 maggio 2009, 18:01
> On Fri, May 29, 2009 at 05:02:01PM
> +0100, Dave Korn wrote:
> >Christopher Faylor wrote:
> >>On Fri, May 29, 2009 at 09:34:36AM +0000, Marco
> Atzeri wrote:
> >>>It seems that cygwin does not accept the space
> as separator in
> >>>LD_PRELOAD as other systems
> >>
> >>And lets just all take a moment of silence for a
> second to see if we
> >>can discern why that might be.
> >
> >The ubiquity of paths containing spaces on windows file
> systems?
>=20
> Yes, I probably never should have done it though since it
> isn't
> compatible with Linux.
>=20
> cgf
>=20

May I suggest a small note in the documentation ?
Just to help the next one to not fall in the same problem.=20
:-)

Further question, which are the limitation of=20
the LD_PRELOAD implementation in cygwin ?

Octave is built around 3 dlls

cygcheck src/octave.exe=20

  C:\cygwin2\bin\cygoctinterp.dll
    C:\cygwin2\bin\cygcruft.dll
[snip]
    C:\cygwin2\bin\cygoctave.dll
[snip]

on the other systems for the make check the program is=20
called with=20

LD_PRELOAD=3D"$liboctinterp $liboctave $libcruft" \
OCTAVE_SITE_INITFILE=3D"$top_srcdir/scripts/startup/main-rcfile" \
LD_LIBRARY_PATH=3D"$builddir/src:$builddir/liboctave:$builddir/libcruft:$LD=
_LIBRARY_PATH" \
  exec $driver "$builddir/src/octave" --no-init-path --path=3D"$LOADPATH" -=
-imag
e-path=3D"$IMAGEPATH" --doc-cache-file=3D"$DOCFILE" --info-file=3D"$INFOFIL=
E" "$@"

I replaced the space with ":" and now the program is loaded
but on the tests I obtained mainly a long list of:

  src/DLD-FUNCTIONS/chol.cc ..............................      3 [main] sh=
 4032 C:\cygwin2\bin\sh.exe: *** fatal error - error while loading shared l=
ibraries: /pub/cygports/octave/octave-3.2.0-rc4_build/src/cygoctinterp.dll:=
 cannot open shared object file: No such process

the same if I try to plot

plot(x,x)
      3 [main] sh 4052 C:\cygwin2\bin\sh.exe: *** fatal error - error while=
 loading shared libraries: /pub/cygports/octave/octave-3.2.0-rc4_build/src/=
cygoctinterp.dll: cannot open shared object file: No such process
      3 [main] gnuplot 1640 C:\cygwin2\bin\gnuplot.exe: *** fatal error - e=
rror while loading shared libraries: /pub/cygports/octave/octave-3.2.0-rc4_=
build/src/cygoctinterp.dll: cannot open shared object file: No such process

so it seems that the LD_PRELOAD is not working well=20
in case of fork.=20

It is not a critical issue as I already have implemented
 a workaround. For the test I remove the LD_PRELOAD=20
definition and add the build directories in front of the PATH.

I am just curious to understand the limitation.=20=20=20=20=20


Thanks
Marco


=20=20

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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