[Opa] Problem with build on FreeBSD, unsure where to add -I +site-lib/cryptokit..

Jeremy Messenger mezz.freebsd at gmail.com
Wed Jan 4 00:02:33 UTC 2012

2012/1/3 Frédéric Perrin <frederic.perrin at resel.fr>:
> On 03.01.2012 23:18, Jeremy Messenger wrote:
>> 2012/1/3 Frédéric Perrin <frederic.perrin at resel.fr>:
>>> On 03.01.2012 00:08, Jeremy Messenger wrote:
>> We still need to port
>> libbase/memory.c (was rusage.c) to FreeBSD. Maybe use the
>> kvm_getprocs()? http://tinyurl.com/7f9qndr  I have found an example of
>> it:
> Or just use getrusage(). Will look at this later.

Yeah, or that. It seems like that a lot of systems' getrusage() sucks.
I am not sure how FreeBSD's getrusage() is, so it's why I am thinking
about kvm_getprocs(). Current I have patch it to 'return 0', so it
will allowing me to build and worry about it later.

>>>> where I can add "-I +site-lib/cryptokit" in some where because the
>>>> Makefile has been generated by bslregister.native. [...]
>>>> I have went in the _build/crypto.opp and edited the Makefile by add
>>>> "-I +site-lib/cryptokit". It works.
>>> From a quick investigation: In build_rules.ml:opp_build, the function
>>> that adds the include dirs assumes that the modules are either in $PWD,
>>> or in /usr/local/lib/ocaml.
>> Thanks for point me to the right place. I see that in the 376 line has:
>> let lib_dir s = [A"--ml";A"-I";A"--ml";P (if Pathname.exists s then
>> ".." / s else ("+"^s))] in
>> It needs to add a new check if there has any match of use_* in the
>> config.ml then use it. If it doesn't exist in config.ml then go ahead
>> add "+". Do I get a right idea?
> Yes, you do. The only problem is I am not familiar enough with the build
> system to do this part for you, and I'm half-expecting somebody from
> MLstate to point us in the right direction :).
>>>> BTW: I had to edit in libbsl/bslregister.ml by change from 'make' to
>>>> 'gmake' for the build. It's only for FreeBSD and *BSDs though.
>>> This should be done automatically by `configure'. Is it not?
>>> https://github.com/MLstate/opalang/blob/master/configure#L662
>> I don't think it will work unless change from "make" to "makebinary"?
>> It has a hardcore of "make" in there:
> My bad, Config.makebinary is used in qml2ocaml.ml, but not in
> bslregister.ml.

Just learned (still learning though) about the git and GitHub, so I
have put a pull request for this change:



> --
> Fred

mezz.freebsd at gmail.com - mezz at FreeBSD.org
http://www.FreeBSD.org/gnome/ - gnome at FreeBSD.org

More information about the Opa mailing list