<copumpkin>
hmm, it might be because I'm missing camlp5, but compiling camlp5 fails with an error about two different files making inconsistent assumptions about the Warnings interface :(
<thelema>
you get that error when compiling?
<copumpkin>
when compiling campl5, yep
<copumpkin>
not sure if the lack of campl5 is what's causing my other error
<thelema>
Yes, lack of camlp5 is causing your older error
<copumpkin>
ah
<thelema>
the inconsistent assumptions is like a dependency mismatch - one module expects dependency A to look different from how another module expects that same dependency
<copumpkin>
ah, hm
<copumpkin>
it's just a vanilla install of 3.12.0 on mac os (I'm a newbie)
<copumpkin>
all I did was download the ocaml package, install it, and then unpack the camlp5 tarball
<thelema>
usually make clean resolves these problems, what's the files involved?
<copumpkin>
already tried make clean, didn't help :/ the files are ocaml_stuff/3.12.0/parsing/parsetree.cmi and /usr/local/lib/ocaml/toploop.cmi
<thelema>
I'm guessing camlp5 hasn't been updated for 3.12, which just came out
<copumpkin>
the download page claims it works for 3.12.0
<thelema>
ok, let's see if we can get it installed...
<copumpkin>
thanks!
<thelema>
it's accessing the ocaml source tree - can you make clean there too?
<copumpkin>
hm, I didn't build ocaml from source. Just a binary package... I guess it includes the source tree anyway? would that be /usr/local/lib/ocaml/ ?
<copumpkin>
no makefile in there, though :/
<thelema>
ocaml_stuff/3.12.0/parsing/parsetree.cmi looks like a file from the ocaml source distribution
<copumpkin>
oh, that's within the campl5 folder, hmm
<copumpkin>
I guess I could just copy the system one over it
<thelema>
what's the full inconsistent assumptions error?
erickt_ has joined #ocaml
erickt has quit [Ping timeout: 240 seconds]
<thelema>
hmm, interesting... it doesn't compile for me either...
<thelema>
but with a different error than you're getting
<thelema>
It looks like that'll be necessary - camlp5 needs to link against parts of the compiler tree, and it includes the files it usually needs in its own source tree (dirty hack)
<copumpkin>
so I should just download the source tree and build it normally? or can I use my current version somehow?
<copumpkin>
is the compiler written in C or ocaml?
<thelema>
but it looks like there's some difference between what's included and what's needed, so let's try building your compiler and if camlp5 doesn't build, we can pull the needed files from the compiler tree
<thelema>
the compiler is written in a mix of C and ocaml - you should be able to bootstrap it from what's in the source distribution
<copumpkin>
building now :)
<copumpkin>
okay, built my own ocaml, but still get the camlp5 error
<copumpkin>
same one
chee has joined #ocaml
<copumpkin>
(and it's using the new one)
Edward has quit []
jeddhaberstro has joined #ocaml
<thelema>
ok, copy the warnings.* files from util/ in the ocaml source tree to the camlp5/3.12.0/utils
<thelema>
err, camlp5/ocaml_stuff/...
joewilliams_away is now known as joewilliams
psnively has joined #ocaml
joewilliams is now known as joewilliams_away
psnively has left #ocaml []
<copumpkin>
o.O
<copumpkin>
Error: Corrupted compilation unit description
<copumpkin>
in /usr/local/lib/ocaml/pervasives.cmx
ssbr_ has joined #ocaml
<thelema>
really? wow, that's a good one.
<copumpkin>
:P
<thelema>
you reinstalled ocaml (from source) over the binary ocaml?
<copumpkin>
yeah
<thelema>
so pervasives.cmx is freshly installed?
<thelema>
(can you double-check the file timestamp)
ssbr has quit [Ping timeout: 265 seconds]
<copumpkin>
-rw-r--r-- 1 root wheel 4551 Aug 7 18:37 /usr/local/lib/ocaml/pervasives.cmx
<copumpkin>
about when I compiled it
valross has quit [Remote host closed the connection]
<thelema>
to build ocaml, you did [make world]?
<copumpkin>
yeah
<thelema>
try [make bootstrap] now
<copumpkin>
from camlp5 I assume?
<thelema>
no, the compiler
<copumpkin>
oh
ssbr_ has quit [Read error: Connection reset by peer]
<thelema>
The "make bootstrap" checks that the bytecode programs compiled with
<thelema>
the new compiler are identical to the bytecode programs compiled with
<thelema>
the old compiler.
ssbr_ has joined #ocaml
<copumpkin>
it says fixpoint reached, bootstrap succeeded
<thelema>
ok, and with that installed, still the same problem?
<thelema>
ah, maybe you didn't compile the native code compiler... try [make world.opt]
<copumpkin>
in ocaml or camlp5? cause I've been doing make world.opt in camlp5 the entire time
<flux>
I would be quite surprised if one were to get that corrupted compilation unit description error if the compiler that produced the .cmx and the compiler have the same versions
<flux>
uh
<flux>
no, I said it right :)
<thelema>
in ocaml
ikawe has quit [Quit: Lost terminal]
Edward has joined #ocaml
<copumpkin>
oh yay
<copumpkin>
I think it worked :)
<copumpkin>
but lol, I still get the Symtable.Error _.
<copumpkin>
ah well, at least I have camlp5 now
|marius| has joined #ocaml
carter has joined #ocaml
ztfw` has joined #ocaml
ztfw has quit [Ping timeout: 265 seconds]
<copumpkin>
any ideas about that error?
verte has quit [Quit: ~~~ Crash in JIT!]
Sgeo has joined #ocaml
<thelema>
copumpkin: :( you've got camlp5 installed (as far as you can tell), but you still get the symtable error?
<copumpkin>
yep
<copumpkin>
my computer is cursed, I think
<thelema>
probably not. It might just be easier to install an old version of ocaml (3.09 or so) and see if it works with that.
<thelema>
the pre-processor changed unexpectedly with 3.10, and this is likely the cause of your problems...
<copumpkin>
ah
<thelema>
what's the line of code you get the Symtable.Error -. at?
<thelema>
-. is float subtraction
<thelema>
it should be built in
<copumpkin>
not really sure, actually
<copumpkin>
the instructions say to run make interactive
<thelema>
yes, because of the preprocessing...
<copumpkin>
and I get a REPL-like thing, but it just says that I have an exception
<copumpkin>
no info about where it came from
<thelema>
ah, okay...
<thelema>
in that case, we debug differently... it looks like [make interactive] uses init.ml - you can paste it into ocaml toplevel one ;; at a time
<thelema>
(yes, not too pretty, but it's not that long
<copumpkin>
first line I pasted in failed with an index out of bounds error
<copumpkin>
#load "nums.cma";; (* For Ocaml 3.06 *)
<copumpkin>
I guess I can omit that one?
<copumpkin>
oh!
<copumpkin>
I think I see what's wrong
<copumpkin>
yep, looks like it works :)
<copumpkin>
it was explicitly checking for 3.10 and 3.11
<thelema>
pretty likely you can omit that. I don't know why it's loading the arbitrary precision number library
<copumpkin>
when deciding what to do
<copumpkin>
I added a condition for 3.12 too, and now it works (albeit with a million warnings)
<thelema>
ah. Non-futureproof-code.
<thelema>
I hope the warnings don't keep it from working. Good luck
sepp2k has quit [Quit: Leaving.]
<copumpkin>
thanks :)
<copumpkin>
yeah, they're just non-exhaustive pattern matches
<copumpkin>
with any luck the guy behind this knew what he was doing when he left them out
<thelema>
:( I fix all those warnings in my code - even if I'm just doing an assert false to insist it can't happen.
Edward has quit []
|marius| has quit [Remote host closed the connection]
|marius| has joined #ocaml
carter_ has joined #ocaml
<copumpkin>
yay, it works nicely :)
carter has quit [Ping timeout: 264 seconds]
<copumpkin>
# real_qelim <<forall b c d. exists x. x^3 + b*x^2 + c*x + d = 0>>;;
<copumpkin>
- : fol formula = <<true>>
<thelema>
really? wow, that's amusing.
<copumpkin>
it can decide any first-order formula about the reals involving the usual field operations :)
<copumpkin>
although even that small one took a second to compute
<thelema>
what does it return for quadratics?
<thelema>
x^2 + bx + c = 0
<thelema>
(I hope it returns false)
<copumpkin>
# real_qelim <<forall b c. exists x. x^2 + b*x + c = 0>>;;
<copumpkin>
- : fol formula = <<false>>
<copumpkin>
:)
<thelema>
I'm impressed. I'm not even sure how I'd go about building a system that could prove such things