[vtk-developers] python, postgreSQL, VTK build

David Thompson dcthomp at sandia.gov
Fri Aug 29 15:24:07 EDT 2008


On Fri, 2008-08-29 at 11:58 -0600, David Cole wrote:
> Nevertheless, you should at least be able to link to it if you specify
> the full path to the library. Where is the CMake code that does
> TARGET_LINK_LIBRARIES for this lib?

The PostgreSQL library is located with this script:
   VTK/CMake/FindPOSTGRES.cmake
and a call to LINK_LIBRARIES is made here:
   VTK/IO/CMakeLists.txt
if PostgreSQL is turned on. Interestingly, LINK_LIBRARIES is used
instead of TARGET_LINK_LIBRARIES. Perhaps that should be changed to
TARGET_LINK_LIBRARIES (both for PostgreSQL and MySQL)? Also, perhaps on
MacOS X there are some dependent libraries required that are not being
located? The FindPOSTGRES.cmake script doesn't look for any, so if zlib
or any ssl libraries are required that might cause trouble in the case
where libpq is static.

	David

>  Do we use FIND_LIBRARY to get this lib path when linking to it or
> what?
> 
> 
> Is there a Postgres SQL VTK developer out there?

> 
> 
> 
> 2008/8/29 Darren Weber <darren.weber.lists at gmail.com>
>         
>         For the record, there's some useful information on OS X
>         library paths in 
>         'man dyld'
>         
>         I assume the binary install of postgreSQL is not adding to one
>         of these path settings.
>         
>         
>         
>         
>         On Fri, Aug 29, 2008 at 8:47 AM, Darren Weber
>         <darren.weber.lists at gmail.com> wrote:
>                 
>                 I've got a link error when building VTK on OSX.  I've
>                 enabled postgresql and python wrapping.
>                 
>                 [ 73%] Built target vtk
>                 Scanning dependencies of target vtkpython
>                 [ 73%] Building CXX object
>                 Wrapping/Python/CMakeFiles/vtkpython.dir/vtkPythonAppInit.o
>                 Linking CXX executable ../../bin/vtkpython
>                 ld: file not found: libpq.5.dylib
>                 collect2: ld returned 1 exit status
>                 make[2]: *** [bin/vtkpython] Error 1
>                 make[1]: ***
>                 [Wrapping/Python/CMakeFiles/vtkpython.dir/all] Error 2
>                 make: *** [all] Error 2
>                 
>                 
>                 I've used the binary installer for postgresql, which
>                 goes into /Library/PostgreSQL/8.3/*
>                 
>                 [ dweber at elegans ~/src/kitware/VTK_build ]$
>                 ls /Library/PostgreSQL/8.3/lib/
>                 libecpg.6.0.dylib*  libecpg.dylib@
>                 libecpg_compat.a       libpgtypes.3.0.dylib*
>                 libpgtypes.dylib@  libpq.a
>                 libecpg.6.dylib@    libecpg_compat.3.0.dylib*
>                 libecpg_compat.dylib@  libpgtypes.3.dylib@
>                 libpq.5.1.dylib*   libpq.dylib@
>                 libecpg.a           libecpg_compat.3.dylib@
>                 libpgport.a            libpgtypes.a
>                 libpq.5.dylib@     postgresql/
>                 [ dweber at elegans ~/src/kitware/VTK_build ]$ 
>                 
>                 
>                 Is this a simple problem of loading up an LD path or
>                 something so the build can find it?  What's the best
>                 way to do this on OSX?
>                 
>                 Thanks, Darren
>                 
>                 
>         
>         
>         
>         _______________________________________________
>         vtk-developers mailing list
>         vtk-developers at vtk.org
>         http://www.vtk.org/mailman/listinfo/vtk-developers
>         
> 
> 





More information about the vtk-developers mailing list