<div dir="ltr">As David Thompson rightfully pointed out, we should not be using LINK_LIBRARIES in VTK's CMakeLists.txt files.<div><br></div><div>Change the LINK_LIBRARIES statement in VTK/IO/CMakeLists.txt to:</div><div>
<div> SET(KIT_LIBS ${KIT_LIBS} ${POSTGRES_LIBRARIES})</div><div><br></div><div>and make sure that POSTGRES_LIBRARIES has the full path to pq in it, and it should work.</div><div><br></div><div>Let us know if it works, and we will commit that change to CVS HEAD in VTK.</div>
<div><br></div><div><br></div><div>Thanks,</div><div>David Cole</div><div><br></div><div><br></div><div class="gmail_quote">On Fri, Aug 29, 2008 at 3:51 PM, Darren Weber <span dir="ltr"><<a href="mailto:darren.weber.lists@gmail.com">darren.weber.lists@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div dir="ltr"><br>I had some choices on how to install MySQL and PostgreSQL on OS X (Leopard Server, in my case). There is a "default" install of MySQL for Leopard server, but it had no development libraries that I could find. There was no default install of PostgreSQL. I first tried macports, but I found some problems with those installations (can't recall the details now). I moved to install binaries from the main web sites for both MySQL and PostgreSQL. Those binary installs mostly take care of a few configuration issues (although there are some startup and symlink issues for MySQL; I had to create symlinks in /usr/bin to point to /usr/local/mysql/bin; /usr/local/mysql is a symlink to /usr/local/mysql-<version>). The PostgreSQL installs into /Library/PostgreSQL/<version>/*<br>
<br>I started looking into dyld, but I'm not sure that's the problem here.<br><br>Is there a way I can run just the cmake utility that should find these libraries? I noticed in the ccmake curses interface that the libraries were found or I just entered the "right" path values. I'll double check that.<br>
<br>Thanks!<div><div></div><div class="Wj3C7c"><br><br><br><div class="gmail_quote">On Fri, Aug 29, 2008 at 12:24 PM, David Thompson <span dir="ltr"><<a href="mailto:dcthomp@sandia.gov" target="_blank">dcthomp@sandia.gov</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>On Fri, 2008-08-29 at 11:58 -0600, David Cole wrote:<br>
> Nevertheless, you should at least be able to link to it if you specify<br>
> the full path to the library. Where is the CMake code that does<br>
> TARGET_LINK_LIBRARIES for this lib?<br>
<br>
</div>The PostgreSQL library is located with this script:<br>
VTK/CMake/FindPOSTGRES.cmake<br>
and a call to LINK_LIBRARIES is made here:<br>
VTK/IO/CMakeLists.txt<br>
if PostgreSQL is turned on. Interestingly, LINK_LIBRARIES is used<br>
instead of TARGET_LINK_LIBRARIES. Perhaps that should be changed to<br>
TARGET_LINK_LIBRARIES (both for PostgreSQL and MySQL)? Also, perhaps on<br>
MacOS X there are some dependent libraries required that are not being<br>
located? The FindPOSTGRES.cmake script doesn't look for any, so if zlib<br>
or any ssl libraries are required that might cause trouble in the case<br>
where libpq is static.<br>
<font color="#888888"><br>
David<br>
</font><div><div></div><div><br>
> Do we use FIND_LIBRARY to get this lib path when linking to it or<br>
> what?<br>
><br>
><br>
> Is there a Postgres SQL VTK developer out there?<br>
<br>
><br>
><br>
><br>
> 2008/8/29 Darren Weber <<a href="mailto:darren.weber.lists@gmail.com" target="_blank">darren.weber.lists@gmail.com</a>><br>
><br>
> For the record, there's some useful information on OS X<br>
> library paths in<br>
> 'man dyld'<br>
><br>
> I assume the binary install of postgreSQL is not adding to one<br>
> of these path settings.<br>
><br>
><br>
><br>
><br>
> On Fri, Aug 29, 2008 at 8:47 AM, Darren Weber<br>
> <<a href="mailto:darren.weber.lists@gmail.com" target="_blank">darren.weber.lists@gmail.com</a>> wrote:<br>
><br>
> I've got a link error when building VTK on OSX. I've<br>
> enabled postgresql and python wrapping.<br>
><br>
> [ 73%] Built target vtk<br>
> Scanning dependencies of target vtkpython<br>
> [ 73%] Building CXX object<br>
> Wrapping/Python/CMakeFiles/vtkpython.dir/vtkPythonAppInit.o<br>
> Linking CXX executable ../../bin/vtkpython<br>
> ld: file not found: libpq.5.dylib<br>
> collect2: ld returned 1 exit status<br>
> make[2]: *** [bin/vtkpython] Error 1<br>
> make[1]: ***<br>
> [Wrapping/Python/CMakeFiles/vtkpython.dir/all] Error 2<br>
> make: *** [all] Error 2<br>
><br>
><br>
> I've used the binary installer for postgresql, which<br>
> goes into /Library/PostgreSQL/8.3/*<br>
><br>
> [ dweber@elegans ~/src/kitware/VTK_build ]$<br>
> ls /Library/PostgreSQL/8.3/lib/<br>
> libecpg.6.0.dylib* libecpg.dylib@<br>
> libecpg_compat.a libpgtypes.3.0.dylib*<br>
> libpgtypes.dylib@ libpq.a<br>
> libecpg.6.dylib@ libecpg_compat.3.0.dylib*<br>
> libecpg_compat.dylib@ libpgtypes.3.dylib@<br>
> libpq.5.1.dylib* libpq.dylib@<br>
> libecpg.a libecpg_compat.3.dylib@<br>
> libpgport.a libpgtypes.a<br>
> libpq.5.dylib@ postgresql/<br>
> [ dweber@elegans ~/src/kitware/VTK_build ]$<br>
><br>
><br>
> Is this a simple problem of loading up an LD path or<br>
> something so the build can find it? What's the best<br>
> way to do this on OSX?<br>
><br>
> Thanks, Darren<br>
><br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> vtk-developers mailing list<br>
> <a href="mailto:vtk-developers@vtk.org" target="_blank">vtk-developers@vtk.org</a><br>
> <a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
><br>
><br>
><br>
<br>
<br>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br></div></div>