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

Camlp4MacroParser.cmxs not built when compiling from source on Windows (32-bit MSVC port) #5378

Closed
vicuna opened this issue Oct 17, 2011 · 8 comments

Comments

@vicuna
Copy link

vicuna commented Oct 17, 2011

Original bug ID: 5378
Reporter: @jberdine
Assigned to: @xclerc
Status: closed (set by @diml on 2016-12-07T17:27:39Z)
Resolution: open
Priority: normal
Severity: feature
Version: 3.12.1
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Monitored by: @jberdine

Bug description

Following the build instructions in README.win32 results in a successful build, but Camlp4MacroParser.cmxs has not been compiled or installed. After compilation finishes, executing "cd _build/camlp4/CamlP4Parsers; ocamlbuild Camlp4MacroParser.cmxs; cp _build/Camlp4MacroParser.cmxs $PREFIX/lib/Camlp4Parsers" successfully compiles and installs.

@vicuna
Copy link
Author

vicuna commented Oct 17, 2011

Comment author: @jberdine

Further testing suggests that this is not specific to windows, I also see it with macos x.

@vicuna
Copy link
Author

vicuna commented Jul 11, 2012

Comment author: @lefessan

In my experience, .cmxs are never installed for camlp4, in any architecture/version. The .cmx is installed for all the backends I have tested (mingw, msvc, msvc64, cygwin) for both 3.12.1 and 4.00.

Why would you need Camlp4MacroParser.cmxs when you can use Camlp4MacroParser.cmx instead ?

@vicuna
Copy link
Author

vicuna commented Jul 15, 2012

Comment author: @jberdine

The use case for these .cmxs files is as plugins for the native version of camlp4. For instance I have an option passed to ocamlbuild:

-tag-line "<**/Foo.ml>: pp(camlp4o.opt Camlp4MacroParser.cmxs -no_quot #"

Perhaps this is not an intended usage, or there is a better way?

@vicuna
Copy link
Author

vicuna commented Jul 27, 2012

Comment author: @lefessan

On my computer, Camlp4 files are about 98 MB, while the complete OCaml install is 250 MB, i.e. 40% of it. Generating all the cmxs for all the cmx files there would make the Camlp4 directory even bigger, too big for my taste.

Such files can be generated easily on demand when needed:

ocamlopt -shared -o Camlp4MacroParser.cmxs -I +camlp4/Camlp4Parsers Camlp4MacroParser.cmx

If nobody complains about it, I will close this feature request with "Won't fix".
Maybe Camlp4 documentation should be improved to explain how to generate such plugins on demand.

@vicuna
Copy link
Author

vicuna commented Jul 27, 2012

Comment author: @jberdine

I think that your suggestion of changing just the documentation sounds like a good plan.

@vicuna
Copy link
Author

vicuna commented Aug 22, 2012

Comment author: @bobzhang

IMO, -parser macro should apply the module to get the side effect instead of dynamic loading. So for any platform which supports native code instead of dynamic native loading, it supports the native version

@vicuna
Copy link
Author

vicuna commented Sep 20, 2012

Comment author: @damiendoligez

To do: improve documentation as suggested by lefessan.

@vicuna
Copy link
Author

vicuna commented Dec 7, 2016

Comment author: @diml

Camlp4 is now a separate project. Please re-open a ticket on github [1] if you are still interested in seeing the original issue fixed.

[1] https://github.com/ocaml/camlp4/issues

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

No branches or pull requests

1 participant