Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to compile #23

Open
freedog8 opened this issue Dec 4, 2018 · 3 comments
Open

failed to compile #23

freedog8 opened this issue Dec 4, 2018 · 3 comments

Comments

@freedog8
Copy link

freedog8 commented Dec 4, 2018

[jliu@login01 PhyloCSF]$ make
make -C lib/CamlPaml reinstall
make[1]: Entering directory /data/gpfs02/jliu/ding/tools/PhyloCSF/lib/CamlPaml' make uninstall make[2]: Entering directory /data/gpfs02/jliu/ding/tools/PhyloCSF/lib/CamlPaml'
ocamlfind remove CamlPaml
ocamlfind: [WARNING] No such file: /data/gpfs01/jliu/.opam/default/lib/CamlPaml/META
make[2]: Leaving directory /data/gpfs02/jliu/ding/tools/PhyloCSF/lib/CamlPaml' make install make[2]: Entering directory /data/gpfs02/jliu/ding/tools/PhyloCSF/lib/CamlPaml'
ocamlbuild -use-ocamlfind CamlPaml.cma CamlPaml.cmxa

  • ocamlfind ocamlc -c -g -package gsl -pp ocaml+twt -o Code.cmo Code.ml
    File "Code.ml", line 55, characters 11-24:
    Warning 3: deprecated: Stdlib.String.create
    Use Bytes.create instead.
    File "Code.ml", line 57, characters 3-27:
    Warning 3: deprecated: Stdlib.String.set
    Use Bytes.set instead.
    File "Code.ml", line 193, characters 32-46:
    Warning 3: deprecated: Stdlib.Char.uppercase
    Use Char.uppercase_ascii instead.
    File "Code.ml", line 193, characters 50-64:
    Warning 3: deprecated: Stdlib.Char.uppercase
    Use Char.uppercase_ascii instead.
    File "Code.ml", line 193, characters 68-82:
    Warning 3: deprecated: Stdlib.Char.uppercase
    Use Char.uppercase_ascii instead.
    File "Code.ml", line 1:
    Error: The implementation Code.ml does not match the interface Code.cmi:
    ...
    In module DNA:
    Values do not match:
    val revcomp : string -> bytes
    is not included in
    val revcomp : string -> string
    File "Code.mli", line 29, characters 1-31: Expected declaration
    File "Code.ml", line 53, characters 5-12: Actual declaration
    Command exited with code 2.
    Compilation unsuccessful after building 53 targets (52 cached) in 00:00:00.
    make[2]: *** [lib] Error 10
    make[2]: Leaving directory /data/gpfs02/jliu/ding/tools/PhyloCSF/lib/CamlPaml' make[1]: *** [reinstall] Error 2 make[1]: Leaving directory /data/gpfs02/jliu/ding/tools/PhyloCSF/lib/CamlPaml'
    make: *** [CamlPaml] Error 2
@BioWu
Copy link

BioWu commented Jan 3, 2019

As the offical site tells, this problem may results by the difference between String and Bytes of the recent compiler.
To solve it, you can edit two Makefile in ./lib/CamlPaml and ./src/ and add -cflag '-unsafe-string' after each ocamlbuild as below:

  • Before:
    ocamlbuild -use-ocamlfind ${LIBNAME}.cma ${LIBNAME}.cmxa
  • After:
    ocamlbuild -cflag '-unsafe-string' -use-ocamlfind ${LIBNAME}.cma ${LIBNAME}.cmxa

RomainFeron added a commit to RomainFeron/PhyloCSF that referenced this issue Aug 14, 2019
@rorycraig337
Copy link

Just had the same issue - if any one else is struggling I reverted to older version of ocaml (4.02.3) and opam (2.0.0). With the current versions (ocaml 4.10.0 / opam 2.0.6) the above changes to the Makefiles was still resulting in errors as '-unsafe-string' is no longer compatible (at least with default configuration)

@Nikos22
Copy link

Nikos22 commented Jul 14, 2021

For me too, reverting to ocaml 4.02.3 did the trick, without having to do any changes to the Makefiles .
After downloading opam, I just run :

opam init --switch==4.02.3
opam switch create 4.02.3

Not sure if the first command is necessary really.
Making PhyloCSF then worked without a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants