Brian,
    Below is the response I got from the fink developer
who was trying to package paraview and ran into this
problem with the undefined environ symbol in openmpi.
I have also emailed on darwin-dev to get a clarification
on this issue. However your argument against target
specific chances is rather ironic considering openmpi
already has wrappers for Windows on those lines of code.
I've attached the error that is seen while compiling paraview. 
                     Jack

-----------------------------------------------------------------------

I tried several patches to the paraview build scripts in order to get
rid of this undefined symbol, but I was not successful, one reason being
that the build process uses cmake which I find much less transparent
than the usual configure/libtool combination.

While looking through the build script, I see now that in fact there is
a difference between the linker command for this library
libicet_mpi.dylib and many other dylibs built in paraview, for example
libvtkParallel.pv2.6.dylib. Those use an explicit
-Wl,-flat_namespace,-U,_environ linker flag. Could it be that this is
there in order to avoid exactly this problem? I don't know. I'll look
some more where this comes from.

Here the error:

cd
/sw_unstable/src/fink.build/paraview-mpi-openmpi-2.6.1-1001/paraview-mpi-openmpi-darwin/Utilities/IceT/src/communication
&& /sw/bin/cmake -E cmake_link_script CMakeFiles/icet_mpi.dir/link.txt
--verbose=1
/sw/bin/gcc    -O3 -DNDEBUG -dynamiclib -headerpad_max_install_names
-Wl,-search_paths_first -o ../../../../bin/libicet_mpi.dylib
-install_name /sw/lib/paraview-2.6/libicet_mpi.dylib
"CMakeFiles/icet_mpi.dir/mpi.o"
-L/sw_unstable/src/fink.build/paraview-mpi-openmpi-2.6.1-1001/paraview-mpi-openmpi-darwin/bin
-L/usr/X11R6/lib -lGLU -L/usr/X11R6/lib -lGL -L/sw/lib/openmpi -lmpi
-lmpi_cxx -licet -L/usr/X11R6/lib -lGLU -L/usr/X11R6/lib -lGL
-L/sw/lib/openmpi -lmpi -lmpi_cxx
ld: Undefined symbols:
_environ
/usr/bin/libtool: internal link edit command failed
make[2]: *** [bin/libicet_mpi.dylib] Error 1


Reply via email to