<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2009/01/731676cde43a1a70d1d54d29d64a611b"
  from="Erick Matsen &lt;matsen@b...&gt;"
  author="Erick Matsen"
  date="2009-01-28T17:56:45"
  subject="Re: [Caml-list] problem with LACAML and static linking"
  prev="2009/01/21c5dae0340317f4d8d323daab9ab10d"
  next="2009/01/4e3033b888ae0f626c14906f241d690a"
  prev-in-thread="2009/01/21c5dae0340317f4d8d323daab9ab10d"
  next-in-thread="2009/01/ef7464a63d1602015e62b2b986211645"
  prev-thread="2009/01/b8fa82634e54fd25d86aeafd55576128"
  next-thread="2009/01/ec5abc48403b5e7647c7a58e6fcf15a5"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="problem with LACAML and static linking">
<msg 
  url="2009/01/95edc08cfde6a09340c5e2f438aca25e"
  from="Erick Matsen &lt;matsen@b...&gt;"
  author="Erick Matsen"
  date="2009-01-28T06:49:03"
  subject="problem with LACAML and static linking">
<msg 
  url="2009/01/629bad2163d83f85195ba2ca7450d001"
  from="Stéphane Glondu &lt;steph@g...&gt;"
  author="Stéphane Glondu"
  date="2009-01-28T07:20:12"
  subject="Re: [Caml-list] problem with LACAML and static linking">
<msg 
  url="2009/01/89d408b4f65d61f9f259798dd86cc8d5"
  from="Erick Matsen &lt;matsen@b...&gt;"
  author="Erick Matsen"
  date="2009-01-28T17:17:58"
  subject="Re: [Caml-list] problem with LACAML and static linking">
<msg 
  url="2009/01/21c5dae0340317f4d8d323daab9ab10d"
  from="Mauricio Fernandez &lt;mfp@a...&gt;"
  author="Mauricio Fernandez"
  date="2009-01-28T17:33:08"
  subject="Re: [Caml-list] problem with LACAML and static linking">
<msg 
  url="2009/01/731676cde43a1a70d1d54d29d64a611b"
  from="Erick Matsen &lt;matsen@b...&gt;"
  author="Erick Matsen"
  date="2009-01-28T17:56:45"
  subject="Re: [Caml-list] problem with LACAML and static linking">
<msg 
  url="2009/01/ef7464a63d1602015e62b2b986211645"
  from="Stéphane Glondu &lt;steph@g...&gt;"
  author="Stéphane Glondu"
  date="2009-01-28T18:48:24"
  subject="Re: [Caml-list] problem with LACAML and static linking">
<msg 
  url="2009/01/23eff6dc2f708df8e37f8b10ecd02bea"
  from="Erick Matsen &lt;matsen@b...&gt;"
  author="Erick Matsen"
  date="2009-01-28T18:50:30"
  subject="Re: [Caml-list] problem with LACAML and static linking">
<msg 
  url="2009/01/f30610f04f7b4db807127d0a6d946705"
  from="Stéphane Glondu &lt;steph@g...&gt;"
  author="Stéphane Glondu"
  date="2009-01-28T19:04:51"
  subject="Re: [Caml-list] problem with LACAML and static linking">
<msg 
  url="2009/01/5e0126ed6559a49ca434e3c15b0b63c1"
  from="Markus Mottl &lt;markus.mottl@g...&gt;"
  author="Markus Mottl"
  date="2009-01-28T19:24:45"
  subject="Re: [Caml-list] problem with LACAML and static linking">
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
</thread>

<contents>
Hello Mauricio---


Is this what you mean?


ocamlopt \
    -I /home/matsen/ocaml/bio/ -I /home/matsen/ocaml/common/  -I
