From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.1 required=5.0 tests=AWL,DNS_FROM_RFC_POST, SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 2D15ABB84 for ; Wed, 28 Jan 2009 18:56:44 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvgBAHcrgEnRVdsVimdsb2JhbACMboZhPwEBAQoJDAcPBaosMIU1iEIBAwEDhUQGgzw X-IronPort-AV: E=Sophos;i="4.37,339,1231110000"; d="scan'208";a="22157215" Received: from mail-ew0-f21.google.com ([209.85.219.21]) by mail3-smtp-sop.national.inria.fr with ESMTP; 28 Jan 2009 18:56:14 +0100 Received: by ewy14 with SMTP id 14so4055940ewy.9 for ; Wed, 28 Jan 2009 09:56:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type:content-transfer-encoding; bh=JAGDwxxNCZwRcnWpm/63KhG6qZlIaLKg7kUAOf7wojE=; b=GgPzou/9udEzRu1Wwaz+jcDB2ZuGoXyP4Ajucx/zqp6WMBavI733kBOdjygPPEhLDg Vmmj+GxQ3/2v7AtwzFyrfA53zjd5pVVYoxtrRd9BDtXufXK/3rR5pb+1xjKtRTRGe0K6 3dua7PxsvJ0xOAqfUlHBjmcMly0sCUJg2bCEc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=nPMziIsGG3fg+SzUvozLxKiwEhO45bFVlBbIvk61aICPlzVlMi5ZKsN+Kp9KEUSemf krHzgrMqE8ZmXenLba3250dusBqAC69HkNd7jgGegXSqz04WLKLzeyUN1xOjmNPqwShD MLAEwcogItBJCg6Phi9FkMGm5RBBWrY9TbW7g= MIME-Version: 1.0 Sender: ematsen@gmail.com Received: by 10.67.95.1 with SMTP id x1mr3012726ugl.17.1233165373575; Wed, 28 Jan 2009 09:56:13 -0800 (PST) In-Reply-To: <20090128173305.GJ25469@NANA.localdomain> References: <243054520901272248k31b0a68fs2130dd84f1278dbd@mail.gmail.com> <49800728.9070200@glondu.net> <243054520901280917i24c079e5nd36455403ee0fc81@mail.gmail.com> <20090128173305.GJ25469@NANA.localdomain> Date: Wed, 28 Jan 2009 09:56:13 -0800 X-Google-Sender-Auth: 40916438cfc561ac Message-ID: <243054520901280956i258ce362qc684509ceaac1d52@mail.gmail.com> Subject: Re: [Caml-list] problem with LACAML and static linking From: Erick Matsen To: caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; lacaml:01 ocamlopt:01 ocaml:01 ocaml:01 usr:01 lib:01 pcre:01 usr:01 lib:01 gsl:01 lacaml:01 gcc:01 -static:01 -cclib:01 gcc:01 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 wrote: > On Wed, Jan 28, 2009 at 09:17:56AM -0800, Erick Matsen wrote: >> Here is my compile line >> >> ocamlopt \ >> >> # source directories: >> -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/ \ >> >> # cc directives >> -ccopt -static -ccopt -lgfortran -ccopt > > I think you need -cclib here (just did s/cclib/ccopt/ with some code of mine > and got undefined refs...). > > -- > Mauricio Fernandez - http://eigenclass.org > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >