From owner-freebsd-ports@FreeBSD.ORG Thu Feb 3 11:45:34 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 53FC7106566B for ; Thu, 3 Feb 2011 11:45:34 +0000 (UTC) (envelope-from rhurlin@gwdg.de) Received: from amailer.gwdg.de (amailer.gwdg.de [134.76.10.18]) by mx1.freebsd.org (Postfix) with ESMTP id DB17F8FC0A for ; Thu, 3 Feb 2011 11:45:33 +0000 (UTC) Received: from wald.nfv.gwdg.de ([134.76.242.31] helo=pc028.nfv) by mailer.gwdg.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1Pkxcy-00014f-7g for freebsd-ports@freebsd.org; Thu, 03 Feb 2011 12:45:32 +0100 Message-ID: <4D4A9559.2010502@gwdg.de> Date: Thu, 03 Feb 2011 12:45:29 +0100 From: Rainer Hurling User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; de-DE; rv:1.9.2.13) Gecko/20101221 Thunderbird/3.1.7 MIME-Version: 1.0 To: freebsd-ports@freebsd.org References: <4D49C48A.7080604@gwdg.de> <20110202212907.GC29365@graf.pompo.net> In-Reply-To: <20110202212907.GC29365@graf.pompo.net> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-Authenticated: Id:rhurlin X-Spam-Level: - X-Virus-Scanned: (clean) by exiscan+sophie 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 11:45:34 -0000 Thanks for answering. Am 02.02.2011 22:29 (UTC+1) schrieb Thierry Thomas: > Le mer 2 fév 11 à 21:54:34 +0100, Rainer Hurling > écrivait : >> Dear list, > > Hello, > >> since there is no maintainer for net/mpich2 I am writing directly to the >> list. Hope this is ok. >> >> I need MPICH2 for math/R (package Rmpi) and others (e.g. upcoming new >> package math/sprng, PR 154249). Software using MPICH2 complains about >> 'undefined symbols' like 'MPL_trfree'. >> >> Looking into libmpich.so.2.0 (after building net/mpich2), it shows many >> undefined symbols (symbol names are stripped in installed version?): >> >> nm work/mpich2-1.3/lib/libmpich.so.2.0 | grep " U " >> U MPL_TrSetMaxMem >> U MPL_env2bool >> U MPL_env2int >> U MPL_env2range >> U MPL_env2str >> U MPL_trDebugLevel >> U MPL_trcalloc >> U MPL_trdump >> U MPL_trfree >> U MPL_trid >> ... > > 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' without errors any more and to install it. For this I only had to extend the configure script of the R package: -PKG_LIBS="-L${MPI_LIBPATH} -lmpich ${MPI_LIBS}" +PKG_LIBS="-L${MPI_LIBPATH} -lmpich -lmpl -lopa ${MPI_LIBS}" Sorry for my ignorance: Is it ok to have symbols like MPL_trfree, MPI_F_STATUS_IGNORE and others 'undefined' within libmpich? Why are there symbol names visible in libmpich.a, but not in libmpich.so.2.0? Is this intended? > 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 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. > Regards, Thanks again, Rainer Hurling