Comments (10)
And yes, the OCAMLLIB
environment variable has a correct value of C:\OCaml\lib
.
from ocaml-installer.
Urgh. I can't rely on OPAM to install camlp4 properly because you still need a silly patch to make camlp4 compile on Windows... see camlp4/camlp4#41 (comment)
Or maybe you can try it? The issue says that you should be able to do it...?
from ocaml-installer.
I have built and installed the 4.02
branch of Camlp4 (by pinning the git repo), and camlp4 -where
returns the correct path now: /cygdrive/c/OCaml/bin/camlp4
. However, I still can't install type_conv
, getting the same error message as before:
#=== ERROR while installing type_conv.113.00.02 ===============================#
# opam-version 1.2.2
# os cygwin
# command make
# path /home/mrm/.opam/system/build/type_conv.113.00.02
# compiler system (4.02.3)
# exit-code 2
# env-file /home/mrm/.opam/system/build/type_conv.113.00.02/type_conv-2464-ffb3fd.env
# stdout-file /home/mrm/.opam/system/build/type_conv.113.00.02/type_conv-2464-ffb3fd.out
# stderr-file /home/mrm/.opam/system/build/type_conv.113.00.02/type_conv-2464-ffb3fd.err
### stdout ###
# [...]
# pkg_camlp4_extend: ................................... C:/OCaml/lib/camlp4
#
# ./setup.exe -build
# mkdir 'C:\wodi32\home\mrm\.opam\system\build\type_conv.113.00.02\_build'
# ''ocamlfind ocamlc unix.cma -I 'C:\OCaml\lib\ocamlbuild' 'C:\OCaml\lib\ocamlbuild/ocamlbuildlib.cma' -linkpkg myocamlbuild.ml 'C:\OCaml\lib\ocamlbuild/ocamlbuild.cmo' -o myocamlbuild.exe
# mkdir src
# ''C:/wodi32/home/mrm/.opam/system/bin/ocamlfind.EXE ocamldep -syntax camlp4o -package camlp4.quotations -package camlp4.extend -modules src/pa_type_conv.mli > src/pa_type_conv.mli.depends
# Exit code 2 while executing this command:
# ''C:/wodi32/home/mrm/.opam/system/bin/ocamlfind.EXE ocamldep -syntax camlp4o -package camlp4.quotations -package camlp4.extend -modules src/pa_type_conv.mli > src/pa_type_conv.mli.depends
# Makefile:21: ошибка выполнения рецепта для цели «build»
### stderr ###
# Camlp4: Uncaught exception: DynLoader.Error ("Camlp4OCamlRevisedParser.cmo", "file not found in path")
#
# File "src/pa_type_conv.mli", line 1:
# Error: Error while running external preprocessor
# Command line: camlp4 "-I" "C:/OCaml/lib/camlp4" "-I" "C:/OCaml/lib/camlp4" "-I" "C:/OCaml/lib/camlp4" "-I" "C:/OCaml/lib/camlp4" "-parser" "o" "-parser" "op" "-printer" "p" "-parser" "Camlp4QuotationCommon" "-parser" "Camlp4OCamlRevisedQuotationExpander" "-ignore" "foo" "-parser" "Camlp4GrammarParser" "src/pa_type_conv.mli" > C:\wodi32\tmp\ocamlpp6a61ab
#
# E: Failure("Command 'C:\\OCaml\\bin\\ocamlbuild.EXE -classic-display -no-log -no-links -install-lib-dir C:\\OCaml\\lib\\ocamlbuild -byte-plugin src/pa_type_conv.cma src/pa_type_conv.cmxa src/pa_type_conv.a src/pa_type_conv.cmxs -use-ocamlfind -tag debug' terminated with error code 2")
# make: *** [build] Ошибка 1
As if Camlp4 couldn't locate C:/OCaml/lib/camlp4/Camlp4Parsers
...
from ocaml-installer.
The root of the problem seems to be neither in OASIS nor in ocamlbuild:
$ camlp4 -I "C:/OCaml/lib/camlp4" "-parser" "o"
Camlp4: Uncaught exception: DynLoader.Error ("Camlp4OCamlRevisedParser.cmo", "file not found in path")
from ocaml-installer.
huh. the dynloader should try to load a cmxs
, shouldn't it?
from ocaml-installer.
camlp4
is a byte-compiled executable, so it needs a .cmo
.
from ocaml-installer.
Suddenly, this works:
camlp4 -I "C:/OCaml/lib/camlp4" "-parser" Camlp4Parsers/Camlp4OCamlRevisedParser.cmo
And even without specifying the search path:
camlp4 "-parser" Camlp4Parsers/Camlp4OCamlRevisedParser.cmo
Puzzling. Seems like a yet another path-handling-related bug in Camlp4.
from ocaml-installer.
This did the trick:
export CAMLP4LIB=C:/OCaml/lib/camlp4
I'm not sure how or why does it work, but the installer can also set this variable, at least as a temporary workaround. Something is probably wrong with handling those paths in Camlp4, but I haven't figured that out yet.
from ocaml-installer.
Can you submit a pull request?
(I'm short on time right now.)
Thanks,
Jonathan
from ocaml-installer.
Hello. I haven't figured out how to add this environment variable into the installation script (I'm not familiar with NSIS), and I didn't have time to test the modified installer, so I put that "export" line into my .bashrc
and it didn't bother me after that.
from ocaml-installer.
Related Issues (20)
- Is a sandboxed, portable installation possible? HOT 2
- all gallium.inria.fr broken on protz.github.io/ocaml-installer/ HOT 3
- package external solver? HOT 1
- ocamlmklib and flexlink
- opam does not install packages due to colon in path (64 bit) HOT 15
- issue on windows 10 HOT 3
- wrong pre-populated list of packages in the installer
- Cannot install core_kernel due to path issues HOT 4
- opam install depext fails; poss due to tar given a Windows path HOT 11
- more reliable hosting? HOT 2
- Windows User Name With Spaces HOT 3
- OPAM Forking itself infinitely on Windows 10
- opam config env registry issues
- The installer overwrote my PATH! HOT 3
- Loading topfind doesn't work HOT 7
- ocamlopt writes an error message when the output file contains no dot
- 'opam install ocamlfind' does not work: patch did not apply
- opam install depext-cygwinports fails HOT 4
- opam command not found
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ocaml-installer.