doomeer / factorio

Factorio Planner
MIT License
137 stars 40 forks source link

build fails on Ubuntu 16.04 #17

Closed peschue closed 7 years ago

peschue commented 7 years ago

I tried to build on Ubuntu 16.04 but the build fails.

ocamlbuild -no-links -use-ocamlfind -tag annot factoriojs.byte
Failure: ocamlfind not found on path, but -no-ocamlfind not used.
Compilation unsuccessful after building 0 targets (0 cached) in 00:00:00.
Makefile:36: recipe for target '_build/factoriojs.byte' failed
make: *** [_build/factoriojs.byte] Error 2

ocamlfind does not exist. ocaml is the one from Ubuntu installed as specified in the readme. It is version 4.02.3 - is this the problem?

If I edit the Makefile and use -no-ocamlfind instead of -use-ocamlfind I get the following errors:

ocamlbuild -no-links -no-ocamlfind -tag annot factoriojs.byte
File "_tags", line 3, characters 6-33:
Warning: tag "package" does not expect a parameter, but is used with parameter "js_of_ocaml.syntax"
File "_tags", line 3, characters 35-50:
Warning: tag "syntax" does not expect a parameter, but is used with parameter "camlp4o"
File "_tags", line 2, characters 6-26:
Warning: tag "package" does not expect a parameter, but is used with parameter "js_of_ocaml"
File "_tags", line 2, characters 6-26:
Warning: the tag "package(js_of_ocaml)" is not used in any flag or dependency declaration, so it will have no effect; it may be a typo. Otherwise you can use `mark_tag_used` in your myocamlbuild.ml to disable this warning.
File "_tags", line 3, characters 35-50:
Warning: the tag "syntax(camlp4o)" is not used in any flag or dependency declaration, so it will have no effect; it may be a typo. Otherwise you can use `mark_tag_used` in your myocamlbuild.ml to disable this warning.
File "_tags", line 3, characters 6-33:
Warning: the tag "package(js_of_ocaml.syntax)" is not used in any flag or dependency declaration, so it will have no effect; it may be a typo. Otherwise you can use `mark_tag_used` in your myocamlbuild.ml to disable this warning.
+ /usr/bin/ocamldep -modules html.ml > html.ml.depends
File "html.ml", line 41, characters 11-13:
Error: Syntax error
Command exited with code 2.
Compilation unsuccessful after building 9 targets (8 cached) in 00:00:00.
Makefile:36: recipe for target '_build/factoriojs.byte' failed
make: *** [_build/factoriojs.byte] Error 10
peschue commented 7 years ago

I found out that I need to install a few more packages on Ubuntu 16.04 and then make works:

sudo apt-get install ocaml-findlib camlp4
peschue commented 7 years ago

reopening - maybe this could be added to the readme.

doomeer commented 7 years ago

Thanks for the report! I'll indeed update the README. I use opam instead of the Debian packages so I did not notice this issue, sorry!

doomeer commented 7 years ago

Fixed!