reasonml / ReasonNativeProject

Reason native compilation starter project
MIT License
203 stars 45 forks source link

How to add core to dependency list? #29

Closed jimexist closed 7 years ago

jimexist commented 7 years ago

I got:

cp pkg/META.in pkg/META
ocamlbuild -package topkg pkg/build.native
Finished, 4 targets (4 cached) in 00:00:00.
./build.native build
+ ocamlfind ocamlc -c -package menhirLib -package cmdliner -package core -package yojson -pp '-package menhirLib -package cmdliner -package core -package yojson' -I src -pp 'refmt --print binary' -o src/rejq.cmo -intf-suffix .rei -impl src/rejq.re
ocamlfind: Error from package `threads': Missing -thread or -vmthread switch
Command exited with code 2.
Compilation unsuccessful after building 2 targets (1 cached) in 00:00:00.
build.native: [ERROR] cmd ['rebuild' '-use-ocamlfind' '-I' 'src' '-pkg' 'yojson' '-pkg' 'core'
     '-pkg' 'cmdliner' '-pkg' 'menhirLib' 'opam' 'pkg/META' 'pkg/META'
     'src/rejq.native']: exited with 10
make: *** [build] Error 1

after adding core to opam. But i could not see an easy way to add -thread flag to the pkg/build.ml file.

vramana commented 7 years ago

You should able to pass -thread flag with _tags file of ocamlbuild. I don't remember the syntax for it but it's the way to go.

jimexist commented 7 years ago

@vramana thanks - i'll have a try, in the meantime, i already got it from discord that i could also use containers package instead.