Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with omake? #2

Open
rgrinberg opened this issue Mar 25, 2016 · 7 comments
Open

Problems with omake? #2

rgrinberg opened this issue Mar 25, 2016 · 7 comments
Labels

Comments

@rgrinberg
Copy link

@Drup mentioned to me in passing that you said that omake makes it a PITA to cross compile packages for windows. The package in question being camlimages.

Would you mind expanding on what made it so tough? I use omake for some of my packages and so do others so it would be nice if we correct this problem and make our software more usable.

@whitequark
Copy link
Member

It immediately crashed when I tried to build it on 4.02.3+32bit. Further the camlimages' OMakefile does not do everything using ocamlfind, and generally tries to do annoying things like unconditionally running pkg-config, and I assumed this is widespread--camlimages is definitely not the only OMake project that did this...

@rgrinberg
Copy link
Author

So OMake immediately crashed? That's worrying. This was specific to 32bit you say?

OMake's default rules definitely use ocamlfind for ocamlc/ocamlopt/ocamldep so I imagine this is specific to camlimages.

I'll investigate more about the pkg-config issue. Hopefully that's an issue with the default rules.

cc'ing @camlspotter perhaps he could address some of these things.

@whitequark
Copy link
Member

Hopefully that's an issue with the default rules.

That's probably also specific to camlimages...

@whitequark
Copy link
Member

This was specific to 32bit you say?

Yes, it seems to have had some confusion about word size during bootstrapping. Which is frankly my main complaint about the likes of OMake, ocp-build, etc... bootstrapping buildsystems is just not worth it, because of bytecode changes or stuff like this. Make your buildsystem export a static set of rules.

@rgrinberg
Copy link
Author

OK luckily this is being worked on ocaml-omake/omake#14

@camlspotter
Copy link

I have no idea about this but Camlimages has an OMake function to guess word size. The value is dependent on ocamlc which used to compile omake:

# Return the size of word in bytes. Uses omake's arithmetic which depends
# on OCaml's int
Word_size() =
  if $(lt $(add $(int 1073741823) $(int 1)), $(int 0))
    value 4
  else
    value 8

@whitequark
Copy link
Member

@camlspotter This is actually fine because (e.g.) building a 32-bit cross-compiler using a 64-bit compiler does not work anyway (for now).

@whitequark whitequark added the bug label Dec 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants