Version française
Home     About     Download     Resources     Contact us    
Browse thread
ocamlfind and linking with -g for stack backtrace
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Joel Reymont <joelr1@g...>
Subject: Re: [Caml-list] ocamlfind and linking with -g for stack backtrace
It's still not working, even with "-ccopt -g". There's -g all over  
the place but I'm still not getting a backtrace.

make clean
rm -f *.cmi *.cmo *.cmx *.o
rm -f test_acceptor easy_daemon easy_reactor easy_engine easy_engine.opt
rm -f proxy_engine proxy_engine.opt file_reactor file_mt_reactor
rm -f file_mt_reactor.opt file_engine netplex

make netplex
ocamlfind ocamlc -verbose -ccopt -g -g -o netplex -package  
"netstring,netcgi2,unix,nethttpd-for-netcgi2,netplex" \
         -thread netplex.ml -linkpkg -g
Effective set of compiler predicates:  
pkg_unix,pkg_threads.posix,pkg_threads,pkg_pcre,pkg_netsys,pkg_netstring 
,pkg_netcgi2,pkg_equeue,pkg_rpc,pkg_netplex,pkg_nethttpd-for- 
netcgi2,autolink,mt,mt_posix,byte
+ ocamlc.opt -verbose -ccopt -g -g -o netplex -g -thread -I /usr/ 
local/lib/ocaml/site-lib/pcre -ccopt -I/usr/local/lib/ocaml/site-lib/ 
pcre -I /usr/local/lib/ocaml/site-lib/netsys -ccopt -I/usr/local/lib/ 
ocaml/site-lib/netsys -I /usr/local/lib/ocaml/site-lib/netstring - 
ccopt -I/usr/local/lib/ocaml/site-lib/netstring -I /usr/local/lib/ 
ocaml/site-lib/netcgi2 -ccopt -I/usr/local/lib/ocaml/site-lib/netcgi2  
-I /usr/local/lib/ocaml/site-lib/equeue -ccopt -I/usr/local/lib/ocaml/ 
site-lib/equeue -I /usr/local/lib/ocaml/site-lib/rpc -ccopt -I/usr/ 
local/lib/ocaml/site-lib/rpc -I /usr/local/lib/ocaml/site-lib/netplex  
-ccopt -I/usr/local/lib/ocaml/site-lib/netplex -I /usr/local/lib/ 
ocaml/site-lib/nethttpd-for-netcgi2 -ccopt -I/usr/local/lib/ocaml/ 
site-lib/nethttpd-for-netcgi2 -ccopt -L/usr/local/lib/ocaml/site-lib/ 
pcre -ccopt -L/usr/local/lib/ocaml/site-lib/netsys -ccopt -L/usr/ 
local/lib/ocaml/site-lib/netstring -ccopt -L/usr/local/lib/ocaml/site- 
lib/netcgi2 -ccopt -L/usr/local/lib/ocaml/site-lib/equeue -ccopt -L/ 
usr/local/lib/ocaml/site-lib/rpc -ccopt -L/usr/local/lib/ocaml/site- 
lib/netplex -ccopt -L/usr/local/lib/ocaml/site-lib/nethttpd-for- 
netcgi2 /usr/local/lib/ocaml/unix.cma /usr/local/lib/ocaml/threads/ 
threads.cma /usr/local/lib/ocaml/site-lib/pcre/pcre.cma /usr/local/ 
lib/ocaml/site-lib/netsys/netsys.cma /usr/local/lib/ocaml/site-lib/ 
netstring/netstring.cma /usr/local/lib/ocaml/site-lib/netstring/ 
netstring_mt.cmo /usr/local/lib/ocaml/site-lib/netstring/ 
netaccel.cma /usr/local/lib/ocaml/site-lib/netstring/ 
netaccel_link.cmo /usr/local/lib/ocaml/site-lib/netcgi2/netcgi.cma / 
usr/local/lib/ocaml/site-lib/equeue/equeue.cma /usr/local/lib/ocaml/ 
site-lib/equeue/unixqueue_mt.cmo /usr/local/lib/ocaml/site-lib/rpc/ 
rpc.cma /usr/local/lib/ocaml/site-lib/netplex/netplex.cma /usr/local/ 
lib/ocaml/site-lib/netplex/netplex_mt.cmo /usr/local/lib/ocaml/site- 
lib/nethttpd-for-netcgi2/nethttpd-for-netcgi2.cma netplex.ml

+ gcc  -o 'netplex' -I'/usr/local/lib/ocaml' -g -I/usr/local/lib/ 
ocaml/site-lib/pcre -I/usr/local/lib/ocaml/site-lib/netsys -I/usr/ 
local/lib/ocaml/site-lib/netstring -I/usr/local/lib/ocaml/site-lib/ 
netcgi2 -I/usr/local/lib/ocaml/site-lib/equeue -I/usr/local/lib/ocaml/ 
site-lib/rpc -I/usr/local/lib/ocaml/site-lib/netplex -I/usr/local/lib/ 
ocaml/site-lib/nethttpd-for-netcgi2 -L/usr/local/lib/ocaml/site-lib/ 
pcre -L/usr/local/lib/ocaml/site-lib/netsys -L/usr/local/lib/ocaml/ 
site-lib/netstring -L/usr/local/lib/ocaml/site-lib/netcgi2 -L/usr/ 
local/lib/ocaml/site-lib/equeue -L/usr/local/lib/ocaml/site-lib/rpc - 
L/usr/local/lib/ocaml/site-lib/netplex -L/usr/local/lib/ocaml/site- 
lib/nethttpd-for-netcgi2 -g -I/usr/local/lib/ocaml/site-lib/pcre -I/ 
usr/local/lib/ocaml/camlp4 -g -I/usr/local/lib/ocaml/site-lib/pcre -I/ 
usr/local/lib/ocaml/camlp4 -g -I/usr/local/lib/ocaml/site-lib/pcre -g  
-I/usr/local/lib/ocaml/site-lib/pcre -g -I/usr/local/lib/ocaml/site- 
lib/pcre -g -I/usr/local/lib/ocaml/site-lib/pcre -I/usr/local/lib/ 
ocaml/camlp4 /tmp/camlprim9bec2b.c  '-L/usr/local/lib/ocaml/site-lib/ 
pcre' '-L/usr/local/lib/ocaml/site-lib/netsys' '-L/usr/local/lib/ 
ocaml/site-lib/netstring' '-L/usr/local/lib/ocaml/site-lib/netcgi2' '- 
L/usr/local/lib/ocaml/site-lib/equeue' '-L/usr/local/lib/ocaml/site- 
lib/rpc' '-L/usr/local/lib/ocaml/site-lib/netplex' '-L/usr/local/lib/ 
ocaml/site-lib/nethttpd-for-netcgi2' '-L/usr/local/lib/ocaml/threads'  
'-L/usr/local/lib/ocaml' '-lnetaccel_c' '-lnetsys' '-lpcre_stubs' '- 
lpcre' '-lthreads' '-lpthread' '-lunix' -lcamlrun    -lcurses -lpthread

./netplex -conf netplex.cfg
[...]
(Program not linked with -g, cannot print stack backtrace)

--
http://wagerlabs.com/