Loading ...
Sorry, an error occurred while loading the content.

13946Re: "ocaml_beginners"::[] OASIS help: can't build project that depends on core

Expand Messages
  • Philippe Veber
    Sep 4, 2013
    • 0 Attachment
      Hi,

      just add threads in your BuildDepends field, and it should be ok.

      cheers,
        Philippe.



      2013/9/4 Chingfan Tsou <caojingfan@...>


      I've been working around a little project recently for a better understanding of OCaml. Everything went pretty well until I ran into this problem with oasis. Apparently I had difficulties working it out alone, so any kind of help would be appreciated!

      I generated this _oasis file with 'oasis quickstart' and manually modified it since I have to use camlp4o for syntax extension:

      OASISFormat: 0.3
      Name:        rep
      Version:     0.1
      Synopsis:    ocaml regular expression
      Authors:     Chingfan Tsao
      License:     GPL-3

      Library rep
        Path:       .
        BuildTools: ocamlbuild, camlp4o
        Modules:    Expr, Autmt, Rep
        BuildDepends: sexplib.syntax, core

      and I manually modified the _tags file after looking up the internet so that oasis can deal with camlp4o:

      # OASIS_START
      # DO NOT EDIT (digest: d4c9e3a85ffc914e367dff846b370eb3)
      # Ignore VCS directories, you can use the same kind of rule outside 
      # OASIS_START/STOP if you want to exclude directories that contains 
      # useless stuff for the build process
      <**/.svn>: -traverse
      <**/.svn>: not_hygienic
      ".bzr": -traverse
      ".bzr": not_hygienic
      ".hg": -traverse
      ".hg": not_hygienic
      ".git": -traverse
      ".git": not_hygienic
      "_darcs": -traverse
      "_darcs": not_hygienic
      # Library rep
      "rep.cmxs": use_rep
      <*.ml{,i}>: pkg_sexplib.syntax
      <*.ml{,i}>: pkg_core
      # OASIS_STOP
      "expr.ml": syntax_camlp4o   #manually added

      However, I still got this error while running 'ocaml setup.ml -build':

      + ocamlfind ocamlc -c -g -package sexplib.syntax -package core -syntax camlp4o -o expr.cmo expr.ml
      ocamlfind: Error from package `threads': Missing -thread or -vmthread switch
      Command exited with code 2.

      It seems that ocamlfind needs a '-thread' argument for core, I tried this command manually with the present of '-thread' and it worked. So how am I supposed to do to make oasis generate the proper build commands for this?

      Thanks!



    • Show all 11 messages in this topic