[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH] Don't rely on OCaml native compiler for tests



On 05/10/2011 07:59 PM, Hilko Bengen wrote:
> * Richard W.M. Jones:
> 
>> On Tue, May 10, 2011 at 12:47:06PM +0200, Hilko Bengen wrote:
>>> * Richard W.M. Jones:
>>>
>>>> I pushed this, and also the Python/configure patch.
>>>
>>> Uh-oh, I mede a mistake there.
>>>
>>> The tests get built if I have libhivex.so.0 somewhere in the system
>>> path, but the version in ../lib/.libs is not found.
>>
>> Shouldn't there always be a version in libs/.libs?  Surely it has just
>> been built by 'make' ...
> 
> Yes, a fresh version of libhivex.so.0 can be found in lib/.libs, but as
> it seems that ocamlc (or some other responsible component) does not look
> there.
> 
> ,----
> | hivex.git $ ls lib/.libs/
> | libhivex.a   libhivex.lai  libhivex.so.0      libhivex_la-hivex.o
> | libhivex.la  libhivex.so   libhivex.so.0.0.0
> | hivex.git $ cd ocaml
> | ocaml $ make
> | gcc -std=gnu99 -I.. -I/usr/lib/ocaml -I../ocaml -I../lib   -g -O2 -fPIC -Wall -c hivex_c.c
> | ocamlfind ocamlc -package unix -c hivex.mli -o hivex.cmi
> | ocamlfind ocamlc -package unix -c hivex.ml -o hivex.cmo
> | ocamlmklib -o mlhivex hivex_c.o hivex.cmo -L../lib/.libs -lhivex
> | ocamlfind ocamlopt -package unix -c hivex.ml -o hivex.cmx
> | ocamlmklib -o mlhivex hivex_c.o hivex.cmx -L../lib/.libs -lhivex
> | cd .. && /bin/bash ./config.status ocaml/META
> | config.status: creating ocaml/META
> | ocamlfind ocamlc -package unix -c t/hivex_005_load.ml -o t/hivex_005_load.cmo
> | mkdir -p t
> | ocamlfind ocamlc -cclib -L../lib/.libs -I . -package unix -linkpkg mlhivex.cma t/hivex_005_load.cmo -o t/hivex_005_load
> | File "_none_", line 1, characters 0-1:
> | Error: Error on dynamically loaded library: ./dllmlhivex.so: libhivex.so.0: cannot open shared object file: No such file or directory

Try:
$(LIBTOOL) --mode=execute -dlopen ../lib/libhivex.la $(OCAMLFIND) ...

'make check' appears to do that already automatically, so
t/hivex_005_load runs correctly too.

Best regards,
--Edwin


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]