Camlp4 is installed via pacman, up to date, etc.
Name : camlp4
Version : 4.02.0+1-1
uname -a
Linux derp 3.18.6-1-ARCH #1 SMP PREEMPT Sat Feb 7 08:44:05 CET 2015 x86_64 GNU/Linux
#=== ERROR while installing lwt.2.4.7 =========================================#
# opam-version 1.2.0
# os linux
# command ./configure --prefix /home/m4b/.opam/system --disable-libev --enable-camlp4 --enable-react --disable-ssl --enable-unix --enable-preemptive --disable-glib --enable-ppx
# path /home/m4b/.opam/system/build/lwt.2.4.7
# compiler system (4.02.1)
# exit-code 1
# env-file /home/m4b/.opam/system/build/lwt.2.4.7/lwt-29560-c61e7b.env
# stdout-file /home/m4b/.opam/system/build/lwt.2.4.7/lwt-29560-c61e7b.out
# stderr-file /home/m4b/.opam/system/build/lwt.2.4.7/lwt-29560-c61e7b.err
### stderr ###
# ...[truncated]
# ocamlfind: Package `camlp4' not found
# W: Failure("Command ''/home/m4b/.opam/system/bin/ocamlfind' query -format %d camlp4 > '/tmp/oasis-f21082.txt'' terminated with error code 2")
# ocamlfind: Package `camlp4' not found
# W: Failure("Command ''/home/m4b/.opam/system/bin/ocamlfind' query -format %d camlp4 > '/tmp/oasis-12bdf0.txt'' terminated with error code 2")
# ocamlfind: Package `camlp4.quotations.o' not found
# W: Failure("Command ''/home/m4b/.opam/system/bin/ocamlfind' query -format %d camlp4.quotations.o > '/tmp/oasis-2fce3a.txt'' terminated with error code 2")
# E: Cannot find findlib package camlp4
# E: Cannot find findlib package camlp4.extend
# E: Cannot find findlib package camlp4.quotations.o
# E: Failure("3 configuration errors")
Can you find the camlp4 package by yourself (ocamlfind list) ?
If no, then you have an issue with your camlp4 installation. The easy answer is to use an opam switch (opam switch 4.02.1).
Thank you for the prompt reply!
Your hunch was correct, ocamlfind list does not return any camlp4 results.
Running opam switch 4.02.1, and installing lwt worked, although I'm not sure why since ocaml -version already returns 4.02.1, and I did have the latest camlp4 (albeit installed via pacman). But I also don't know opam that well yet --- maybe there's something magical going on? ;)
Anyway, thank you so much for the feedback and the fix!
Hey I got the same issue installing from opam on archlinux. But I figured out that the reason is opam and archlinux official repository version not match. Archlinux official repository matains _camlp4_ and _ocaml-findlib_, but if you install _camlp4_ via pacman but not _ocaml-findlib_, then opam will install _ocamlfind_ for you and use that ocamlfind to look for camlp4. but it will not find camlp4 installed by pacman (I guess it's because of version conflict)
So simply install _ocaml-findlib_ and _camlp4_ both via pacman solved the problem. I even tried to install these two package both by opam (uninstalled from pacman previously), but still failed.
Drup's method works, but that will download and install a different ocaml thus making system wide installed ocaml useless
tennix's remark really helped, also arch linux user here. got stumped on the same issue with camlp4, and uninstalling ocamlfind from user opam fixed it.
Most helpful comment
Hey I got the same issue installing from opam on archlinux. But I figured out that the reason is opam and archlinux official repository version not match. Archlinux official repository matains _camlp4_ and _ocaml-findlib_, but if you install _camlp4_ via pacman but not _ocaml-findlib_, then opam will install _ocamlfind_ for you and use that ocamlfind to look for camlp4. but it will not find camlp4 installed by pacman (I guess it's because of version conflict)
So simply install _ocaml-findlib_ and _camlp4_ both via pacman solved the problem. I even tried to install these two package both by opam (uninstalled from pacman previously), but still failed.
Drup's method works, but that will download and install a different ocaml thus making system wide installed ocaml useless