/usr/lib/ocaml/3.10.2/pcre/ -I /usr/lib/ocaml/3.10.2/glpk/ -I
/usr/lib/ocaml/3.10.2/gsl/ -I /usr/lib/ocaml/3.10.2/lacaml/ -I
/usr/lib/gcc/i486-linux-gnu/4.3/ \
    -ccopt -static \

#HERE...
    -cclib /usr/lib/gcc/i486-linux-gnu/4.3/libgfortran.a    \

    -ccopt -L/home/matsen/ocaml/bio/ -ccopt
-L/home/matsen/ocaml/common/ -ccopt -L/usr/lib/ocaml/3.10.2/pcre/
-ccopt -L/usr/lib/ocaml/3.10.2/glpk/ -ccopt
-L/usr/lib/ocaml/3.10.2/gsl/ -ccopt -L/usr/lib/ocaml/3.10.2/lacaml/
-ccopt -L/usr/lib/gcc/i486-linux-gnu/4.3/    pcre.cmxa bigarray.cmxa
unix.cmxa gsl.cmxa lacaml.cmxa   -o placer \
    /home/matsen/ocaml/common/common_base.cmx
/home/matsen/ocaml/bio/biobase.cmx base.cmx minimization.cmx
integration.cmx /home/matsen/ocaml/bio/liketree.cmx liketreeFuns.cmx
/home/matsen/ocaml/common/number.cmx /home/matsen/ocaml/common/mat.cmx
/home/matsen/ocaml/bio/diagd.cmx /home/matsen/ocaml/bio/qtree.cmx
/home/matsen/ocaml/bio/protModels.cmx
/home/matsen/ocaml/bio/alignment.cmx
/home/matsen/ocaml/bio/alignmentLike.cmx placerFuns.cmx placer.cmx


That gives

/usr/lib/libblas.a(xerbla.o): In function `xerbla_':
(.text+0x0): multiple definition of `xerbla_'
/usr/lib/liblapack.a(xerbla.o):(.text+0x0): first defined here
/usr/lib/ocaml/3.10.2/libasmrun.a(unix.o): In function `caml_dlopen':
(.text+0x223): warning: Using 'dlopen' in statically linked
applications requires at runtime the shared libraries from the glibc
version used for linking
/usr/lib/ocaml/3.10.2/libunix.a(getgr.o): In function `unix_getgrgid':
... similar messages ....

so BLAS and gfortran both define xerbla. Hm... but progress!


Thanks,

Erick


On Wed, Jan 28, 2009 at 9:33 AM, Mauricio Fernandez &lt;mfp@acm.org&gt; wrote:
&gt; On Wed, Jan 28, 2009 at 09:17:56AM -0800, Erick Matsen wrote:
&gt;&gt; Here is my compile line
&gt;&gt;
&gt;&gt; ocamlopt \
&gt;&gt;
&gt;&gt; # source directories:
&gt;&gt;     -I /home/matsen/ocaml/bio/ -I /home/matsen/ocaml/common/  -I
&gt;&gt; /usr/lib/ocaml/3.10.2/pcre/ -I /usr/lib/ocaml/3.10.2/glpk/ -I
&gt;&gt; /usr/lib/ocaml/3.10.2/gsl/ -I /usr/lib/ocaml/3.10.2/lacaml/ -I
&gt;&gt; /usr/lib/gcc/i486-linux-gnu/4.3/ \
&gt;&gt;
&gt;&gt; # cc directives
&gt;&gt;     -ccopt -static  -ccopt -lgfortran    -ccopt
&gt;
&gt; I think you need -cclib here (just did s/cclib/ccopt/ with some code of mine
&gt; and got undefined refs...).
&gt;
&gt; --
&gt; Mauricio Fernandez  -   http://eigenclass.org
&gt;
&gt; _______________________________________________
&gt; Caml-list mailing list. Subscription management:
&gt; http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
&gt; Archives: http://caml.inria.fr
&gt; Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
&gt; Bug reports: http://caml.inria.fr/bin/caml-bugs
&gt;

</contents>

</message>

