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 mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 95F63BB84 for ; Thu, 29 Jan 2009 19:51:23 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: As8BAGKJgUnRVcbjjWdsb2JhbACTVj8BAQEBCQkKCQ8FqnAwhHmIQgEDAQOEDQaDRA X-IronPort-AV: E=Sophos;i="4.37,345,1231110000"; d="scan'208";a="23279878" Received: from rv-out-0506.google.com ([209.85.198.227]) by mail1-smtp-roc.national.inria.fr with ESMTP; 29 Jan 2009 19:51:22 +0100 Received: by rv-out-0506.google.com with SMTP id k40so71338rvb.57 for ; Thu, 29 Jan 2009 10:51:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=JyvhkZj0a/Lu8x5QofA/TdEgIqf7I3Hs3SBQAniIiiY=; b=HMoBbGs9KXGCOCZfl+cvl1oD/61RyQu1bBCrfheOdpALAWbMHi1Yz2vkX9jxIq/LG6 9zT4MyD6dsctp3f5KFejUwIR071DbsN989qwTbNftzDKbjgtDfA0sms3Ko1UJFHX+1OZ cNoRqLksbuupd8pR0JmWGPcKpxYHMaHBpbKjQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; b=Le5aI3E5fF0uZtYjlObu8p07tno/aquTq3im26qOpxQxJfWivyqK7b8BB2yeHEcpD/ X+tUkDAgSakXKCdvOrbBvpPUkH188pkBMsL/LmqDleYa/gXDTHDChNyqA+E2VkNo3GIu TBz9Pp4YIBrcqqqtTTi/heklkweL0DdCSRHTU= MIME-Version: 1.0 Sender: ematsen@gmail.com Received: by 10.141.20.6 with SMTP id x6mr152377rvi.159.1233255081711; Thu, 29 Jan 2009 10:51:21 -0800 (PST) Date: Thu, 29 Jan 2009 10:51:21 -0800 X-Google-Sender-Auth: 2d37d4f83a8c46f3 Message-ID: <243054520901291051o45c9120er88b10e1a9f5fe90c@mail.gmail.com> Subject: RESOLVED: problem with LACAML and static linking From: Erick Matsen To: Markus Mottl Cc: =?ISO-8859-1?Q?St=E9phane_Glondu?= , caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; lacaml:01 mottl:01 compilation:01 lapack:01 usr:01 lib:01 usr:01 lib:01 -noautolink:01 -verbose:01 ocaml:01 ocaml:01 compilation:01 ocamlopt:01 pcre:01 Thank you to Mauricio Fernandez, St\'{e}phane Glondu, and Makus Mottl for helping me with this problem. Review of problem: When doing static compilation using LAPACK, encountering the following error: /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 Solution: Copying a version of liblapack.a to my home directory and removing the offending symbol using ar, then using -noautolink to use the local version. I found the necessary libraries using -verbose. [complex:~/placer/ocaml]$ cp `locate liblapack.a` . [complex:~/placer/ocaml]$ ar t liblapack.a | grep xerbla.o xerbla.o [complex:~/placer/ocaml]$ ar d liblapack.a xerbla.o [complex:~/placer/ocaml]$ ar t liblapack.a | grep xerbla.o [complex:~/placer/ocaml]$ The compilation command: 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/gsl/ -I /usr/lib/ocaml/3.10.2/lacaml/ \ -noautolink \ -ccopt -static \ -cclib /usr/lib/ocaml/3.10.2/lacaml/liblacaml_stubs.a \ -cclib /home/matsen/placer/ocaml/liblapack.a \ -cclib /home/matsen/placer/ocaml/libblas.a \ -cclib /usr/lib/ocaml/3.10.2/gsl/libmlgsl.a \ -cclib /usr/lib/libgsl.a \ -cclib /usr/lib/libgslcblas.a \ -cclib /usr/lib/ocaml/3.10.2/libunix.a \ -cclib /usr/lib/ocaml/3.10.2/libbigarray.a \ -cclib /usr/lib/ocaml/3.10.2/pcre/libpcre_stubs.a \ -cclib /usr/lib/libpcre.a \ -cclib /usr/lib/gcc/i486-linux-gnu/4.3/libgfortran.a \ -cclib /usr/lib/ocaml/3.10.2/libasmrun.a \ -cclib /usr/lib/libm.a \ -cclib /usr/lib/libdl.a \ -cclib -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/ 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