Skip to content

Build C stubs for Xen too#44

Merged
pqwy merged 4 commits intomirleft:masterfrom
talex5:xen
Jan 26, 2015
Merged

Build C stubs for Xen too#44
pqwy merged 4 commits intomirleft:masterfrom
talex5:xen

Conversation

@talex5
Copy link
Copy Markdown
Contributor

@talex5 talex5 commented Dec 22, 2014

No description provided.

@avsm
Copy link
Copy Markdown

avsm commented Jan 17, 2015

Any progress on reviewing/merging this patch?

The include path has changed: we need to include $pkg_ctypes, not
$pkg_ctypes/.. (but I kept the old one for backwards compatibility
for now). The error was:

 xen/native/nocrypto_generated_stubs.c:3:37: fatal error:
 ctypes_cstubs_internals.h: No such file or directory
  #include "ctypes_cstubs_internals.h"

I also had to add an explicit type for a key to fix this error:

 Error: The implementation (obtained by packing)
        does not match the interface src/nocrypto.mli:
        ...
        In module Cipher_block.DES.Raw:
        Values do not match:
          val encrypt_block :
            key:Unsigned.ulong Static.ptr -> Cstruct.t -> Cstruct.t ->
            unit
        is not included in
          val encrypt_block : key:ekey -> Cstruct.t -> Cstruct.t ->
          unit
The trunk version of ctypes's ocamlfind version is only 0.3.
Rely on the opam version instead.
@avsm
Copy link
Copy Markdown

avsm commented Jan 23, 2015

Ping...any progress on reviewing/merging this patch?

@pqwy
Copy link
Copy Markdown
Contributor

pqwy commented Jan 26, 2015

@talex5 -- Sorry for the delay, I've been MIA for various reasons in the past month.

Got around to actually testing the setup and it works wonderfully.

Not sure if the approach of modifying the build system of any old library you'd want to run on xen, to build the C bits twice, will be tenable further on, but it does its job as a quick fix for the TLS stack flawlessly.

Thanks!

pqwy added a commit that referenced this pull request Jan 26, 2015
Build C stubs for Xen too
@pqwy pqwy merged commit 7d61982 into mirleft:master Jan 26, 2015
@talex5
Copy link
Copy Markdown
Contributor Author

talex5 commented Jan 26, 2015

Agreed - the long term fix is support for cross-compiling in opam, but it seems that's a long way off.

@pqwy
Copy link
Copy Markdown
Contributor

pqwy commented Jan 26, 2015

Agreed on both counts.

@avsm
Copy link
Copy Markdown

avsm commented Jan 26, 2015

Also agreed that cross-compiling is the future, but this is an extremely useful checkpoint.

On 26 Jan 2015, at 16:49, David Kaloper notifications@github.com wrote:

Agreed on both counts.


Reply to this email directly or view it on GitHub #44 (comment).

@avsm
Copy link
Copy Markdown

avsm commented Jan 30, 2015

Could we have a release with this in it please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants