frenetic-lang / ocaml-topology

OCaml topology package
5 stars 4 forks source link

thread in _tags? #19

Closed jnfoster closed 10 years ago

jnfoster commented 10 years ago

I had to add

true:thread

to the _tags file to get this package to compile on Linux.

Here's a build from a fresh clone:

vagrant@vagrant-ubuntu-saucy-64:~/ocaml-topology$ make
ocaml setup.ml -configure 

Configuration: 
ocamlfind: ........................................... /home/vagrant/.opam/4.01.0/bin/ocamlfind
ocamlc: .............................................. /home/vagrant/.opam/4.01.0/bin/ocamlc.opt
ocamlopt: ............................................ /home/vagrant/.opam/4.01.0/bin/ocamlopt.opt
ocamlbuild: .......................................... /home/vagrant/.opam/4.01.0/bin/ocamlbuild
Package name: ........................................ topology
Package version: ..................................... 0.9
os_type: ............................................. Unix
system: .............................................. linux
architecture: ........................................ amd64
ccomp_type: .......................................... cc
ocaml_version: ....................................... 4.01.0
standard_library_default: ............................ /home/vagrant/.opam/4.01.0/lib/ocaml
standard_library: .................................... /home/vagrant/.opam/4.01.0/lib/ocaml
standard_runtime: .................................... /home/vagrant/.opam/4.01.0/bin/ocamlrun
bytecomp_c_compiler: ................................. gcc -fno-defer-pop -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT -fPIC
native_c_compiler: ................................... gcc -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT
model: ............................................... default
ext_obj: ............................................. .o
ext_asm: ............................................. .s
ext_lib: ............................................. .a
ext_dll: ............................................. .so
default_executable_name: ............................. a.out
systhread_supported: ................................. true
Install architecture-independent files dir: .......... /usr/local
Install architecture-dependent files in dir: ......... $prefix
User executables: .................................... $exec_prefix/bin
System admin executables: ............................ $exec_prefix/sbin
Program executables: ................................. $exec_prefix/libexec
Read-only single-machine data: ....................... $prefix/etc
Modifiable architecture-independent data: ............ $prefix/com
Modifiable single-machine data: ...................... $prefix/var
Object code libraries: ............................... $exec_prefix/lib
Read-only arch-independent data root: ................ $prefix/share
Read-only architecture-independent data: ............. $datarootdir
Info documentation: .................................. $datarootdir/info
Locale-dependent data: ............................... $datarootdir/locale
Man documentation: ................................... $datarootdir/man
Documentation root: .................................. $datarootdir/doc/$pkg_name
HTML documentation: .................................. $docdir
DVI documentation: ................................... $docdir
PDF documentation: ................................... $docdir
PS documentation: .................................... $docdir
findlib_version: ..................................... 1.4
is_native: ........................................... true
suffix_program: ...................................... 
Remove a file.: ...................................... rm -f
Remove a directory.: ................................. rm -rf
Turn ocaml debug flag on: ............................ true
Turn ocaml profile flag on: .......................... false
Compiler support generation of .cmxs.: ............... true
OCamlbuild additional flags: ......................... 
Create documentations: ............................... true
Compile tests executable and library and run them: ... false
ocamldoc: ............................................ /home/vagrant/.opam/4.01.0/bin/ocamldoc
pkg_str: ............................................. /home/vagrant/.opam/4.01.0/lib/ocaml
pkg_ocamlgraph: ...................................... /home/vagrant/.opam/4.01.0/lib/ocamlgraph
pkg_openflow: ........................................ /home/vagrant/.opam/4.01.0/lib/openflow
pkg_packet: .......................................... /home/vagrant/.opam/4.01.0/lib/packet

ocaml setup.ml -build 
Finished, 1 target (0 cached) in 00:00:00.
+ ocamlfind ocamlc -c -g -package str -package packet -package openflow -package ocamlgraph -I lib -o lib/Topology.cmi lib/Topology.mli
ocamlfind: Error from package `threads': Missing -thread or -vmthread switch
Command exited with code 2.
Compilation unsuccessful after building 2 targets (0 cached) in 00:00:00.
E: Failure("Command ''/home/vagrant/.opam/4.01.0/bin/ocamlbuild' lib/topology.cma lib/topology.cmxa lib/topology.a lib/topology.cmxs exe/main.byte -use-ocamlfind -tag debug' terminated with error code 10")
make: *** [build] Error 1
vagrant@vagrant-ubuntu-saucy-64:~/ocaml-topology$ emacs _tags 
[...]
vagrant@vagrant-ubuntu-saucy-64:~/ocaml-topology$ make
ocaml setup.ml -build 
Finished, 1 target (0 cached) in 00:00:00.
Finished, 24 targets (0 cached) in 00:00:01.

Any idea why?

basus commented 10 years ago

Maybe try pkg_threads instead? That's what oasis seems to do.

jnfoster commented 10 years ago

adding true: thread to _tags did the trick.

arjunguha commented 10 years ago

no need to manually hack tags. add thread as a dep in ocamlbuild. works?

jnfoster commented 10 years ago

What does "add thread as a dep in ocamlbuild" mean? Adding it to the BuildDepends section does not work.

jnfoster commented 10 years ago

Ahh, threads not thread. OMG WTF FML.