From owner-freebsd-ports@FreeBSD.ORG Thu Feb 3 12:57:08 2011 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAF3D1065670 for ; Thu, 3 Feb 2011 12:57:08 +0000 (UTC) (envelope-from thierry@FreeBSD.org) Received: from smtpfb2-g21.free.fr (smtpfb2-g21.free.fr [212.27.42.10]) by mx1.freebsd.org (Postfix) with ESMTP id 824FD8FC0A for ; Thu, 3 Feb 2011 12:57:06 +0000 (UTC) Received: from smtp5-g21.free.fr (smtp5-g21.free.fr [212.27.42.5]) by smtpfb2-g21.free.fr (Postfix) with ESMTP id AE386CA8897 for ; Thu, 3 Feb 2011 13:41:22 +0100 (CET) Received: from graf.pompo.net (unknown [78.225.128.39]) by smtp5-g21.free.fr (Postfix) with ESMTP id 27E6FD48179; Thu, 3 Feb 2011 13:41:13 +0100 (CET) Received: by graf.pompo.net (Postfix, from userid 80) id 7995D1148E; Thu, 3 Feb 2011 13:35:57 +0100 (CET) Received: from 192.54.193.27 ([192.54.193.27]) by graf.pompo.net (Horde Framework) with HTTP; Thu, 03 Feb 2011 13:35:57 +0100 Message-ID: <20110203133557.33003e7j1xacsls0@graf.pompo.net> X-Priority: 3 (Normal) Date: Thu, 03 Feb 2011 13:35:57 +0100 From: thierry@FreeBSD.org To: Rainer Hurling References: <4D49C48A.7080604@gwdg.de> <20110202212907.GC29365@graf.pompo.net> <4D4A9559.2010502@gwdg.de> In-Reply-To: <4D4A9559.2010502@gwdg.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.3.9) / FreeBSD-8.1 X-Originating-IP: 192.54.193.27 X-Remote-Browser: Mozilla/5.0 (Windows; U; Windows NT 5.0; fr; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 Cc: freebsd-ports@freebsd.org Subject: Re: net/mpich2: libraries with many 'undefined symbols' X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Feb 2011 12:57:08 -0000 Selon Rainer Hurling le jeu 3 f=E9v 12:45:29 2011 : >> These symbols belong to libmpl: >> >> nm -A /usr/local/lib/libmpl.a | grep MPL_ >> >> So you have to link with -lmpl (and maybe with -lopa too). > > I think I do understand this for software which uses MPICH2. > > With your suggestion I am able to build math/R package 'Rmpi' =20 > without errors any more and to install it. For this I only had to =20 > extend the configure script of the R package: > > -PKG_LIBS=3D"-L${MPI_LIBPATH} -lmpich ${MPI_LIBS}" > +PKG_LIBS=3D"-L${MPI_LIBPATH} -lmpich -lmpl -lopa ${MPI_LIBS}" Great! > Sorry for my ignorance: > Is it ok to have symbols like MPL_trfree, MPI_F_STATUS_IGNORE and =20 > others 'undefined' within libmpich? I think so: this is a design choice (by the authors). > Why are there symbol names visible in libmpich.a, but not in =20 > libmpich.so.2.0? Is this intended? No, the static libraries and the shared ones are identical. If you =20 link statically, you also need libmpl.a >> Another solution could be to link with mpicc and friends instead of >> gcc/g++/gfortran, as these wrappers set the correct flags and link to >> the correct libraries as required. > > Yes. I know of mpicc, mpic++, mpicxx and others. I tried to use them =20 > in my experimental port math/sprng, but it seems a little bit tricky. > >> Yet another solution could be to configure mpich2 with >> --enable-lib-depend, but this is experimental... >> >> BTW, a new version has been released, and I have plan to upgrade it >> after the ports thaw. > > Nice, looking forward to it. The new release installs more pkgconfig (.pc) files, thus it should =20 become easier to guess the correct flags and libs. Regards, --=20 Th. Thomas.