发件人： Gabriel Kerneis
发送时间： 2009-06-09 16:17:00
主题： Re: [CIL users] How to build lcil library
On Mon, Jun 08, 2009 at 11:05:56AM +0800, xunilwithkrow wrote:
> My configuration is Cil-1.3.4 and Ocaml 3.08.3. I want to get
> libcil.so after compilation but I can only find libcil.a in in
> cil/obj/x86_LINUXS. I think I should change Makefile.cil but it's hard
> for me to figure it out in elegant way. So my question is how to
> build lcil shared library ?
Is there a reason why you use those deprecated software? Ocaml 3.11 and
Cil 1.3.7 have both been released a few time ago.
I'm facing legacy system, which is built with Ocaml 3.08 and Cil-1.3.4. Since a lot of interfaces have been changed in Cil-1.3.7, if I insist on Cil-1.3.7, there will be trouble in bulk waiting for me (in fact , I just tried Cil-1.3.7 before , and so it is). You see , I have to no choice for this.
Moreover, what do you want to do with libcil.so? Shared libraries are
tricky in Ocaml because of static type-checking:
The libcil.so is the prerequisite for the legacy system. I don't know why it's needed. But without it , it just can't build the system.
If you used an up-to-date Ocaml, you might consider Dynlink (available
in both byte-code and native mode ― native one not available in 3.08):
I see Dynlink can handle with the byte-code dynamic loading, but I'm just confused with how to use it. And Is there any possibility to let me get the libcil.so ?
By the way, did the Cil core-team considered using it to load modules
dynamically? It would make Cil much more modular.