Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Odb on Windows: problem with sexplib #94

Open
cakeplus opened this Issue · 1 comment

2 participants

@cakeplus

Steps to reproduce the problem

  1. Install the official Cygwin-based OCaml installer;
  2. Install Odb by downloading the latest odb.ml, adding appropriate lines to findlib.conf, ld.conf and creating the ~/.odb/lib directory;
  3. Run the Cygwin shell;
  4. Install type_conf with ocaml odb.ml type_conv (should succeed).

Problem

mrm@proxima /cygdrive/c/projects/odb
$ ocaml odb.ml sexplib
Installing sexplib
Deps for sexplib satisfied

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  108k  100  108k    0     0  30876      0  0:00:03  0:00:03 --:--:-- 50144
package downloaded to C:\cygwin\home\mrm\.odb\install-sexplib\sexplib-108.00.02

Configuration:
ocamlfind: ........................................... C:\ocaml\bin\ocamlfind.EXE
ocamlc: .............................................. C:\ocaml\bin\ocamlc.opt.EXE
ocamlopt: ............................................ C:\ocaml\bin\ocamlopt.opt.EXE
ocamlbuild: .......................................... C:\ocaml\bin\ocamlbuild.EXE
Package name: ........................................ sexplib
Package version: ..................................... 108.00.02
os_type: ............................................. Win32
system: .............................................. mingw
architecture: ........................................ i386
ccomp_type: .......................................... cc
ocaml_version: ....................................... 4.00.0
standard_library_default: ............................ C:/ocamlmgw/lib
standard_library: .................................... c:/OCaml/lib
standard_runtime: .................................... ocamlrun
bytecomp_c_compiler: ................................. i686-w64-mingw32-gcc -O -mms-bitfields -Wall -Wno-unused
native_c_compiler: ................................... i686-w64-mingw32-gcc -O -mms-bitfields -Wall -Wno-unused
model: ............................................... default
ext_obj: ............................................. .o
ext_asm: ............................................. .s
ext_lib: ............................................. .a
ext_dll: ............................................. .dll
default_executable_name: ............................. camlprog.exe
systhread_supported: ................................. true
Install architecture-independent files dir: .......... C:\cygwin\home\mrm\.odb
Install architecture-dependent files in dir: ......... $prefix
User executables: .................................... $exec_prefix\bin
System admin executables: ............................ $exec_prefix\sbin
Program executables: ................................. $exec_prefix\libexec
Read-only single-machine data: ....................... $prefix\etc
Modifiable architecture-independent data: ............ $prefix\com
Modifiable single-machine data: ...................... $prefix\var
Object code libraries: ............................... $exec_prefix\lib
Read-only arch-independent data root: ................ $prefix\share
Read-only architecture-independent data: ............. $datarootdir
Info documentation: .................................. $datarootdir\info
Locale-dependent data: ............................... $datarootdir\locale
Man documentation: ................................... $datarootdir\man
Documentation root: .................................. $datarootdir\doc\$pkg_name
HTML documentation: .................................. $docdir
DVI documentation: ................................... $docdir
PDF documentation: ................................... $docdir
PS documentation: .................................... $docdir
findlib_version: ..................................... 1.3.3
is_native: ........................................... true
suffix_program: ...................................... .exe
Remove a file.: ...................................... del
Remove a directory.: ................................. rd
Turn ocaml debug flag on: ............................ true
Turn ocaml profile flag on: .......................... false
Compiler support generation of .cmxs.: ............... true
OCamlbuild additional flags: .........................
Create documentations: ............................... true
Compile tests executable and library and run them: ... false
pkg_unix: ............................................ c:/OCaml/lib
pkg_bigarray: ........................................ c:/OCaml/lib
pkg_num: ............................................. C:/OCaml/lib/site-lib/num
pkg_camlp4_quotations: ............................... c:/OCaml/lib/camlp4
pkg_camlp4_extend: ................................... c:/OCaml/lib/camlp4
pkg_type_conv: ....................................... C:/cygwin/home/mrm/.odb/lib/type_conv
ocamldoc: ............................................ C:\ocaml\bin\ocamldoc.EXE

mkdir 'C:\cygwin\home\mrm\.odb\install-sexplib\sexplib-108.00.02\_build'
''ocamlc.opt -I 'c:/OCaml/lib\ocamlbuild' unix.cma 'c:/OCaml/lib\ocamlbuild/ocamlbuildlib.cma' myocamlbuild.ml 'c:/OCaml/lib\ocamlbuild/ocamlbuild.cmo' -o myocamlbuild.exe
getconf: Unrecognized variable `LFS64_CFLAGS'
mkdir lib
''ocamlfind ocamldep -package unix -package num -package bigarray -modules lib/conv.mli > lib/conv.mli.depends
''ocamlfind ocamldep -package unix -package num -package bigarray -modules lib/sexp.mli > lib/sexp.mli.depends
''ocamlfind ocamldep -package unix -package num -package bigarray -modules lib/sexp_intf.ml > lib/sexp_intf.ml.depends
''ocamlfind ocamldep -package unix -package num -package bigarray -pp 'cpp -undef -traditional -I/mnt/local/sda1/ysulsky/src/misc/public/ocaml-core.bak/base/sexplib/syntax' -modules lib/pre_sexp.ml > lib/pre_sexp.ml.depends
'cpp' is not recognized as an internal or external command,
operable program or batch file.
Preprocessing error on file lib/pre_sexp.ml
Exit code 2 while executing this command:
  ''ocamlfind ocamldep -package unix -package num -package bigarray -pp 'cpp -undef -traditional -I/mnt/local/sda1/ysulsky/src/misc/public/ocaml-core.bak/base/sexplib/syntax' -modules lib/pre_sexp.ml > lib/pre_sexp.ml.depends
E: Failure("Command 'C:\\ocaml\\bin\\ocamlbuild.EXE -classic-display -no-log -no-links -install-lib-dir c:/OCaml/lib\\ocamlbuild -byte-plugin lib/sexplib.cma lib/sexplib.cmxs lib/sexplib.cmxa lib/sexplib.a syntax/pa_sexp_conv.cma top/sexplib_top.cma top/sexplib_top.cmxs top/sexplib_top.cmxa top/sexplib_top.a -tag debug' terminated with error code 2")
Exception: Failure "Could not build sexplib".

Root of evil

The build system should have called not cpp but i686-w64-mingw32-cpp. That is how a properly packaged C library would compile when configured with --host=i686-w64-mingw32.

@thelema
Owner

This one definitely needs forwarding to the sexplib maintainers. The call to cpp even has -I/mnt/local/sda1/ysulsky/src/misc/public/ocaml-core.bak/base/sexplib/syntax hard-coded in it. I'll send them a link to this excellent report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.