www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/05/30/08:59:31

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: <614736.14374.qm@web25008.mail.ukl.yahoo.com>
Date: Sat, 30 May 2009 12:59:15 +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

--- Sab 30/5/09, Christopher ha scritto:

> >> ? Did you export it?? That might make a
> >> difference if the shell is involved.
> >>=20
> >> ? ? cheers,
> >> ? ? ? DaveK
> >>=20
> >Hi Dave,
> >also exporting all the 3 variables in the script
> >does make no difference
> >
> >export
> PATH=3D"$builddir/src:$builddir/liboctave:$builddir/libcruft:$PATH"
> >export LD_PRELOAD=3D"$liboctinterp:$liboctave:$libcruft"
> >export
> LD_LIBRARY_PATH=3D"$builddir/src:$builddir/liboctave:$builddir/libcruft:$=
LD_LIBRARY_PATH"
> >OCTAVE_SITE_INITFILE=3D"$top_srcdir/scripts/startup/main-rcfile"
> \
> >=A0 exec $driver "$builddir/src/octave"
> --no-init-path --path=3D"$LOADPATH" --image-path=3D"$IMAGEPATH"
> --doc-cache-file=3D"$DOCFILE" --info-file=3D"$INFOFILE" "$@"
> >
> >
> >=A0 =A0 =A0 5 [main] sh 3964
> 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
>=20
>  From the source:
>=20
> =A0 =A0 =A0 if (!LoadLibraryW
> (lib.get_wide_win32_path (libname)))
> =A0 =A0 =A0 =A0 {
> =A0 =A0 =A0 =A0 =A0 __seterrno ();
> =A0 =A0 =A0 =A0 =A0 api_fatal ("error while
> loading shared libraries: %s: "
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0
> =A0 =A0=A0=A0"cannot open shared object file:
> %s", p,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0
> =A0 =A0=A0=A0strerror (get_errno ()));
> =A0 =A0 =A0 =A0 }
>=20
>  "No such process" =3D=3D ESRCH =3D=3D PROC_NOT_FOUND
>=20
> cgf

Hi Christopher
but the dll file is there:

$ ls -lh /pub/cygports/octave/octave-3.2.0-rc4_build/src/cygoctinterp.dll
-rwxr-xr-x 1 itq00146 Domain_Users 202M May 27 20:01 /pub/cygports/octave/o=
ctave-3.2.0-rc4_build/src/cygoctinterp.dll

so how can it fail to load dlls only with LD_PRELOAD defined ?

Ok, I found it.=20
The order is also relevant

cygoctinterp.dll requires=20
   cygcruft.dll and cygoctave.dll

cygoctave.dll requires=20
  cygcruft.dll

So the working way is :

export LD_PRELOAD=3D"$libcruft:$liboctave:$liboctinterp"



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

- Raw text -


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