Re: shared libraries and undefined environ
Re: shared libraries and undefined environ
- Subject: Re: shared libraries and undefined environ
- From: Jack Howarth <email@hidden>
- Date: Tue, 29 May 2007 14:02:35 -0400
Peter,
This is exactly the sort of problem fink developers using
openmpi have been running into...
-----------------------------------------------------------------------
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
-----------------------------------------------------------------------------
So the question becomes which is worse, forcing the openmpi developers to not
leave undefined environ variables in their shared libraries or off loading
the complexities of linking shared libraries using those with the undefined
symbols. My view is, since openmpi is already wrappering those declarations
of environ for _WINDOWS, that expanding that to __APPLE__ is trivial. In the
process of creating such a patch I discovered that they weren't catching
all of the declarations of environ for Windows anyway.
Jack
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden