Re: [Caml-list] dynamic link library path under mingw

2010-01-27 Thread Xavier Leroy

I'm doing something wrong, but can't figure out what?


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

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] dynamic link library path under mingw [NC]

2010-01-27 Thread Matthieu Dubuget

 Original Message 
Subject: Re: [Caml-list] dynamic link library path under mingw [NC]
From: Rabih EL-CHAAR rabih.el-ch...@lyxor.com
To: matthieu.dubu...@gmail.com
Date: 27/01/2010 15:36



Why you're not using -dllpath option in ocamlmklib?
I think this should solve your problem (didn't make the check).


I did. With no more success.

I even did it with -verbose, with and without -dllpath: the emitted 
commands are the same


Thanks for your suggestion

P.S. I have the same kind of problem with native code. Is there any way 
to store search path for dynamic libraries in PO/COFF programs?


Salutations

Matt

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] dynamic link library path under mingw

2010-01-27 Thread Matthieu Dubuget


From: Xavier Leroy xavier.le...@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: flexdllini...@12
[1]  100068C0: wsaclea...@0
[2]  100068B8: wsaeventsel...@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: flexdllini...@12
[1]  100068C0: wsaclea...@0
[2]  100068B8: wsaeventsel...@12
[3]  100068B0: wsagetlaster...@0
.
.
.
[203]  10005879: worker_push
[204]  10005438: worker_w...@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


___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs