This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: R: [1.7] does LD_PRELOAD support more than 1 dll ?


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

> Da: Christopher Faylor 
> Oggetto: Re: R: [1.7] does LD_PRELOAD support more than 1 dll ?
> A: cygwin
> Data: Venerdì 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?
> 
> Yes, I probably never should have done it though since it
> isn't
> compatible with Linux.
> 
> cgf
> 

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

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

Octave is built around 3 dlls

cygcheck src/octave.exe 

  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 
called with 

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

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 libraries: /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 - 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

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

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

I am just curious to understand the limitation.     


Thanks
Marco


  

--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]