Skip to content
This repository was archived by the owner on Apr 7, 2021. It is now read-only.
This repository was archived by the owner on Apr 7, 2021. It is now read-only.

Cannot install core_kernel due to path issues #43

@msaffer

Description

@msaffer

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
;;
- : string = "Win32"

[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:

  • install core_kernel 113.24.00

=-=- 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

  • build core_kernel 113.24.00
    No changes have been performed

[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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions