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

Language parser installations #43

Open
noah-de opened this issue Feb 7, 2025 · 4 comments
Open

Language parser installations #43

noah-de opened this issue Feb 7, 2025 · 4 comments

Comments

@noah-de
Copy link

noah-de commented Feb 7, 2025

First of all, I would like to thank you for providing this excellent open source tool. I have found the Docker quickstart to be quite compelling.
I installed with opam install cca which provides the diffast command but not the language modules.

$ diffast samples/c/0/airo.c samples/c/1/airo.c 
[diffast][WARNING][file search] module not found: "Mcpp.cmxs"
[diffast][WARNING][file search] conf file not found: "ccx.conf.xml"
[diffast][WARNING][Astml] conf for parser "ccx" not found
[diffast][WARNING][file search] module not found: "Mcpp.cmxs"
[diffast][WARNING][file search] module not found: "Mcpp.cmxs"
[diffast][WARNING][file search] module not found: "Mcpp.cmxs"
[diffast][ERROR] "/home/user/.cca/cache/af/af42b4557cbcda1c4b4ffcbbfaf17544/src.ast": no such file or directory

The parser was built with make from within the ./src/ directory.
The problem appears that the cmx files are not found.
Those files are in the source code (/src/ast/analyzing/langs/) but the make process is not finding them.

....
File "_none_", line 1:
Warning 58 [no-cmx-file]: no cmx file was found in path for module Pxp_dtd, and its interface was not compiled with -opaque
File "_none_", line 1:
Warning 58 [no-cmx-file]: no cmx file was found in path for module Pxp_tree_parser, and its interface was not compiled with -opaque
File "_none_", line 1:
Warning 58 [no-cmx-file]: no cmx file was found in path for module Pxp_types, and its interface was not compiled with -opaque
ocamlfind ocamlopt -package pxp,volt -syntax camlp4o -I ../../../../util -I ../../../../ast/analyzing/common -I ../../../../otreediff -I ../../../../ast/analyzing/engine -O3 -g -c label.ml
File "_none_", line 1:
Warning 58 [no-cmx-file]: no cmx file was found in path for module Pxp_event, and its interface was not compiled with -opaque
ocamlfind ocamlopt -package pxp,volt -syntax camlp4o -I ../../../../util -I ../../../../ast/analyzing/common -I ../../../../otreediff -I ../../../../ast/analyzing/engine -O3 -g -c tree.ml
ocamlfind ocamlopt -package pxp,volt -syntax camlp4o -I ../../../../util -I ../../../../ast/analyzing/common -I ../../../../otreediff -I ../../../../ast/analyzing/engine -O3 -g -c fact.ml
ocamlfind ocamlopt -package pxp,volt -syntax camlp4o -I ../../../../util -I ../../../../ast/analyzing/common -I ../../../../otreediff -I ../../../../ast/analyzing/engine -O3 -g -c lib_base.ml
File "_none_", line 1:
Warning 58 [no-cmx-file]: no cmx file was found in path for module Pxp_dtd, and its interface was not compiled with -opaque
File "_none_", line 1:
Warning 58 [no-cmx-file]: no cmx file was found in path for module Pxp_ev_parser, and its interface was not compiled with -opaque
File "_none_", line 1:
Warning 58 [no-cmx-file]: no cmx file was found in path for module Pxp_event, and its interface was not compiled with -opaque
File "_none_", line 1:
Warning 58 [no-cmx-file]: no cmx file was found in path for module Pxp_tree_parser, and its interface was not compiled with -opaque
File "_none_", line 1:
Warning 58 [no-cmx-file]: no cmx file was found in path for module Pxp_types, and its interface was not compiled with -opaque
....

Can you please help me to understand (and overcome) this problem? I have tried serveral Debian based operating systems and OCaml versions (>= 4.14.1), as indicated in the other issue (#42).
I would be glad to contribute to this project, and write accessible documentation once I have a better grasp of how things work.
Thank you!

@codinuum
Copy link
Owner

codinuum commented Feb 7, 2025

Thank you for reporting. We will look into it.

@codinuum
Copy link
Owner

codinuum commented Feb 8, 2025

It is likely caused by recent changes of mirage packaging.
We have pushed an urgent workaround b42334f .

@noah-de
Copy link
Author

noah-de commented Feb 8, 2025

Thank you!
Unfortunately, the issue persists even after checking out the latest changes from the develop branch.

$ make distclean
$ git checkout develop
$ git log
$ make
$ diffast samples/java/0/Test.java samples/java/1/Test.java
[diffast][WARNING][file search] module not found: "Mjava.cmxs"
[diffast][ERROR] parser for ".java" not found

Is there a way that I can just copy the file from ./src/ast/analyzing/langs/java/Mjava.cmxs to the correct location?
Thank you!

@codinuum
Copy link
Owner

codinuum commented Feb 8, 2025

Where is your diffast? It searches relative path ../../modules for lang modules.

$ $(dirname $(dirname $(which diffast)))/modules/

Or the following may work.

$ ./src/ast/analyzing/bin/diffast samples/java/0/Test.java samples/java/1/Test.java

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

No branches or pull requests

2 participants