(Almost) Original build:
swig -ocaml -co swig.mli
ocamlc.opt -verbose -annot -c swig.mli
ocamlc.opt -verbose -annot -c gv.mli
ocamlc.opt -verbose -annot -c gv.ml
File "gv.ml", line 549, characters 13-14:
Warning U: this match case is unused.
swig -ocaml -co swig.ml
ocamlc.opt -verbose -annot -c swig.ml
File "swig.ml", line 159, characters 54-57:
Warning X: this argument will not be used by the function.
ocamlc.opt -verbose -annot -a -dllib dllgv.so -custom -o gv.cma swig.cmo gv.cmo
ocamlopt.opt -verbose -annot -c gv.ml
File "gv.ml", line 549, characters 13-14:
Warning U: this match case is unused.
+ as -arch ppc -o 'gv.o' '/tmp/camlasm880842.s'
ocamlopt.opt -verbose -annot -a -o gv.cmxa
+ ar rc 'gv.a'
ar: no archive members specified
usage: ar -d [-TLsv] archive file ...
ar -m [-TLsv] archive file ...
ar -m [-abiTLsv] position archive file ...
ar -p [-TLsv] archive [file ...]
ar -q [-cTLsv] archive file ...
ar -r [-cuTLsv] archive file ...
ar -r [-abciuTLsv] position archive file ...
ar -t [-TLsv] archive [file ...]
ar -x [-ouTLsv] archive [file ...]
File "_none_", line 1, characters 0-1:
Error: Error while creating the library gv.a
make[4]: *** [gv.cmxa] Error 2
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
-----------------------------------------
Now with corrections applied:
swig -ocaml -co swig.mli
ocamlc.opt -verbose -annot -c swig.mli
ocamlc.opt -verbose -annot -c gv.mli
ocamlc.opt -verbose -annot -c gv.ml
File "gv.ml", line 549, characters 13-14:
Warning U: this match case is unused.
swig -ocaml -co swig.ml
ocamlc.opt -verbose -annot -c swig.ml
File "swig.ml", line 159, characters 54-57:
Warning X: this argument will not be used by the function.
ocamlc.opt -verbose -annot -a -dllib dllgv.so -custom -o gv.cma swig.cmo gv.cmo
ocamlopt.opt -verbose -annot -c gv.ml
File "gv.ml", line 549, characters 13-14:
Warning U: this match case is unused.
+ as -arch ppc -o 'gv.o' '/tmp/camlasm14fe9d.s'
ocamlopt.opt -verbose -annot -a -o gv.cmxa gv.cmx
+ ar rc 'gv.a' 'gv.o'
+ ranlib 'gv.a'
sh ../../tclpkg/mkpkgindex.sh libgv_tcl.la gv 0
echo "# end" >end
cat tcldot/pkgIndex.tcl tclpathplan/pkgIndex.tcl gdtclft/pkgIndex.tcl gv/pkgIndex.tcl tkspline/pkgIndex.tcl end >pkgIndex.tcl
rm -f end
Making all in doc
Making all in info
#######################################
The reasons are described in this recommended change from (line #2513ff):
gv.cmx: gv.ml gv.cma
ocamlopt -c gv.ml
gv.cmxa: gv.cma
ocamlopt -a -o gv.cmxa
gv.a: gv.cmxa
$(PERL_data): gv_perl.cpp
to:
gv.cmx: gv.ml gv.cma
ocamlopt -c gv.ml
gv.cmxa: gv.cmx # target dependency corrected
ocamlopt -a -o gv.cmxa gv.cmx # archive member added
gv.a: gv.cmxa
$(PERL_data): gv_perl.cpp
Comments:
What is the reason that the .opt versions of the Ocaml tools neither are detected nor get used?
[ellson] Your suggested change has been applied to CVS head sources.
> Comments: What is the reason that the .opt versions of the Ocaml tools neither are detected nor get used?
I've no idea what the .opt versions are? My testing is primarily on recent Fedora's where ocaml is from rpms.
Please provide more patches if you feel this code can be improved.
[Peter] I have no exact idea, except that the .opt versions, in case they exist, take some more time to compile the file that the code becomes native to the architecture and executes faster. This is documented in the Ocaml manual (for example ocaml-3.11-refman.pdf, Chapter 11 ...).
Fix:
--- graphviz-2.20.3/tclpkg/gv/Makefile.in 2009-02-28 13:23:31.000000000 +0100
+++ graphviz-2.20.3-corrected/tclpkg/gv/Makefile.in 2009-02-28 13:25:02.000000000 +0100
@@ -2512,8 +2512,8 @@
ocamlc -a -dllib dllgv.so -custom -o gv.cma swig.cmo gv.cmo
gv.cmx: gv.ml gv.cma
ocamlopt -c gv.ml
-gv.cmxa: gv.cma
- ocamlopt -a -o gv.cmxa
+gv.cmxa: gv.cmx
+ ocamlopt -a -o gv.cmxa gv.cmx
gv.a: gv.cmxa
$(PERL_data): gv_perl.cpp
gv_perl.cpp: gv.i