Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Matthieu Dubuget <matthieu.dubuget@gmail.com>
To: caml-list@inria.fr
Subject: Re: [Caml-list] dynamic link library path under mingw
Date: Wed, 27 Jan 2010 18:06:55 +0100	[thread overview]
Message-ID: <4B6072AF.90401@gmail.com> (raw)
In-Reply-To: <4B60670C.6090609@inria.fr>


From: Xavier Leroy <Xavier.Leroy@inria.fr>
>>
>> Try setting the OCAMLRUNPARAMS environment variable to the value "v=256".
>> The run-time system will then print additional debug messages
>> concerning DLL searching and loading.
>>
>> - Xavier Leroy


OCAMLRUNPARAM without S!

Thanks for the tip.

> $ OCAMLRUNPARAM="v=256" ./tests.byte
> Opening bytecode executable C:\cygwin\home\matt\m2m\m2m-ml\tests\tests.byte
> Searching C:/cygwin/home/matt/ocamlmgw/lib/stublibs\dllunix.dll
> Loading shared library C:/cygwin/home/matt/ocamlmgw/lib/stublibs\dllunix.dll
> Dynamic symbol at 10009000 (size = 205)
> [0]  100011F8: FlexDLLiniter@12
> [1]  100068C0: WSACleanup@0
> [2]  100068B8: WSAEventSelect@12
> .
> .
> .
> Searching C:/cygwin/home/matt/ocamlmgw/lib/stublibs\dllm2mEeproms.dll
> Searching C:/cygwin/home/matt/ocamlmgw/lib/site-lib/stublibs\dllm2mEeproms.dll
> Searching C:/cygwin/home/matt/ocamlmgw/lib\dllm2mEeproms.dll
> dllm2mEeproms.dll not found in search path
> Loading shared library dllm2mEeproms.dll
> Fatal error: cannot load shared library dllm2mEeproms
> Reason: Le module sp?cifi? est introuvable.

OK. only the paths stored in ld.conf are tried. Testing -I.

> $ OCAMLRUNPARAM="v=256" ocamlrun -I ../libeeproms ./tests.byte
> Opening bytecode executable C:\cygwin\home\matt\ocamlmgw\bin\ocamlrun.exe
> Not a bytecode executable
> Opening bytecode executable C:\cygwin\home\matt\m2m\m2m-ml\tests\tests.byte
> Searching ../libeeproms\dllunix.dll
> Searching C:/cygwin/home/matt/ocamlmgw/lib/stublibs\dllunix.dll
> Loading shared library C:/cygwin/home/matt/ocamlmgw/lib/stublibs\dllunix.dll
> Dynamic symbol at 10009000 (size = 205)
> [0]  100011F8: FlexDLLiniter@12
> [1]  100068C0: WSACleanup@0
> [2]  100068B8: WSAEventSelect@12
> [3]  100068B0: WSAGetLastError@0
> .
> .
> .
> [203]  10005879: worker_push
> [204]  10005438: worker_wait@4
> Searching ../libeeproms\
> Loading shared library ../libeeproms\dllm2mEeproms.dll
> Fatal error: cannot load shared library dllm2mEeproms
> Reason: Le module spécifié est introuvable.


This is better:  was found, but can't be loaded?

Maybe because it depends on another library?

depends.exe allow to check that  needs .

> [   ] DLLM2MEEPROMS.DLL
>      [   ] KERNEL32.DLL
>           [   ] NTDLL.DLL
>      [   ] MSVCRT.DLL
>           [ ^ ] KERNEL32.DLL
>                [F^ ] NTDLL.DLL
>           [ ^ ] NTDLL.DLL
>      [   ] EPROMDLL.DLL
>           [ ^ ] KERNEL32.DLL
>                [F^ ] NTDLL.DLL
>

I have the feeling that dllm2mEeproms.dll is loaded explicitely,
but that the load of EpromDll.dll is left to the operating system?


The following works:

If dllm2mEeproms.dll and EpromDll.dll are both in ../libeeproms:
> PATH="../libeeproms:$PATH" OCAMLRUNPARAM="v=256" ocamlrun -I ../libeeproms ./tests.byte


If I move EpromDll.dll in ../libeeproms/toto:
> PATH="../libeeproms/toto:$PATH" ocamlrun -I "../libeeproms" tests.byte


Two separated problems, then:
- how to store a search path into tests.byte?
- is it possible to have EpromDll.dll loaded, even if not in a $PATH 
directory?

Salutations



  reply	other threads:[~2010-01-27 17:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-27 13:56 Matthieu Dubuget
2010-01-27 16:17 ` [Caml-list] " Xavier Leroy
2010-01-27 17:06   ` Matthieu Dubuget [this message]
2010-01-27 17:20     ` Matthieu Dubuget

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B6072AF.90401@gmail.com \
    --to=matthieu.dubuget@gmail.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox