caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Compiler can't find a stub anymore
@ 2012-10-15 12:21 rixed
  2012-10-22  7:03 ` rixed
  0 siblings, 1 reply; 3+ messages in thread
From: rixed @ 2012-10-15 12:21 UTC (permalink / raw)
  To: caml-list

I'm using parmap for a project, and using ocamlfind for compiling.
All was fine until I started mixing C with OCaml for my program.
Ocamlc does not want to find libparmap_stubs.so any more.

Here is my build process, step by step, verbosely:

> # Dependancies...
> $ make .depend
> OCAMLPATH=./.. ocamlfind ocamldep -syntax camlp4o -package "batteries batteries.pa_string.syntax bricabrac pfds bitstring bitstring.syntax zip parmap" -I .. *.ml *.mli > .depend
> gcc -M -I /home/rixed/ocalme/lib/ocaml -I . -D_GNU_SOURCE ll_serial.c >> .depend
> 
> # Build my C library
> $ make libmlrrd.a
> colorgcc -O0 -g3 -ggdb3 -W -Wall -std=c99 -W -Wall -I /home/rixed/ocalme/lib/ocaml -I . -D_GNU_SOURCE  -c -o ll_serial.o ll_serial.c
> ar rcs libmlrrd.a ll_serial.o
> 
> # Build my OCaml library
> $ make mlrrd.cma
> OCAMLPATH=./.. ocamlfind ocamlc -verbose -thread -rectypes -syntax camlp4o -package "batteries batteries.pa_string.syntax bricabrac pfds bitstring bitstring.syntax zip parmap"  -w Ael -g -annot -c traffic.ml
> Effective set of preprocessor predicates: preprocessor,syntax,camlp4o
> Effective set of compiler predicates: pkg_unix,pkg_threads.posix,pkg_threads,pkg_num.core,pkg_num,pkg_bigarray,pkg_str,pkg_batteries,pkg_camlp4,pkg_estring,pkg_batteries.pa_string.syntax,pkg_bricabrac,pkg_pfds,pkg_bitstring,pkg_bitstring.syntax,pkg_zip,pkg_parmap,syntax,autolink,mt,mt_posix,byte
> + ocamlc.opt -verbose -rectypes -w Ael -g -annot -c -thread -I /home/rixed/ocalme/lib/ocaml/site-lib/num -I /home/rixed/ocalme/lib/ocaml/camlp4 -I /home/rixed/ocalme/lib/ocaml/site-lib/estring -I /home/rixed/ocalme/lib/ocaml/site-lib/batteries -I ./../bricabrac -I ./../pfds -I /home/rixed/ocalme/lib/ocaml/site-lib/bitstring -I /home/rixed/ocalme/lib/ocaml/site-lib/zip -I /home/rixed/ocalme/lib/ocaml/site-lib/parmap -pp "camlp4 '-I' '/home/rixed/ocalme/lib/ocaml/camlp4' '-I' '/home/rixed/ocalme/lib/ocaml/site-lib/estring' '-I' '/home/rixed/ocalme/lib/ocaml/site-lib/batteries' '-I' '/home/rixed/ocalme/lib/ocaml/site-lib/bitstring' '-parser' 'o' '-parser' 'op' '-printer' 'p' 'pa_estring.cmo' 'pa_strings.cma' 'unix.cma' 'bitstring.cma' 'bitstring_persistent.cma' 'pa_bitstring.cmo' " traffic.ml
> + camlp4 '-I' '/home/rixed/ocalme/lib/ocaml/camlp4' '-I' '/home/rixed/ocalme/lib/ocaml/site-lib/estring' '-I' '/home/rixed/ocalme/lib/ocaml/site-lib/batteries' '-I' '/home/rixed/ocalme/lib/ocaml/site-lib/bitstring' '-parser' 'o' '-parser' 'op' '-printer' 'p' 'pa_estring.cmo' 'pa_strings.cma' 'unix.cma' 'bitstring.cma' 'bitstring_persistent.cma' 'pa_bitstring.cmo'  'traffic.ml' > /tmp/camlpp0b67b9
> colorgcc -O0 -g3 -ggdb3 -W -Wall -std=c99 -W -Wall -I /home/rixed/ocalme/lib/ocaml -I . -D_GNU_SOURCE  -c -o ll_serial.o ll_serial.c
> ar rcs libmlrrd.a ll_serial.o
> 
> ...
> 
> OCAMLPATH=./.. ocamlfind ocamlc -verbose -thread -rectypes   -a -o mlrrd.cma -syntax camlp4o -package "batteries batteries.pa_string.syntax bricabrac pfds bitstring bitstring.syntax zip parmap" -custom -linkpkg  -w Ael -g -annot serial.cmo txtInput.cmo binInput.cmo output.cmo datatype.cmo tuple2.cmo tuple3.cmo tuple4.cmo tuple5.cmo tuple6.cmo tuple7.cmo tuple8.cmo tuple9.cmo tuple10.cmo tuple11.cmo tuple12.cmo tuple16.cmo distribution.cmo aggregator.cmo dbfile.cmo table.cmo plot.cmo traffic.cmo libmlrrd.a
> Effective set of preprocessor predicates: preprocessor,syntax,camlp4o
> Effective set of compiler predicates: pkg_unix,pkg_threads.posix,pkg_threads,pkg_num.core,pkg_num,pkg_bigarray,pkg_str,pkg_batteries,pkg_camlp4,pkg_estring,pkg_batteries.pa_string.syntax,pkg_bricabrac,pkg_pfds,pkg_bitstring,pkg_bitstring.syntax,pkg_zip,pkg_parmap,syntax,autolink,mt,mt_posix,byte
> + ocamlc.opt -verbose -rectypes -a -o mlrrd.cma -custom -w Ael -g -annot -thread -I /home/rixed/ocalme/lib/ocaml/site-lib/num -I /home/rixed/ocalme/lib/ocaml/camlp4 -I /home/rixed/ocalme/lib/ocaml/site-lib/estring -I /home/rixed/ocalme/lib/ocaml/site-lib/batteries -I ./../bricabrac -I ./../pfds -I /home/rixed/ocalme/lib/ocaml/site-lib/bitstring -I /home/rixed/ocalme/lib/ocaml/site-lib/zip -I /home/rixed/ocalme/lib/ocaml/site-lib/parmap -pp "camlp4 '-I' '/home/rixed/ocalme/lib/ocaml/camlp4' '-I' '/home/rixed/ocalme/lib/ocaml/site-lib/estring' '-I' '/home/rixed/ocalme/lib/ocaml/site-lib/batteries' '-I' '/home/rixed/ocalme/lib/ocaml/site-lib/bitstring' '-parser' 'o' '-parser' 'op' '-printer' 'p' 'pa_estring.cmo' 'pa_strings.cma' 'unix.cma' 'bitstring.cma' 'bitstring_persistent.cma' 'pa_bitstring.cmo' " /home/rixed/ocalme/lib/ocaml/unix.cma /home/rixed/ocalme/lib/ocaml/threads/threads.cma /home/rixed/ocalme/lib/ocaml/nums.cma /home/rixed/ocalme/lib/ocaml/bigarray.cma /home/rixed/ocalme/lib/ocaml/str.cma /home/rixed/ocalme/lib/ocaml/site-lib/batteries/batteries.cma /home/rixed/ocalme/lib/ocaml/site-lib/batteries/batteriesThread.cma ./../bricabrac/bricabrac.cma ./../pfds/pfds.cma /home/rixed/ocalme/lib/ocaml/site-lib/bitstring/bitstring.cma /home/rixed/ocalme/lib/ocaml/site-lib/zip/zip.cma /home/rixed/ocalme/lib/ocaml/site-lib/parmap/parmap.cma serial.cmo txtInput.cmo binInput.cmo output.cmo datatype.cmo tuple2.cmo tuple3.cmo tuple4.cmo tuple5.cmo tuple6.cmo tuple7.cmo tuple8.cmo tuple9.cmo tuple10.cmo tuple11.cmo tuple12.cmo tuple16.cmo distribution.cmo aggregator.cmo dbfile.cmo table.cmo plot.cmo traffic.cmo libmlrrd.a
> 
> # Compile to bytecode
> $ make dns.cmo
> OCAMLPATH=./.. ocamlfind ocamlc -verbose -thread -rectypes -syntax camlp4o -package "batteries batteries.pa_string.syntax bricabrac pfds bitstring bitstring.syntax zip parmap"  -w Ael -g -annot -c dns.ml
> Effective set of preprocessor predicates: preprocessor,syntax,camlp4o
> Effective set of compiler predicates: pkg_unix,pkg_threads.posix,pkg_threads,pkg_num.core,pkg_num,pkg_bigarray,pkg_str,pkg_batteries,pkg_camlp4,pkg_estring,pkg_batteries.pa_string.syntax,pkg_bricabrac,pkg_pfds,pkg_bitstring,pkg_bitstring.syntax,pkg_zip,pkg_parmap,syntax,autolink,mt,mt_posix,byte
> + ocamlc.opt -verbose -rectypes -w Ael -g -annot -c -thread -I /home/rixed/ocalme/lib/ocaml/site-lib/num -I /home/rixed/ocalme/lib/ocaml/camlp4 -I /home/rixed/ocalme/lib/ocaml/site-lib/estring -I /home/rixed/ocalme/lib/ocaml/site-lib/batteries -I ./../bricabrac -I ./../pfds -I /home/rixed/ocalme/lib/ocaml/site-lib/bitstring -I /home/rixed/ocalme/lib/ocaml/site-lib/zip -I /home/rixed/ocalme/lib/ocaml/site-lib/parmap -pp "camlp4 '-I' '/home/rixed/ocalme/lib/ocaml/camlp4' '-I' '/home/rixed/ocalme/lib/ocaml/site-lib/estring' '-I' '/home/rixed/ocalme/lib/ocaml/site-lib/batteries' '-I' '/home/rixed/ocalme/lib/ocaml/site-lib/bitstring' '-parser' 'o' '-parser' 'op' '-printer' 'p' 'pa_estring.cmo' 'pa_strings.cma' 'unix.cma' 'bitstring.cma' 'bitstring_persistent.cma' 'pa_bitstring.cmo' " dns.ml
> + camlp4 '-I' '/home/rixed/ocalme/lib/ocaml/camlp4' '-I' '/home/rixed/ocalme/lib/ocaml/site-lib/estring' '-I' '/home/rixed/ocalme/lib/ocaml/site-lib/batteries' '-I' '/home/rixed/ocalme/lib/ocaml/site-lib/bitstring' '-parser' 'o' '-parser' 'op' '-printer' 'p' 'pa_estring.cmo' 'pa_strings.cma' 'unix.cma' 'bitstring.cma' 'bitstring_persistent.cma' 'pa_bitstring.cmo'  'dns.ml' > /tmp/camlpp6ff42e
> 
> # Link and fail
> $ make dns.byte
> OCAMLPATH=./.. ocamlfind ocamlc -verbose -thread -rectypes   -o dns.byte -syntax camlp4o -package "batteries batteries.pa_string.syntax bricabrac pfds bitstring bitstring.syntax zip parmap" mlrrd.cma   -linkpkg  -w Ael -g -annot libmlrrd.a dns.cmo
> Effective set of preprocessor predicates: preprocessor,syntax,camlp4o
> Effective set of compiler predicates: pkg_unix,pkg_threads.posix,pkg_threads,pkg_num.core,pkg_num,pkg_bigarray,pkg_str,pkg_batteries,pkg_camlp4,pkg_estring,pkg_batteries.pa_string.syntax,pkg_bricabrac,pkg_pfds,pkg_bitstring,pkg_bitstring.syntax,pkg_zip,pkg_parmap,syntax,autolink,mt,mt_posix,byte
> + ocamlc.opt -verbose -rectypes -o dns.byte -w Ael -g -annot -thread -I /home/rixed/ocalme/lib/ocaml/site-lib/num -I /home/rixed/ocalme/lib/ocaml/camlp4 -I /home/rixed/ocalme/lib/ocaml/site-lib/estring -I /home/rixed/ocalme/lib/ocaml/site-lib/batteries -I ./../bricabrac -I ./../pfds -I /home/rixed/ocalme/lib/ocaml/site-lib/bitstring -I /home/rixed/ocalme/lib/ocaml/site-lib/zip -I /home/rixed/ocalme/lib/ocaml/site-lib/parmap -pp "camlp4 '-I' '/home/rixed/ocalme/lib/ocaml/camlp4' '-I' '/home/rixed/ocalme/lib/ocaml/site-lib/estring' '-I' '/home/rixed/ocalme/lib/ocaml/site-lib/batteries' '-I' '/home/rixed/ocalme/lib/ocaml/site-lib/bitstring' '-parser' 'o' '-parser' 'op' '-printer' 'p' 'pa_estring.cmo' 'pa_strings.cma' 'unix.cma' 'bitstring.cma' 'bitstring_persistent.cma' 'pa_bitstring.cmo' " /home/rixed/ocalme/lib/ocaml/unix.cma /home/rixed/ocalme/lib/ocaml/threads/threads.cma /home/rixed/ocalme/lib/ocaml/nums.cma /home/rixed/ocalme/lib/ocaml/bigarray.cma /home/rixed/ocalme/lib/ocaml/str.cma /home/rixed/ocalme/lib/ocaml/site-lib/batteries/batteries.cma /home/rixed/ocalme/lib/ocaml/site-lib/batteries/batteriesThread.cma ./../bricabrac/bricabrac.cma ./../pfds/pfds.cma /home/rixed/ocalme/lib/ocaml/site-lib/bitstring/bitstring.cma /home/rixed/ocalme/lib/ocaml/site-lib/zip/zip.cma /home/rixed/ocalme/lib/ocaml/site-lib/parmap/parmap.cma mlrrd.cma libmlrrd.a dns.cmo
> + gcc -o 'dns.byte'   '-L/home/rixed/ocalme/lib/ocaml/site-lib/num' '-L/home/rixed/ocalme/lib/ocaml/camlp4' '-L/home/rixed/ocalme/lib/ocaml/site-lib/estring' '-L/home/rixed/ocalme/lib/ocaml/site-lib/batteries' '-L./../bricabrac' '-L./../pfds' '-L/home/rixed/ocalme/lib/ocaml/site-lib/bitstring' '-L/home/rixed/ocalme/lib/ocaml/site-lib/zip' '-L/home/rixed/ocalme/lib/ocaml/site-lib/parmap' '-L/home/rixed/ocalme/lib/ocaml/threads' '-L/home/rixed/ocalme/lib/ocaml' -L/usr/local/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr/local/lib '/tmp/camlprimfb3272.c' '-lcamlzip' '-lz' '-lbitstring' '-lthreads' '-lunix' '-lpthread' '-lunix' '-lcamlstr' '-lbigarray' '-lnums' '-lthreads' '-lunix' '-lpthread' '-lunix' 'libmlrrd.a' '-lcamlzip' '-lz' '-lbitstring' '-lthreads' '-lunix' '-lpthread' '-lunix' '-lcamlstr' '-lbigarray' '-lnums' '-lthreads' '-lunix' '-lpthread' '-lunix' 'libmlrrd.a' '-lcamlrun' -I'/home/rixed/ocalme/lib/ocaml' -lm  -ldl  -lpthread
> /tmp/ccyr5I06.o:(.data+0xdd0): undefined reference to `ml_marshal_to_bigarray'
> /tmp/ccyr5I06.o:(.data+0xdd8): undefined reference to `ml_unmarshal_from_bigarray'
> /tmp/ccyr5I06.o:(.data+0xde0): undefined reference to `ml_marshal_to_bigarray_buffer'
> /tmp/ccyr5I06.o:(.data+0xde8): undefined reference to `ml_blit_floatarray_to_bigarray'
> /tmp/ccyr5I06.o:(.data+0xdf0): undefined reference to `ml_blit_bigarray_to_floatarray'
> /tmp/ccyr5I06.o:(.data+0xdf8): undefined reference to `ml_blit_bigarray_to_string'
> /tmp/ccyr5I06.o:(.data+0xe00): undefined reference to `ml_blit_string_to_bigarray'
> /tmp/ccyr5I06.o:(.data+0xe08): undefined reference to `setcore'
> collect2: error: ld returned 1 exit status
> File "_none_", line 1, characters 0-1:
> Error: Error while building custom runtime system
> ocamlc.opt returned with exit code 2

These missing symbols are defined in libparmap_stubs.so. If I add -cclib -lparmap_stubs by hand, it works:

> $ OCAMLPATH=./.. ocamlfind ocamlc -verbose -thread -rectypes   -o dns.byte -syntax camlp4o -package "batteries batteries.pa_string.syntax bricabrac pfds bitstring bitstring.syntax zip parmap" mlrrd.cma   -linkpkg  -w Ael -g -annot libmlrrd.a dns.cmo -cclib -lparmap_stubs
> Effective set of preprocessor predicates: preprocessor,syntax,camlp4o
> Effective set of compiler predicates: pkg_unix,pkg_threads.posix,pkg_threads,pkg_num.core,pkg_num,pkg_bigarray,pkg_str,pkg_batteries,pkg_camlp4,pkg_estring,pkg_batteries.pa_string.syntax,pkg_bricabrac,pkg_pfds,pkg_bitstring,pkg_bitstring.syntax,pkg_zip,pkg_parmap,syntax,autolink,mt,mt_posix,byte
> + ocamlc.opt -verbose -rectypes -o dns.byte -w Ael -g -annot -thread -I /home/rixed/ocalme/lib/ocaml/site-lib/num -I /home/rixed/ocalme/lib/ocaml/camlp4 -I /home/rixed/ocalme/lib/ocaml/site-lib/estring -I /home/rixed/ocalme/lib/ocaml/site-lib/batteries -I ./../bricabrac -I ./../pfds -I /home/rixed/ocalme/lib/ocaml/site-lib/bitstring -I /home/rixed/ocalme/lib/ocaml/site-lib/zip -I /home/rixed/ocalme/lib/ocaml/site-lib/parmap -pp "camlp4 '-I' '/home/rixed/ocalme/lib/ocaml/camlp4' '-I' '/home/rixed/ocalme/lib/ocaml/site-lib/estring' '-I' '/home/rixed/ocalme/lib/ocaml/site-lib/batteries' '-I' '/home/rixed/ocalme/lib/ocaml/site-lib/bitstring' '-parser' 'o' '-parser' 'op' '-printer' 'p' 'pa_estring.cmo' 'pa_strings.cma' 'unix.cma' 'bitstring.cma' 'bitstring_persistent.cma' 'pa_bitstring.cmo' " /home/rixed/ocalme/lib/ocaml/unix.cma /home/rixed/ocalme/lib/ocaml/threads/threads.cma /home/rixed/ocalme/lib/ocaml/nums.cma /home/rixed/ocalme/lib/ocaml/bigarray.cma /home/rixed/ocalme/lib/ocaml/str.cma /home/rixed/ocalme/lib/ocaml/site-lib/batteries/batteries.cma /home/rixed/ocalme/lib/ocaml/site-lib/batteries/batteriesThread.cma ./../bricabrac/bricabrac.cma ./../pfds/pfds.cma /home/rixed/ocalme/lib/ocaml/site-lib/bitstring/bitstring.cma /home/rixed/ocalme/lib/ocaml/site-lib/zip/zip.cma /home/rixed/ocalme/lib/ocaml/site-lib/parmap/parmap.cma mlrrd.cma libmlrrd.a dns.cmo -cclib -lparmap_stubs
> + gcc -o 'dns.byte'   '-L/home/rixed/ocalme/lib/ocaml/site-lib/num' '-L/home/rixed/ocalme/lib/ocaml/camlp4' '-L/home/rixed/ocalme/lib/ocaml/site-lib/estring' '-L/home/rixed/ocalme/lib/ocaml/site-lib/batteries' '-L./../bricabrac' '-L./../pfds' '-L/home/rixed/ocalme/lib/ocaml/site-lib/bitstring' '-L/home/rixed/ocalme/lib/ocaml/site-lib/zip' '-L/home/rixed/ocalme/lib/ocaml/site-lib/parmap' '-L/home/rixed/ocalme/lib/ocaml/threads' '-L/home/rixed/ocalme/lib/ocaml' -L/usr/local/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr/local/lib '/tmp/camlprime23f47.c' '-lcamlzip' '-lz' '-lbitstring' '-lthreads' '-lunix' '-lpthread' '-lunix' '-lcamlstr' '-lbigarray' '-lnums' '-lthreads' '-lunix' '-lpthread' '-lunix' 'libmlrrd.a' '-lcamlzip' '-lz' '-lbitstring' '-lthreads' '-lunix' '-lpthread' '-lunix' '-lcamlstr' '-lbigarray' '-lnums' '-lthreads' '-lunix' '-lpthread' '-lunix' 'libmlrrd.a' '-lparmap_stubs' '-lcamlrun' -I'/home/rixed/ocalme/lib/ocaml' -lm  -ldl  -lpthread


For comparison, here is the last steps of the native compilation, which works:

> $ make dns.cmx
> OCAMLPATH=./.. ocamlfind ocamlopt -verbose -thread -rectypes -syntax camlp4o -package "batteries batteries.pa_string.syntax bricabrac pfds bitstring bitstring.syntax zip parmap"  -w Ael -g -annot -inline 50 -S -c dns.ml
> Effective set of preprocessor predicates: preprocessor,syntax,camlp4o
> Effective set of compiler predicates: pkg_unix,pkg_threads.posix,pkg_threads,pkg_num.core,pkg_num,pkg_bigarray,pkg_str,pkg_batteries,pkg_camlp4,pkg_estring,pkg_batteries.pa_string.syntax,pkg_bricabrac,pkg_pfds,pkg_bitstring,pkg_bitstring.syntax,pkg_zip,pkg_parmap,syntax,autolink,mt,mt_posix,native
> + ocamlopt.opt -verbose -rectypes -w Ael -g -annot -inline 50 -S -c -thread -I /home/rixed/ocalme/lib/ocaml/site-lib/num -I /home/rixed/ocalme/lib/ocaml/camlp4 -I /home/rixed/ocalme/lib/ocaml/site-lib/estring -I /home/rixed/ocalme/lib/ocaml/site-lib/batteries -I ./../bricabrac -I ./../pfds -I /home/rixed/ocalme/lib/ocaml/site-lib/bitstring -I /home/rixed/ocalme/lib/ocaml/site-lib/zip -I /home/rixed/ocalme/lib/ocaml/site-lib/parmap -pp "camlp4 '-I' '/home/rixed/ocalme/lib/ocaml/camlp4' '-I' '/home/rixed/ocalme/lib/ocaml/site-lib/estring' '-I' '/home/rixed/ocalme/lib/ocaml/site-lib/batteries' '-I' '/home/rixed/ocalme/lib/ocaml/site-lib/bitstring' '-parser' 'o' '-parser' 'op' '-printer' 'p' 'pa_estring.cmo' 'pa_strings.cma' 'unix.cma' 'bitstring.cma' 'bitstring_persistent.cma' 'pa_bitstring.cmo' " dns.ml
> + camlp4 '-I' '/home/rixed/ocalme/lib/ocaml/camlp4' '-I' '/home/rixed/ocalme/lib/ocaml/site-lib/estring' '-I' '/home/rixed/ocalme/lib/ocaml/site-lib/batteries' '-I' '/home/rixed/ocalme/lib/ocaml/site-lib/bitstring' '-parser' 'o' '-parser' 'op' '-printer' 'p' 'pa_estring.cmo' 'pa_strings.cma' 'unix.cma' 'bitstring.cma' 'bitstring_persistent.cma' 'pa_bitstring.cmo'  'dns.ml' > /tmp/camlpp39905b
> + as -o 'dns.o' 'dns.s'
> 
> $ make dns.opt
> OCAMLPATH=./.. ocamlfind ocamlopt -verbose -thread -rectypes -o dns.opt -syntax camlp4o -package "batteries batteries.pa_string.syntax bricabrac pfds bitstring bitstring.syntax zip parmap" mlrrd.cmxa  -linkpkg  -w Ael -g -annot -inline 50 -S libmlrrd.a dns.cmx
> Effective set of preprocessor predicates: preprocessor,syntax,camlp4o
> Effective set of compiler predicates: pkg_unix,pkg_threads.posix,pkg_threads,pkg_num.core,pkg_num,pkg_bigarray,pkg_str,pkg_batteries,pkg_camlp4,pkg_estring,pkg_batteries.pa_string.syntax,pkg_bricabrac,pkg_pfds,pkg_bitstring,pkg_bitstring.syntax,pkg_zip,pkg_parmap,syntax,autolink,mt,mt_posix,native
> + ocamlopt.opt -verbose -rectypes -o dns.opt -w Ael -g -annot -inline 50 -S -thread -I /home/rixed/ocalme/lib/ocaml/site-lib/num -I /home/rixed/ocalme/lib/ocaml/camlp4 -I /home/rixed/ocalme/lib/ocaml/site-lib/estring -I /home/rixed/ocalme/lib/ocaml/site-lib/batteries -I ./../bricabrac -I ./../pfds -I /home/rixed/ocalme/lib/ocaml/site-lib/bitstring -I /home/rixed/ocalme/lib/ocaml/site-lib/zip -I /home/rixed/ocalme/lib/ocaml/site-lib/parmap -pp "camlp4 '-I' '/home/rixed/ocalme/lib/ocaml/camlp4' '-I' '/home/rixed/ocalme/lib/ocaml/site-lib/estring' '-I' '/home/rixed/ocalme/lib/ocaml/site-lib/batteries' '-I' '/home/rixed/ocalme/lib/ocaml/site-lib/bitstring' '-parser' 'o' '-parser' 'op' '-printer' 'p' 'pa_estring.cmo' 'pa_strings.cma' 'unix.cma' 'bitstring.cma' 'bitstring_persistent.cma' 'pa_bitstring.cmo' " /home/rixed/ocalme/lib/ocaml/unix.cmxa /home/rixed/ocalme/lib/ocaml/threads/threads.cmxa /home/rixed/ocalme/lib/ocaml/nums.cmxa /home/rixed/ocalme/lib/ocaml/bigarray.cmxa /home/rixed/ocalme/lib/ocaml/str.cmxa /home/rixed/ocalme/lib/ocaml/site-lib/batteries/batteries.cmxa /home/rixed/ocalme/lib/ocaml/site-lib/batteries/batteriesThread.cmxa ./../bricabrac/bricabrac.cmxa ./../pfds/pfds.cmxa /home/rixed/ocalme/lib/ocaml/site-lib/bitstring/bitstring.cmxa /home/rixed/ocalme/lib/ocaml/site-lib/zip/zip.cmxa /home/rixed/ocalme/lib/ocaml/site-lib/parmap/parmap.cmxa mlrrd.cmxa libmlrrd.a dns.cmx
> + as -o '/tmp/camlstartupd8a412.o' '/tmp/camlstartup52b4ee.s'
> + gcc -o 'dns.opt'   '-L/home/rixed/ocalme/lib/ocaml/site-lib/num' '-L/home/rixed/ocalme/lib/ocaml/camlp4' '-L/home/rixed/ocalme/lib/ocaml/site-lib/estring' '-L/home/rixed/ocalme/lib/ocaml/site-lib/batteries' '-L./../bricabrac' '-L./../pfds' '-L/home/rixed/ocalme/lib/ocaml/site-lib/bitstring' '-L/home/rixed/ocalme/lib/ocaml/site-lib/zip' '-L/home/rixed/ocalme/lib/ocaml/site-lib/parmap' '-L/home/rixed/ocalme/lib/ocaml/threads' '-L/home/rixed/ocalme/lib/ocaml' -L/usr/local/lib -Wl,-rpath,/usr/local/lib '/tmp/camlstartupd8a412.o' '/home/rixed/ocalme/lib/ocaml/std_exit.o' 'dns.o' 'mlrrd.a' '/home/rixed/ocalme/lib/ocaml/site-lib/parmap/parmap.a' '/home/rixed/ocalme/lib/ocaml/site-lib/zip/zip.a' '/home/rixed/ocalme/lib/ocaml/site-lib/bitstring/bitstring.a' './../pfds/pfds.a' './../bricabrac/bricabrac.a' '/home/rixed/ocalme/lib/ocaml/site-lib/batteries/batteriesThread.a' '/home/rixed/ocalme/lib/ocaml/site-lib/batteries/batteries.a' '/home/rixed/ocalme/lib/ocaml/str.a' '/home/rixed/ocalme/lib/ocaml/bigarray.a' '/home/rixed/ocalme/lib/ocaml/nums.a' '/home/rixed/ocalme/lib/ocaml/threads/threads.a' '/home/rixed/ocalme/lib/ocaml/unix.a' '/home/rixed/ocalme/lib/ocaml/stdlib.a' 'libmlrrd.a' '-lparmap_stubs' '-lcamlzip' '-lz' '-lbitstring' '-lcamlstr' '-lbigarray' '-lnums' '-lthreadsnat' '-lpthread' '-lunix' 'libmlrrd.a' '/home/rixed/ocalme/lib/ocaml/libasmrun.a' -lm  -ldl

Any idea of what's missing from the ocamlfind invocation above so that parmap stubs is successively linked ?
Or maybe what's missing from the META file ? Or what I broke by adding my own C code ?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Compiler can't find a stub anymore
  2012-10-15 12:21 [Caml-list] Compiler can't find a stub anymore rixed
@ 2012-10-22  7:03 ` rixed
  2012-10-22  8:49   ` Gabriel Scherer
  0 siblings, 1 reply; 3+ messages in thread
From: rixed @ 2012-10-22  7:03 UTC (permalink / raw)
  To: caml-list

Answering my own question for my old days:
the problem was that parmap library was not compiled with -custom
while it's META file does not set any linkopts. I fixed it using
-custom since I find it easier, but I wonder what's the prefered
way to add these link flags between custom or linkopts?

BTW, I couldn't find where to add -custom in ocamlbuild. Hopefully
parmap wraps ocamlbuild into Makefile so I could work around it. Any doc
on how to add -custom flag?  I tried with -lflag but for some reason the
flag was also added to ocamlopt invocations.

Anyway, much ado about nothing as usual.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Compiler can't find a stub anymore
  2012-10-22  7:03 ` rixed
