net/mpich2: libraries with many 'undefined symbols'

Thierry Thomas thierry at
Wed Feb 2 21:52:11 UTC 2011

Le mer  2 fév 11 à 21:54:34 +0100, Rainer Hurling <rhurlin at>
 écrivait :
> Dear list,


> 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 (after building net/mpich2), it shows many 
> undefined symbols (symbol names are stripped in installed version?):
> nm work/mpich2-1.3/lib/ | 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).

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.

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.

Th. Thomas.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url :

More information about the freebsd-ports mailing list