Open msaffer opened 8 years ago
I think this is one more instance of @dra27's opam fork not calling bash with proper quoting. It's very primitive right now... and the install: directives are sometimes not run properly.
Oh but you shouldn't use opam's config -env feature. Have you followed the instructions at http://protz.github.io/ocaml-installer/ for setting a proper PATH?
Yep, I put the following in my ~/.bashrc at first: export CAML_LD_LIBRARY_PATH=$HOME/.opam/system/lib/stublibs:/cygdrive/c/OCaml/lib/stublibs export MANPATH=$HOME/.opam/system/man:$MANPATH export PATH=$HOME/.opam/system/bin:$PATH
Do you know any way around this? Maybe I should fork that repo and try and fix it? I got the feeling from @dra27's patches that someone was able to get core working on windows with that opam repo.
The repository at https://github.com/fdopen/opam-repository-mingw is supposed to go along with the custom-made OPAM binary from @fdopen that's listed on the wiki page; however:
It's probably not very hard to fix shell invocations -- I remember dealing with that a while ago as I hunted down some bug in ocamlbuild. I do have, however, more urgent things to deal with :(.
I followed the install instructions, when I try to install core_kernel, I run into issues [3]. My best guess is that opam is doing the wrong thing because it thinks it's on a windows system[1], even though I'm running inside of cygwin, and because of that it's exporting PATH with semicolon separators instead of colons [2]. I think this causes ppx-jane to not be in the path when opam tries to compile it.
I tried doing
opam config set os cygwin
which just broke things. Trying to upgrade to 113.33 didn't help either.This is on a 64-bit system [4]
[1] $ ocaml OCaml version 4.02.3
Sys.os_type
[2] $ opam config env CAML_LD_LIBRARY_PATH="C:\cygwin64\home\msaffer.opam\system\lib\stublibs;C:\OCaml\lib\stublibs"; export CAML_LD_LIBRARY_PATH; MANPATH="C:\cygwin64\home\msaffer.opam\system\man;/home/msaffer/.opam/system/man:"; export MANPATH; PATH="C:\cygwin64\home\msaffer.opam\system\bin;C:\cygwin64\usr\local\bin;C:\cygwin64\bin;C:\OCaml\bin;C:\ruby\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Chocolatey\bin;C:\Windows\System32\Windows System Resource Manager\bin;C:\Windows\idmu\common;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit"; export PATH;
[3] $ opam install core_kernel The following actions will be performed:
=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= [core_kernel: ./configure C:\cygwin64\home\msaffer.opam\system] Command started [core_kernel: make] Command started [ERROR] The compilation of core_kernel failed at "make".
=== ERROR while compiling core_kernel.113.24.00 ==============================
opam-version 1.3.0~dev2 (d4f7e01216dbb44af4e7cc6539a1b0afa9be9d2c)
os win32
command bash -c make
path C:\cygwin64\home\msaffer.opam\system\build\core_kernel.113.24.00
exit-code 2
env-file C:\cygwin64\home\msaffer.opam\system\build\core_kernel.113.24.00\core_kernel-22524-ad8886.env
stdout-file C:\cygwin64\home\msaffer.opam\system\build\core_kernel.113.24.00\core_kernel-22524-ad8886.out
stderr-file C:\cygwin64\home\msaffer.opam\system\build\core_kernel.113.24.00\core_kernel-22524-ad8886.err
stdout
[...]
''mv hash_stubs.o src/hash_stubs.o
''C:/cygwin64/home/msaffer/.opam/system/bin/ocamlfind.EXE ocamlc -g -I include -c src/heap_block_stubs.c
''mv heap_block_stubs.o src/heap_block_stubs.o
''C:/cygwin64/home/msaffer/.opam/system/bin/ocamlfind.EXE ocamlc -g -I include -c src/int_math_stubs.c
''mv int_math_stubs.o src/int_math_stubs.o
''C:/cygwin64/home/msaffer/.opam/system/bin/ocamlfind.EXE ocamlc -g -I include -c src/time_ns_stubs.c
''mv time_ns_stubs.o src/time_ns_stubs.o
''C:/cygwin64/home/msaffer/.opam/system/bin/ocamlfind.EXE ocamlmklib -o src/core_kernel_stubs src/bigstring_marshal_stubs.o src/bigstring_stubs.o src/core_array_stubs.o src/core_gc_stubs.o src/exn_stubs.o src/hash_stubs.o src/heap_block_stubs.o src/int_math_stubs.o src/time_ns_stubs.o
''C:/cygwin64/home/msaffer/.opam/system/bin/ocamlfind.EXE ocamldep -package variantslib -package typerep -package sexplib -package ppx_inline_test.runtime-lib -package ppx_expect.collector -package ppx_bench.runtime-lib -package ppx_assert.runtime-lib -package num -package fieldslib -package bin_prot -pp 'ppx-jane -dump-ast -inline-test-lib core_kernel' -predicates ppx_driver -modules src/app[...]
Exit code 2 while executing this command:
''C:/cygwin64/home/msaffer/.opam/system/bin/ocamlfind.EXE ocamldep -package variantslib -package typerep -package sexplib -package ppx_inline_test.runtime-lib -package ppx_expect.collector -package ppx_bench.runtime-lib -package ppx_assert.runtime-lib -package num -package fieldslib -package bin_prot -pp 'ppx-jane -dump-ast -inline-test-lib core_kernel' -predicates ppx_driver -modules src/a[...]
Makefile:15: recipe for target 'build' failed
stderr
W: Cannot find source file matching module 'core_kernel' in library core_kernel
'ppx-jane' is not recognized as an internal or external command,
operable program or batch file.
File "src/applicative.mli", line 1:
Error: Error while running external preprocessor
Command line: ppx-jane -dump-ast -inline-test-lib core_kernel "src/applicative.mli" > C:\cygwin64\tmp\ocamlpp2efe4f
#
E: Failure("Command ''C:/OCaml/bin/ocamlbuild.EXE' -classic-display -no-log -no-links -install-lib-dir 'C:/OCaml/lib/ocamlbuild' -byte-plugin src/libcore_kernel_stubs.a src/dllcore_kernel_stubs.dll src/core_kernel.cma src/core_kernel.cmxa src/core_kernel.a src/core_kernel.cmxs -use-ocamlfind -plugin-tags 'package(ppx_driver.ocamlbuild)' -tag debug' terminated with error code 2")
make: *\ [build] Error 1
=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= The following actions failed
[4] $ opam config report
OPAM config report
opam-version 1.3.0~dev2 (d4f7e01216dbb44af4e7cc6539a1b0afa9be9d2c)
self-upgrade no
os win32
external-solver no
jobs 1
repositories 0 (http), 1 (version-controlled)
pinned 0
current-switch system*
last-update 2016-03-10 20:13
$ opam config list
Global OPAM configuration variables
user user group group make make root C:\cygwin64\home\msaffer.opam prefix C:\cygwin64\home\msaffer.opam\system lib C:\cygwin64\home\msaffer.opam\system\lib bin C:\cygwin64\home\msaffer.opam\system\bin sbin C:\cygwin64\home\msaffer.opam\system\sbin doc C:\cygwin64\home\msaffer.opam\system\doc stublibs C:\cygwin64\home\msaffer.opam\system\lib\stublibs toplevel C:\cygwin64\home\msaffer.opam\system\lib\toplevel man C:\cygwin64\home\msaffer.opam\system\man share C:\cygwin64\home\msaffer.opam\system\share etc C:\cygwin64\home\msaffer.opam\system\etc
Global variables from the environment
ocaml-version 4.02.3 # The version of the currently used OCaml compiler opam-version 1.3.0~dev2 # The currently running OPAM version compiler system # The name of the current OCaml compiler (may be more specific than the version, eg: "4.01.0+fp", or "system") preinstalled true # Whether the compiler was preinstalled on the system, or installed by OPAM switch system # The local name (alias) of the current switch jobs 1 # The number of parallel jobs set up in OPAM configuration ocaml-native true # Whether the OCaml native compilers are available ocaml-native-tools true # Whether the native ".opt" version of the OCaml toolchain is available ocaml-native-dynlink true # Whether native dynlink is available on this installation arch x86_64 # The current arch, as returned by "uname -m"
Package variables ('opam config list PKG' to show)
PKG:name # Name of the package PKG:version # Version of the package PKG:depends # Resolved direct dependencies of the package PKG:installed # Whether the package is installed PKG:enable # Takes the value "enable" or "disable" depending on whether the package is installed PKG:pinned # Whether the package is pinned PKG:bin # Binary directory for this package PKG:sbin # System binary directory for this package PKG:lib # Library directory for this package PKG:man # Man directory for this package PKG:doc # Doc directory for this package PKG:share # Share directory for this package PKG:etc # Etc directory for this package PKG:build # Directory where the package was built PKG:hash # Hash of the package archive