@ 2012-10-22  8:49   ` Gabriel Scherer
  0 siblings, 0 replies; 3+ messages in thread
From: Gabriel Scherer @ 2012-10-22  8:49 UTC (permalink / raw)
  To: rixed; +Cc: caml-list

ocamlbuild's `-documentation` option is useful for these kind of things.

$ ocamlbuild -documentation | grep custom
flag {. byte, custom, library, link, ocaml .} "-custom"
flag {. byte, custom, link, ocaml, program .} "-custom"

On Mon, Oct 22, 2012 at 9:03 AM,  <rixed@happyleptic.org> wrote:
> Answering my own question for my old days:
> the problem was that parmap library was not compiled with -custom
> while it's META file does not set any linkopts. I fixed it using
> -custom since I find it easier, but I wonder what's the prefered
> way to add these link flags between custom or linkopts?
>
> BTW, I couldn't find where to add -custom in ocamlbuild. Hopefully
> parmap wraps ocamlbuild into Makefile so I could work around it. Any doc
> on how to add -custom flag?  I tried with -lflag but for some reason the
> flag was also added to ocamlopt invocations.
>
> Anyway, much ado about nothing as usual.
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-10-22  8:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-15 12:21 [Caml-list] Compiler can't find a stub anymore rixed
2012-10-22  7:03 ` rixed
2012-10-22  8:49   ` Gabriel Scherer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).