janestreet / sexplib

Automated S-expression conversion
MIT License
147 stars 27 forks source link

compilation error on FreeBSD #5

Closed hannesm closed 10 years ago

hannesm commented 10 years ago

any thoughts?

=== ERROR while installing sexplib.110.01.00 =====
opam-version         1.1.0
os                   freebsd
command              gmake
path                 /usr/home/hannes/.opam/4.01.0/build/sexplib.110.01.00
compiler             4.01.0
exit-code            2
env-file             /usr/home/hannes/.opam/4.01.0/build/sexplib.110.01.00/sexplib-72969-e7966f.env
stdout-file          /usr/home/hannes/.opam/4.01.0/build/sexplib.110.01.00/sexplib-72969-e7966f.out
stderr-file          /usr/home/hannes/.opam/4.01.0/build/sexplib.110.01.00/sexplib-72969-e7966f.err
# stdout ###
...[truncated]

./setup.exe -build 
ocamlfind ocamlopt unix.cmxa -I /home/hannes/.opam/4.01.0/lib/ocaml/ocamlbuild /home/hannes/.opam/4.01.0/lib/ocaml/ocamlbuild/ocamlbuildlib.cmxa -linkpkg myocamlbuild.ml /home/hannes/.opam/4.01.0/lib/ocaml/ocamlbuild/ocamlbuild.cmx -o myocamlbuild
ocamlfind ocamldep -package bigarray -modules lib/conv.mli > lib/conv.mli.depends
ocamlfind ocamldep -package bigarray -modules lib/sexp.mli > lib/sexp.mli.depends
ocamlfind ocamldep -package bigarray -modules lib/sexp_intf.ml > lib/sexp_intf.ml.depends
ocamlfind ocamldep -pp 'cpp -undef -traditional -Isyntax' -package bigarray -modules lib/pre_sexp.ml > lib/pre_sexp.ml.depends
+ ocamlfind ocamldep -pp 'cpp -undef -traditional -Isyntax' -package bigarray -modules lib/pre_sexp.ml > lib/pre_sexp.ml.depends
Command exited with code 2.
gmake[1]: Leaving directory `/usr/home/hannes/.opam/4.01.0/build/sexplib.110.01.00'
# stderr ###
W: Cannot find source file matching module 'sexplib_num' in library sexplib_num
W: Cannot find source file matching module 'sexplib' in library sexplib
E: Failure("Command ''/home/hannes/.opam/4.01.0/bin/ocamlbuild' lib/sexplib.cma lib/sexplib.cmxa lib/sexplib.a lib/sexplib.cmxs num/lib/sexplib_num.cma num/lib/sexplib_num.cmxa num/lib/sexplib_num.a num/lib/sexplib_num.cmxs unix/lib/sexplib_unix.cmx unix/lib/sexplib_unix.cmo syntax/pa_sexp_conv.cma syntax/pa_sexp_conv.cmxa syntax/pa_sexp_conv.a syntax/pa_sexp_conv.cmxs top/sexplib_top.cma top/sexp...[truncated]
gmake[1]: *** [build] Error 1
ghost commented 10 years ago

Can you try to run cpp -undef -traditional -Isyntax lib/pre_sexp.ml in sexplib?

hannesm commented 10 years ago

sure, http://opendylan.org/~hannes/sexplib-out.txt is the output thereof

ghost commented 10 years ago

Seems normal, except for the warnings. Maybe that's what causing the issue. I'm not sure why ocamlfind ocamldep ... is not printing anything. Can you try to run it by hand?

hannesm commented 10 years ago

ocamlfind ocamldep -pp 'cpp -undef -traditional -Isyntax' -package bigarray -modules lib/pre_sexp.ml

returns

lib/pre_sexp.ml:109:14: warning: missing terminating ' character [-Winvalid-pp-token]
      let str' = mach_maybe_esc_str str in
             ^
lib/pre_sexp.ml:110:35: warning: missing terminating ' character [-Winvalid-pp-token]
      let new_may_need_space = str' == str in
                                  ^
lib/pre_sexp.ml:112:30: warning: missing terminating ' character [-Winvalid-pp-token]
      pp_print_string ppf str';
                             ^
lib/pre_sexp.ml:150:16: warning: missing terminating ' character [-Winvalid-pp-token]
        let str' = mach_maybe_esc_str str in
               ^
lib/pre_sexp.ml:151:37: warning: missing terminating ' character [-Winvalid-pp-token]
        let new_may_need_space = str' == str in
                                    ^
lib/pre_sexp.ml:153:34: warning: missing terminating ' character [-Winvalid-pp-token]
        Buffer.add_string buf str';
                                 ^
lib/pre_sexp.ml:173:16: warning: missing terminating ' character [-Winvalid-pp-token]
        let str' = mach_maybe_esc_str str in
               ^
lib/pre_sexp.ml:174:37: warning: missing terminating ' character [-Winvalid-pp-token]
        let new_may_need_space = str' == str in
                                    ^
lib/pre_sexp.ml:176:27: warning: missing terminating ' character [-Winvalid-pp-token]
        add_string buf str';
                          ^
lib/pre_sexp.ml:201:24: warning: missing terminating ' character [-Winvalid-pp-token]
   can argue that if it's free to allocate strings smaller than 256 words,
                       ^
lib/pre_sexp.ml:202:62: warning: missing terminating ' character [-Winvalid-pp-token]
   large s-expressions requiring larger expensive buffers won't notice
                                                             ^
lib/pre_sexp.ml:230:42: warning: missing terminating ' character [-Winvalid-pp-token]
   is taken in account.  Under Unix there's no easy way to get the umask in
                                         ^
lib/pre_sexp.ml:418:13: warning: missing terminating ' character [-Winvalid-pp-token]
  | Done of 't * Parse_pos.t
            ^
lib/pre_sexp.ml:421:63: warning: missing terminating ' character [-Winvalid-pp-token]
and ('a, 't) parse_fun = pos : int -> len : int -> 'a -> ('a, 't) parse_result
                                                              ^
lib/pre_sexp.ml:423:6: warning: missing terminating ' character [-Winvalid-pp-token]
type 't parse_state =
     ^
lib/pre_sexp.ml:426:22: warning: missing terminating ' character [-Winvalid-pp-token]
    mutable pstack : 't;
                     ^
16 warnings generated.
lib/pre_sexp.ml: Array1 Bigarray Buffer Char Format Lexer List Parser Printf Random String Sys Type

which apart from the warnings should be good, shouldn't it? -- but lib/pre_sexp.ml.depends in _build/ is empty...