haselwarter / hol-light

Automatically exported from code.google.com/p/hol-light
Other
0 stars 0 forks source link

camlp5 version detection logic incorrect #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. svn checkout
2. make
3.

What is the expected output? What do you see instead?
File "pa_j.ml", line 195, characters 6-21:
Error: The constructor PaLab expects 2 argument(s),
       but is applied here to 3 argument(s)

What version of the product are you using? On what operating system?
camlp5 6.06

Please provide any additional information below.
This patch seems to solve the problem

Index: Makefile
===================================================================
--- Makefile    (revision 146)
+++ Makefile    (working copy)
@@ -56,7 +56,7 @@
         then cp pa_j_${OCAML_VERSION}.ml pa_j.ml ; \
         else if test ${CAMLP5_VERSION} = "6.02.1" ; \
              then cp pa_j_3.1x_6.02.1.ml pa_j.ml; \
-             else if test ${CAMLP5_VERSION} = "6.02.2" -o ${CAMLP5_VERSION} = 
"6.02.3" -o ${CAMLP5_VERSION} = "6.05" ; \
+             else if test ${CAMLP5_VERSION} = "6.02.2" -o ${CAMLP5_VERSION} = 
"6.02.3" -o ${CAMLP5_VERSION} = "6.05" -o ${CAMLP5_VERSION} = "6.06" ; \
                   then cp pa_j_3.1x_6.02.2.ml pa_j.ml; \
                   else cp pa_j_3.1x_${CAMLP5_BINARY_VERSION}.xx.ml pa_j.ml; \
                   fi \

Original issue reported on code.google.com by kimmit...@gmail.com on 20 Aug 2012 at 4:42

GoogleCodeExporter commented 9 years ago
Thanks, this should be fixed in r147.

Original comment by jrh...@gmail.com on 5 Sep 2012 at 10:28

GoogleCodeExporter commented 9 years ago
I just had the same error, using:
- Mac 10.6.8
- Ocaml 4.00.1
- camlp5 6.08

I've tried various suggestions I've found online, but none have worked so far. 
Any tips would be much appreciated. Thanks!

Original comment by olewi...@gmail.com on 2 Apr 2013 at 3:39

GoogleCodeExporter commented 9 years ago
Dear http://code.google.com/u/114450594453066362058/,
  The fix in your case will be to go into the Makefile
and add a specific test for your OCAML_VERSION and CAMLP5_VERSION
along the same lines that I did. This particular logic is not 
robust to modifications to tool versions.

Original comment by kimmit...@gmail.com on 2 Apr 2013 at 3:44

GoogleCodeExporter commented 9 years ago
Got it - thanks. Is is possible to be a bit more explicit? I don't have a lot 
of experience in this area. Thanks again!

Original comment by olewi...@gmail.com on 2 Apr 2013 at 4:17

GoogleCodeExporter commented 9 years ago
If you have a look at my patch, you will see I added an expression

-o  ${CAMLP5_VERSION} = "6.06"

which means "or camlp5 version is 6.06"

you need to add the same with your version which is 6.08 this will be around 
line 59 in the Makefile

Now you will realize ocaml 4.00.1 is quite a bit different from 3.12.x I'm not 
sure what will happen, all this patch does is detect the correct file to use.
It does not mean it will work, so good luck, if it goes wrong, try compiling 
with the 3.12.x series of ocaml and try to spot the problem

Original comment by kimmit...@gmail.com on 2 Apr 2013 at 4:27

GoogleCodeExporter commented 9 years ago
Great - something similar seems to have worked:

make clean
cp pa_j_3.1x_6.02.2.ml pa_j.ml
make

I'm having other issues now, but they don't seem related to the makefile. 
Thanks again for your help. 

Original comment by olewi...@gmail.com on 2 Apr 2013 at 5:56