<br>Please see my recent post on the cmake list about the possibility to specify library paths etc. to the cmake build that will automatically follow through into all the cmake Module paths. In most cases, even if you configure the build for a given port (some linux variant or whatever), all the cmake Modules, like FindVTK.cmake, have hard-coded search paths for the library. We really need a way to specify those module search paths during the porting process (ie, arguments to Cmake).<br>
<br>Regards,<br>Darren<br><br><br><br><br><div class="gmail_quote">On Tue, Oct 21, 2008 at 3:02 PM, Adam Williamson <span dir="ltr"><<a href="mailto:awilliamson@mandriva.com">awilliamson@mandriva.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">On Tue, 2008-10-21 at 17:50 -0400, Sebastien BARRE wrote:<br>
<br>
> Several VTK versions should be able to co-exist together, and this is<br>
> much easier and user-friendly to have them self-contained in their<br>
> own installation tree than mixing them all over. Granted, Linux and<br>
> its various package managers support different versions of the same<br>
> software, but different distributions enforce different file<br>
> structure: there is no reason to pick one over the other. we also<br>
> need to be somehow consistent across all our platforms (Unix, Win32,<br>
> MacOSX, etc); VTK is such a large system, and we bundle so many<br>
> third-party libraries that we recommend installing in a "vtk" subdir,<br>
> not in /usr.<br>
<br>
</div>I commiserate with your position of having to support crappy platforms,<br>
then. ;) I will keep our changes in parallel. On a sane operating<br>
system, they all make sense ;)<br>
<br>
Just to note, in Linux, this does not at all compromise the possibility<br>
of having multiple VTK versions installed, as the directory where the<br>
TCL bits wind up is versioned like the others:<br>
<br>
/usr/lib/tcl8.6/vtk-5.2<br>
<br>
so, of course, there could also be a /usr/lib/tcl8.6/vtk-4.3 and<br>
a /usr/lib/tcl8.6/vtk-6.0 . If you wanted.<br>
<div class="im"><br>
> We can't make changes to accommodate a single distribution<br>
> (Fedora/Mandriva) which decided to force its own Tcl/Tk to look at a<br>
> specific place; a fix already exists which is configuring your<br>
> TCLLIBPATH to point at third-party Tcl packages (I assume they didn't<br>
> break *that*). Furthermore, your changes are very extensive are were<br>
> not tested on Win32 or MacOSX platforms.<br>
<br>
</div>No, of course not, you can always set TCLLIBPATH to whatever you like.<br>
This only concerns the system default.<br>
<div class="im"><br>
> Thanks<br>
><br>
> Quick answers to some of your questions though:<br>
><br>
> >VTK_INSTALL_LIB_DIR seems to lose the prefix, so you get<br>
> >/lib/vtk-5.2 , not /usr/lib/vtk-5.2 .<br>
><br>
> Yes, this is definitely on purpose, all VTK_INSTALL_*_DIR are<br>
> specified relative to the CMAKE_INSTALL_PREFIX variable, and should<br>
> not be hard-coded.<br>
<br>
</div>Yes, I figured that. I don't really remember where I was in the process<br>
when I wrote that mail. I now have<br>
{@CMAKE_INSTALL_PREFIX@@VTK_INSTALL_LIB_DIR@} in the patch in question.<br>
<div class="im"><br>
> >That patch also does something else useful: it makes it look for<br>
> > libvtkFOO.so.5.2<br>
> >rather than<br>
> > libvtkFOO.so<br>
> >on Mandriva (and probably other distributions), the unversioned .so<br>
> >files usually go in -devel packages.<br>
><br>
> We can't change that behavior either for backward compatibility reasons.<br>
> Libraries are indeed versioned already, (you should have in your<br>
> build tree something like libvtkCommon.so, symlink to<br>
> libvtkCommon.so.5.2, symlink to libvtkCommon.so.5.2.0, etc);<br>
<br>
</div>Yes. As I said, the point of using the versioned ones rather than the<br>
unversioned ones is that on most Linux distributions, unversioned libs<br>
are considered development stuff, and whatever package you put them in<br>
winds up with a ton of development dependencies. But if there's a reason<br>
you can't do this, that's fine. Just wanted to mention it.<br>
<br>
In our packages, the unversioned .so files wind up in libvtk-devel and<br>
tcl-vtk-devel (and python-vtk-devel).<br>
<div class="im"><br>
> >CMakeLists.txt also assumes /(prefix)/lib for libraries:<br>
> ><br>
> > SET(VTK_INSTALL_LIB_DIR<br>
> > ${VTK_INSTALL_ROOT}/lib/vtk-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}<br>
> ><br>
> >This isn't correct on several Linux distros, which use /usr/lib64 for<br>
> >the x86-64 architecture.<br>
><br>
> Here you are assuming VTK_INSTALL_ROOT = /usr.<br>
> This is not what we intend, again so that we don't erase other<br>
> libraries in the installation process (remember, we build tons of<br>
> utilities libs in VTK, like libjpeg, libtiff, libpng, ffmpeg, etc,<br>
> and even though we "mangle" and prefix them, you never know).<br>
> Again, we favor self-contained VTK installation trees, say,<br>
> VTK_INSTALL_ROOT = /opt/vtk5.2<br>
<br>
</div>Still, I think it would be correct in this instance to prefix the<br>
libdir. But it's not a massively important point I guess.<br>
<div class="im"><br>
> >because having the shared libraries in a subdirectory of /usr/lib<br>
> >doesn't work by default - it's not in ldconfig's path, so ldconfig<br>
> >doesn't find them, so vtk doesn't run. How is this expected to work,<br>
> >normally?<br>
><br>
> By modifying your LD_LIBRARY_PATH, or using static binaries, or<br>
> creating launchers using KWSys, etc.<br>
<br>
</div>Again, it is therefore clear that we have different ideal usage<br>
scenarios :). Generally, in Mandriva, we want packages to install and<br>
work immediately, and fit into the system environment as much as<br>
possible. This is obviously not your intention upstream, so we will<br>
maintain our changes in parallel.<br>
<font color="#888888">--<br>
adamw<br>
</font><div><div></div><div class="h5"><br>
_______________________________________________<br>
This is the private VTK discussion list.<br>
Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br>