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

Re: Mirage/kFreeBSD on GitHub



On 31 Jul 2012, at 14:30, PALI Gabor Janos <pgj@xxxxxxx> wrote:

> Hi there,
> 
> I have just added a repository with an initial version of the Mirage/kFreeBSD
> port to GitHub:
> 
> https://github.com/pgj/mirage-kfreebsd
> 
> It does not do too much at the moment, however it is possible to build and run
> a kernel module with OCaml inside.  I am hoping to continue the development
> there, any feedback is appreciated.

Great stuff! I have a FreeBSD 9 VM that I am installing all this on at the
moment.  I ran into this after cloning the repo fresh:

~/mirage-kfreebsd/packages/mirage-stdlib/src$ make
gmake -f GNUMakefile PREFIX=/usr/local all
ocamlrun ocamlc -strict-sequence -g -warn-error A -nostdlib `./Compflags 
pervasives.cmo` -c pervasives.ml
Fatal error: the file ocamlc is not a bytecode executable file
gmake: *** [pervasives.cmo] Error 2

Why are you running "ocamlrun ocamlc"?  The bytecode binaries are
compiled in with a copy of the bytecode interpreter, so you can just
invoke them directly as "ocamlc".  Better still, use the native
version of "ocamlc.opt" which will give you much faster compilation.

I applied this to continue the compilation, but I guess this is
because you have a custom version of ocaml installed, I'm guessing?

diff --git a/packages/mirage-stdlib/src/Makefile.shared 
b/packages/mirage-stdlib/src/Makefile.shared
index f947f8d..bd89701 100644
--- a/packages/mirage-stdlib/src/Makefile.shared
+++ b/packages/mirage-stdlib/src/Makefile.shared
@@ -89,10 +89,10 @@ MKMAINDLL=cc  -shared
 
 RUNTIME=ocamlrun
 COMPILER=ocamlc
-CAMLC=$(RUNTIME) $(COMPILER)
+CAMLC=$(COMPILER)
 COMPFLAGS=-strict-sequence -g -warn-error A -nostdlib
 OPTCOMPILER=ocamlopt
-CAMLOPT=$(RUNTIME) $(OPTCOMPILER)
+CAMLOPT=$(OPTCOMPILER)
 OPTCOMPFLAGS=-warn-error A -nostdlib -g -nodynlink -fno-PIC
 CAMLDEP=ocamldep
 

-anil


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.