[CMake] Find.CUDA for /usr/local/cuda/lib64

2011-05-24 Thread Darren Weber
The Find.CUDA module returns 32bit libs on a 64bit platform, is this a bug
or what?

For example, in OpenMM, it returns:

/usr/local/cuda/lib/libcublas.so
/usr/local/cuda/lib/libcufft.so

On an Ubuntu 10.04 amd64 platform with a 64bit install of the nVidia driver
and software, i.e.:

$ ls /usr/local/cuda/lib/
libcublas.so@ libcudart.so.3@   libcufft.so.3.2.16*
libcusparse.so@
libcublas.so.3@   libcudart.so.3.2.16*  libcurand.so@
libcusparse.so.3@
libcublas.so.3.2.16*  libcufft.so@  libcurand.so.3@
libcusparse.so.3.2.16*
libcudart.so@ libcufft.so.3@libcurand.so.3.2.16*
[ dweber@weberT61 /data/CUDA ]$ ls /usr/local/cuda/lib64
libcublas.so@ libcudart.so.3@   libcufft.so.3.2.16*
libcusparse.so@
libcublas.so.3@   libcudart.so.3.2.16*  libcurand.so@
libcusparse.so.3@
libcublas.so.3.2.16*  libcufft.so@  libcurand.so.3@
libcusparse.so.3.2.16*
libcudart.so@ libcufft.so.3@libcurand.so.3.2.16*
$ uname -m  cat /etc/*release
x86_64
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.04
DISTRIB_CODENAME=lucid
DISTRIB_DESCRIPTION=Ubuntu 10.04.2 LTS


Hope you can help to modify Find.CUDA so it will get the 64bit libs (in
preference to the 32bit libs).

Thanks,
Darren
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[CMake] Noob question, what is cmake_install.cmake?

2010-03-23 Thread Darren Weber
I've got a build going for some ITK code and I want to install the binaries
into /usr/local/bin/.

This is what I try, without success.

[ ~/src/kitware/itkImageSeries2Volume-build ]$ gmake
[  9%] Built target itkImageSeries2VTKvolume
[ 18%] Built target itkImageSeriesResize
[ 27%] Built target itkImageSeriesSize
[ 36%] Built target itkRGBCoregisterImageSeries2VTKvolume
[ 45%] Built target itkRGBImageSeries2VTKvolume
[ 54%] Built target itkRGBImageSeriesComposeAffineTransforms
[ 63%] Built target itkRGBImageSeriesComposeRigid2DTransforms
[ 72%] Built target itkRGBImageSeriesComposeScalableAffine
[ 81%] Built target itkRGBImageSeriesComposeTransforms
[ 90%] Built target itkRGBImageSeriesResize
[100%] Built target itkRGBImageSeriesSize
[ ~/src/kitware/itkImageSeries2Volume-build ]$ gmake install
gmake: *** No rule to make target `install'.  Stop.


Here's the content of the cmake_install.cmake file (I replace my home path
with ${HOME} only for this email):

[ ~/src/kitware/itkImageSeries2Volume-build ]$ cat cmake_install.cmake
# Install script for directory: ${HOME}/src/kitware/itkImageSeries2Volume

# Set the install prefix
IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
  SET(CMAKE_INSTALL_PREFIX /usr/local)
ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
STRING(REGEX REPLACE /$  CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})

# Set the install configuration name.
IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
  IF(BUILD_TYPE)
STRING(REGEX REPLACE ^[^A-Za-z0-9_]+ 
   CMAKE_INSTALL_CONFIG_NAME ${BUILD_TYPE})
  ELSE(BUILD_TYPE)
SET(CMAKE_INSTALL_CONFIG_NAME )
  ENDIF(BUILD_TYPE)
  MESSAGE(STATUS Install configuration: \${CMAKE_INSTALL_CONFIG_NAME}\)
ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)

# Set the component getting installed.
IF(NOT CMAKE_INSTALL_COMPONENT)
  IF(COMPONENT)
MESSAGE(STATUS Install component: \${COMPONENT}\)
SET(CMAKE_INSTALL_COMPONENT ${COMPONENT})
  ELSE(COMPONENT)
SET(CMAKE_INSTALL_COMPONENT)
  ENDIF(COMPONENT)
ENDIF(NOT CMAKE_INSTALL_COMPONENT)

IF(CMAKE_INSTALL_COMPONENT)
  SET(CMAKE_INSTALL_MANIFEST
install_manifest_${CMAKE_INSTALL_COMPONENT}.txt)
ELSE(CMAKE_INSTALL_COMPONENT)
  SET(CMAKE_INSTALL_MANIFEST install_manifest.txt)
ENDIF(CMAKE_INSTALL_COMPONENT)

FILE(WRITE
${HOME}/src/kitware/itkImageSeries2Volume-build/${CMAKE_INSTALL_MANIFEST}
)
FOREACH(file ${CMAKE_INSTALL_MANIFEST_FILES})
  FILE(APPEND 
${HOME}/src/kitware/itkImageSeries2Volume-build/${CMAKE_INSTALL_MANIFEST}
${file}\n)
ENDFOREACH(file)


TIA,
Darren
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[CMake] ITK build failure for java wrapping on OSX (10.6.x)

2010-02-18 Thread Darren Weber
In MacPorts, we've noticed a persistent failure in building the java
wrapping for InsightToolkit on OSX 10.6.x.  This failure has occurred on a
reliable basis across a number of systems running OSX 10.6.x

This is a trac ticket describing the problem (see esp. the last few posts
from me):

http://trac.macports.org/ticket/23092

Anyone else seen this problem?  Anyone solved it?

TIA,
Darren
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[CMake] Module search paths - distribution precedence

2009-06-02 Thread Darren Weber
This is a discussion about how to code module search paths, with regard to
distribution porting of cmake.  The examples below use MacPorts only because
that's what I'm working with at the moment.  The issue applies to any port
of cmake on a specific distribution system (MacPorts, Fink, debian, freebsd,
ubuntu, redhat, etc.).

The main PREFIX on MacPorts is /opt/local/.  This will list all the module
files that contain /opt/local for an installation of cmake 2.6 on MacPorts:

$ grep -C3 .*/opt/local.* /opt/local/share/cmake-2.6/Modules/*.cmake

Not all the .cmake files contain this prefix.  Moreover, even when the
/opt/local prefix is in a module search path, it doesn't resolve an issue of
path precedence. For example:

/opt/local/share/cmake-2.6/Modules/Findosg_functions.cmake-
PATH_SUFFIXES lib64 lib
/opt/local/share/cmake-2.6/Modules/Findosg_functions.cmake-   PATHS
/opt/local/share/cmake-2.6/Modules/Findosg_functions.cmake-
/sw # Fink
/opt/local/share/cmake-2.6/Modules/Findosg_functions.cmake:
/opt/local # DarwinPorts
/opt/local/share/cmake-2.6/Modules/Findosg_functions.cmake-
/opt/csw # Blastwave
/opt/local/share/cmake-2.6/Modules/Findosg_functions.cmake-/opt
/opt/local/share/cmake-2.6/Modules/Findosg_functions.cmake-
/usr/freeware

Here, the path precedence favors the main alternative to MacPorts for
open-source ports on OSX - Fink. If anyone has both Fink and MacPorts
installed, any of their MacPorts cmake builds that require any such module
could link against a Fink library because it appears higher in the module
path precedence (even when /opt/local is in the module search path).  The
same argument applies in reverse if the module shuffles around these paths
to favor MacPorts over Fink (or some other distribution) in the search path
precedence.

I'm not aware of a cmake build-time config variable that allows distros to
set a specific module search path. That would be really neat! Maybe
something like the following when building cmake:

-D CMAKE_MODULE_PREFIX_PATH:STRING=/opt/local;/usr/local;/usr
-D 
CMAKE_MODULE_INCLUDE_PATH:STRING=/opt/local/include;/usr/local/include;/usr/include
-D 
CMAKE_MODULE_LIBRARY_PATH:STRING=/opt/local/lib;/usr/local/lib;/usr/lib;/usr/lib64

If something like this could be defined, then module .cmake files could use
these cmake variables to define their search paths, rather than have them
hard-coded in the module files.  If these variables are not set explicitly,
some common fallback paths must be set.

Darren

PS, see this ticket for further details on this issue for MacPorts:
http://trac.macports.org/ticket/19781
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[CMake] Building CableSwig (outside ITK)

2009-05-04 Thread Darren Weber
I'm trying to package CableSwig for macports.  The cswig binary looks for SWIG
Lib in the source directory.  How is that re-configured?

The information available seems fairly basic, ie:
http://www.itk.org/ITK/resources/CableSwig.html

The build works, using the following build options:

configure.args \
-DCMAKE_OSX_SYSROOT=${universal_sysroot} \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON \
-DCMAKE_INSTALL_RPATH:STRING=${prefix}/lib/CableSwig \
-DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
-DCMAKE_INCLUDE_PATH:PATH=${prefix}/include \
-DCMAKE_LIBRARY_PATH:PATH=${prefix}/lib \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DCSWIG_USE_SYSTEM_GCCXML:BOOL=ON

MacPorts uses an install DESTROOT for the package management system.  After
the make install, the DESTROOT looks like this:

destroot/opt/local
destroot/opt/local/bin
destroot/opt/local/bin/cableidx
destroot/opt/local/bin/cswig
destroot/opt/local/lib
destroot/opt/local/lib/CableSwig
destroot/opt/local/lib/CableSwig/CableSwigConfig.cmake
destroot/opt/local/lib/CableSwig/SWIGLib
destroot/opt/local/lib/CableSwig/SWIGLib/_std_deque.i
destroot/opt/local/lib/CableSwig/SWIGLib/allkw.swg
destroot/opt/local/lib/CableSwig/SWIGLib/carrays.i
destroot/opt/local/lib/CableSwig/SWIGLib/cdata.i
destroot/opt/local/lib/CableSwig/SWIGLib/cmalloc.i
destroot/opt/local/lib/CableSwig/SWIGLib/common.swg
destroot/opt/local/lib/CableSwig/SWIGLib/constraints.i
destroot/opt/local/lib/CableSwig/SWIGLib/cpointer.i
destroot/opt/local/lib/CableSwig/SWIGLib/cstring.i
destroot/opt/local/lib/CableSwig/SWIGLib/exception.i
destroot/opt/local/lib/CableSwig/SWIGLib/java
destroot/opt/local/lib/CableSwig/SWIGLib/java/arrays_java.i
destroot/opt/local/lib/CableSwig/SWIGLib/java/director.swg
destroot/opt/local/lib/CableSwig/SWIGLib/java/java.swg
destroot/opt/local/lib/CableSwig/SWIGLib/java/javahead.swg
destroot/opt/local/lib/CableSwig/SWIGLib/java/javakw.swg
destroot/opt/local/lib/CableSwig/SWIGLib/java/std_common.i
destroot/opt/local/lib/CableSwig/SWIGLib/java/std_map.i
destroot/opt/local/lib/CableSwig/SWIGLib/java/std_pair.i
destroot/opt/local/lib/CableSwig/SWIGLib/java/std_string.i
destroot/opt/local/lib/CableSwig/SWIGLib/java/std_vector.i
destroot/opt/local/lib/CableSwig/SWIGLib/java/typemaps.i
destroot/opt/local/lib/CableSwig/SWIGLib/java/various.i
destroot/opt/local/lib/CableSwig/SWIGLib/math.i
destroot/opt/local/lib/CableSwig/SWIGLib/pointer.i
destroot/opt/local/lib/CableSwig/SWIGLib/python
destroot/opt/local/lib/CableSwig/SWIGLib/python/argcargv.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/ccomplex.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/complex.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/complex_common.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/cstring.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/defarg.swg
destroot/opt/local/lib/CableSwig/SWIGLib/python/director.swg
destroot/opt/local/lib/CableSwig/SWIGLib/python/embed.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/embed15.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/fragments.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/precommon.swg
destroot/opt/local/lib/CableSwig/SWIGLib/python/pymisctypes.swg
destroot/opt/local/lib/CableSwig/SWIGLib/python/pyobject.swg
destroot/opt/local/lib/CableSwig/SWIGLib/python/pyopers.swg
destroot/opt/local/lib/CableSwig/SWIGLib/python/pyprimtypes.swg
destroot/opt/local/lib/CableSwig/SWIGLib/python/pyrun.swg
destroot/opt/local/lib/CableSwig/SWIGLib/python/pystrings.swg
destroot/opt/local/lib/CableSwig/SWIGLib/python/pyswigtype.swg
destroot/opt/local/lib/CableSwig/SWIGLib/python/python.swg
destroot/opt/local/lib/CableSwig/SWIGLib/python/pythonkw.swg
destroot/opt/local/lib/CableSwig/SWIGLib/python/pyvaltypes.swg
destroot/opt/local/lib/CableSwig/SWIGLib/python/pyvoid.swg
destroot/opt/local/lib/CableSwig/SWIGLib/python/std_common.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/std_complex.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/std_deque.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/std_list.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/std_map.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/std_pair.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/std_string.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/std_vector.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/typemaps.i
destroot/opt/local/lib/CableSwig/SWIGLib/std_deque.i
destroot/opt/local/lib/CableSwig/SWIGLib/stl.i
destroot/opt/local/lib/CableSwig/SWIGLib/swig.swg
destroot/opt/local/lib/CableSwig/SWIGLib/swigrun.i
destroot/opt/local/lib/CableSwig/SWIGLib/tcl
destroot/opt/local/lib/CableSwig/SWIGLib/tcl/cstring.i
destroot/opt/local/lib/CableSwig/SWIGLib/tcl/precommon.swg
destroot/opt/local/lib/CableSwig/SWIGLib/tcl/std_common.i
destroot/opt/local/lib/CableSwig/SWIGLib/tcl/std_map.i
destroot/opt/local/lib/CableSwig/SWIGLib/tcl/std_pair.i
destroot/opt/local/lib/CableSwig/SWIGLib/tcl/std_string.i

[CMake] rpath install setting for the VTK examples?

2009-04-28 Thread Darren Weber
For a config that uses
cmake ... \
  -D CMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF \
  -D CMAKE_SKIP_BUILD_RPATH:BOOL=OFF \
  -D CMAKE_INSTALL_RPATH:STRING=${libInstallPath} \
  -D VTK_USE_RPATH \
  ...

This provides a build tree with rpath settings specific to the build path.
At the point of installation, all the installation candidates have their
rpath reset to the INSTALL_RPATH.

Although the examples were built ( -D BUILD_EXAMPLES:BOOL=ON ), they are not
installation candidates - is that right?  It appears that all the
executables in ${build.dir}/bin are not in the ${install.dir}/bin/.  How do
we get the binary examples into the installation?  Are there any extra CMAKE
or VTK variables that can be used on the cmake command line to enable
installation and INSTALL_RPATH for the binary examples?

Is there anything like CMAKE_EXE_INSTALL_RPATH that could apply to the
binary examples for VTK?  Likewise, something that would apply to the binary
testing files for VTK?

Take care,
Darren
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[CMake] Help to understand build process with rpath settings, for a pseudo destroot install on OSX (under macports)

2009-04-27 Thread Darren Weber
I need to understand how to use CMake command line variables to specify the
install name and rpath settings when building VTK and installing it into a
destroot (which is not the final installation path).  In macports,
everything is installed into a holding bay that is defined by $DESTROOT.
From the temporary $DESTROOT installation, macports does some analysis of
the port files, and then all the files in a port are moved into
/opt/local/var/macports/software/port and from there they are hard linked
into the prefix /opt/local (with most paths below that mapping to the
conventional /usr/local paths, such as /opt/local/lib, /opt/local/include).
To avoid using any environment variables for the dynamic loader, all the
dynamic libraries need to set the rpath (or install_name).  Hence, the
configuration for several vtk ports contains an assortment of cmake
variables to set the install_name and/or rpath.

Here is a snippet of some cmake command line settings for the vtk port
(vtk-4.4.2) in macports:

-D BUILD_SHARED_LIBS:BOOL=ON \
-D CMAKE_INSTALL_PREFIX:PATH=${prefix} \
-D CMAKE_SKIP_RPATH:BOOL=OFF \
-D CMAKE_INSTALL_NAME_DIR:STRING=${prefix}/lib/vtk \
-D CMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON

With these settings, we get this result in the $DESTROOT:

$ otool -L ${DESTROOT}/opt/local/lib/vtk/libvtkRendering.dylib
destroot/opt/local/lib/vtk/libvtkRendering.dylib:
/opt/local/lib/vtk/libvtkRendering.dylib (compatibility version 0.0.0,
current version 0.0.0)
/opt/local/lib/vtk/libvtkGraphics.dylib (compatibility version 0.0.0,
current version 0.0.0)
/opt/local/lib/vtk/libvtkImaging.dylib (compatibility version 0.0.0,
current version 0.0.0)
/opt/local/lib/vtk/libvtkIO.dylib (compatibility version 0.0.0, current
version 0.0.0)
/opt/local/lib/vtk/libvtkftgl.dylib (compatibility version 0.0.0,
current version 0.0.0)
/opt/local/lib/vtk/libvtkfreetype.dylib (compatibility version 0.0.0,
current version 0.0.0)
/System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility
version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
(compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
(compatibility version 1.0.0, current version 12.0.0)
/opt/local/lib/vtk/libvtkFiltering.dylib (compatibility version 0.0.0,
current version 0.0.0)
/opt/local/lib/vtk/libvtkCommon.dylib (compatibility version 0.0.0,
current version 0.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
111.1.3)
/opt/local/lib/vtk/libvtkDICOMParser.dylib (compatibility version 0.0.0,
current version 0.0.0)
/opt/local/lib/vtk/libvtkpng.dylib (compatibility version 0.0.0, current
version 0.0.0)
/opt/local/lib/vtk/libvtktiff.dylib (compatibility version 0.0.0,
current version 0.0.0)
/opt/local/lib/vtk/libvtkzlib.dylib (compatibility version 0.0.0,
current version 0.0.0)
/opt/local/lib/vtk/libvtkjpeg.dylib (compatibility version 0.0.0,
current version 0.0.0)
/opt/local/lib/vtk/libvtkexpat.dylib (compatibility version 0.0.0,
current version 0.0.0)
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
(compatibility version 45.0.0, current version 949.43.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version
7.4.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version
1.0.0)


Notice how this dylib has been installed under
${DESTROOT}/opt/local/lib/vtk, ie ${DESTROOT}/${INSTALL_NAME_DIR}, yet all
the rpath settings are specified correctly for the final installation
destination into ${INSTALL_NAME_DIR}, which is handled by macports not by
cmake or gmake.  This process works during both the linking during the build
phase and for the dynamic loader after the final installation under
/opt/local/.

Here is a snippet of some cmake command line settings for the vtk5 port
(vtk-5.2.1) in macports:

-D BUILD_SHARED_LIBS:BOOL=ON \
-D VTK_USE_RPATH:BOOL=ON \
-D CMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON \
-D CMAKE_INSTALL_RPATH:STRING=${prefix}/lib/vtk-5.2 \
-D CMAKE_INSTALL_NAME_DIR:STRING=${prefix}/lib/vtk-5.2 \
-D CMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=ON \
-D CMAKE_LIBRARY_PATH:PATH=${prefix}/lib \
-D CMAKE_INCLUDE_PATH:PATH=${prefix}/include \
-D CMAKE_INSTALL_PREFIX:PATH=${prefix} \
-D VTK_INSTALL_PREFIX:PATH=${prefix} \

Despite reading the output of 'cmake -LAH srcpath' and the documentation
in the Cmake book, the meaning and interactions among these variable
settings remains obscure to me, in the context of the macports DESTROOT
installation.

Any help from CMake experts to understand the optimal way to set these
variables would be greatly appreciated, in the context of a pseudo destroot
installation, with rpath on for both the dylibs and the executables (eg:
examples).  Of most help would be a 

[CMake] DESTDIR, CMAKE_INSTALL_PREFIX, rpath, dynamic libs

2009-04-24 Thread Darren Weber
In the cmake FAQ, it indicates that cmake will use the DESTDIR on the
command line as the root of the install path.
http://www.vtk.org/Wiki/CMake_FAQ (item 8.1, as of April 2009)

What is the level of precedence for this variable setting, with regard to
cache values that are set at the time of cmake configuration (using
-Dvar:type=val)?  That is, if cmake is called with something like
-DCMAKE_INSTALL_PREFIX:PATH=${prefix}, will 'gmake install
DESTDIR=${anotherPrefix}' use the cache variable setting for ${prefix} or
will it use the command line setting for ${anotherPrefix} when setting rpath
in dynamic libs.

Furthermore, what is the relationship between these variable settings for
the install path and, on OSX, the setting for CMAKE_INSTALL_NAME_DIR?  Does
this variable interact in any way with the DESTDIR command line setting (for
dynamic library builds)?

Thanks in advance,
Darren
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] how-to get cmake command line after running ccmake

2009-04-01 Thread Darren Weber
Yes, this is the feature that I'm looking for.  I want to use ccmake for the
initial configuration and then automatically translate that configuration
into an equivalent command line for cmake (all on *nix system), which I can
then put into an automated build script (sh or bash) that I can run on other
systems (via ssh, macports, etc.).

I'll try your diff suggestion James.

Thanks, Darren



On Mon, Mar 30, 2009 at 9:23 PM, James Bigler jamesbig...@gmail.com wrote:

 On Mon, Mar 30, 2009 at 9:27 PM, Philip Lowman phi...@yhbt.com wrote:

 On Mon, Mar 30, 2009 at 4:09 PM, Darren Weber 
 darren.weber.li...@gmail.com wrote:


 Can we automatically extract an equivalent cmake command line after
 running ccmake?

 Take care, Darren


 If you're using the Makefile generator you can simply type make
 edit_cache in your build tree after you've initially generated.

 If this doesn't solve your problem you likely can look towards finding the
 source directory in the CMakeCache.txt file.


 I think he wants to run ccmake and configure things how he likes and then
 get a command line that would produce the equivalent configuration without
 ccmake (i.e. cmake -DSOMEVAR:BOOL=ON
 -DPATH_TO_SOME_EXE:PATH=/path/to/some.exe).  This way, he can configure a
 new build in one easy step.

 I don't believe this feature exists, though you could get something close
 by doing the following.

 1. Create a build directory and run cmake path to source.  This is your
 default configuration.
 2. Copy CMakeCache.txt some where safe.
 3. Configure you system with ccmake.
 4. Diff the old CMakeCache.txt and the new CMakeCache.txt.  The differences
 should show you a superset of the options you will need (depending on if
 some options are automatically generated when you turn others on).

 James

 ___
 Powered by www.kitware.com

 Visit other Kitware open-source projects at
 http://www.kitware.com/opensource/opensource.html

 Please keep messages on-topic and check the CMake FAQ at:
 http://www.cmake.org/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] how-to get cmake command line after running ccmake

2009-04-01 Thread Darren Weber
Yes, this is the feature that I'm looking for.  I want to use ccmake for the
initial configuration and then automatically translate that configuration
into an equivalent command line for cmake (all on *nix system), which I can
then put into an automated build script (sh or bash) that I can run on other
systems (via ssh or whatever).

I'll try your diff suggestion James.

Thanks, Darren



On Mon, Mar 30, 2009 at 9:23 PM, James Bigler jamesbig...@gmail.com wrote:

 On Mon, Mar 30, 2009 at 9:27 PM, Philip Lowman phi...@yhbt.com wrote:

 On Mon, Mar 30, 2009 at 4:09 PM, Darren Weber 
 darren.weber.li...@gmail.com wrote:


 Can we automatically extract an equivalent cmake command line after
 running ccmake?

 Take care, Darren


 If you're using the Makefile generator you can simply type make
 edit_cache in your build tree after you've initially generated.

 If this doesn't solve your problem you likely can look towards finding the
 source directory in the CMakeCache.txt file.


 I think he wants to run ccmake and configure things how he likes and then
 get a command line that would produce the equivalent configuration without
 ccmake (i.e. cmake -DSOMEVAR:BOOL=ON
 -DPATH_TO_SOME_EXE:PATH=/path/to/some.exe).  This way, he can configure a
 new build in one easy step.

 I don't believe this feature exists, though you could get something close
 by doing the following.

 1. Create a build directory and run cmake path to source.  This is your
 default configuration.
 2. Copy CMakeCache.txt some where safe.
 3. Configure you system with ccmake.
 4. Diff the old CMakeCache.txt and the new CMakeCache.txt.  The differences
 should show you a superset of the options you will need (depending on if
 some options are automatically generated when you turn others on).

 James

 ___
 Powered by www.kitware.com

 Visit other Kitware open-source projects at
 http://www.kitware.com/opensource/opensource.html

 Please keep messages on-topic and check the CMake FAQ at:
 http://www.cmake.org/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[CMake] how-to get cmake command line after running ccmake

2009-03-30 Thread Darren Weber
Can we automatically extract an equivalent cmake command line after running
ccmake?

Take care, Darren
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[CMake] Makefile for checkout from cvs of kitware releases

2009-03-30 Thread Darren Weber
See attached Makefile.

For example, to get VTK-5-4-0 by a cvs checkout, do:
$ make VTK

Note that it has specific path assumptions and it removes any current
checkouts in the target paths.  It's only doing cvs checkout, using a
release tag.  It's not initiating a build (that's handled with ccmake, but
it could be automated with cmake, if you get the right options).  Perhaps
the whole thing could be easier with a direct cvs command to update a
current checkout, but it makes no assumptions and starts from scratch.  It
does have some release tags hard-coded - any suggestions on how to get them
automatically for the current release would be great.

Take care, Darren

PS, Perhaps this could go on the kitware wiki?
PPS, Apologies for emailing this to multiple lists, but it does cover
multiple kitware projects.


Makefile
Description: Binary data
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[CMake] cdash docs - broken links

2009-03-23 Thread Darren Weber
All document links are broken here:
http://www.cdash.org/cdash/project/publications.html

Take care, Darren
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[CMake] VTK-5-2-0 macport build error

2008-09-18 Thread Darren Weber
I'm in the process of adapting a macport called vtk5 so it will work
with VTK-5-2-0, but I have a problem with finding a library.  I'm
running a build on the cvs checkout with tag VTK-5-2-0; I'm trying to
build against macport libraries (on OSX 10.5.5).  The build is
configured and builds successfully, but the link fails with ld:
library not found for -lhistory (see below).  How can I get more
information about this link error so I can identify the library
dependency and correct it?

export prefix=/opt/local
export LDFLAGS=-L${prefix}/lib
export CPPFLAGS=-I${prefix}/include

cmake \
-DBUILD_EXAMPLES:BOOL=OFF \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DBUILD_TESTING:BOOL=OFF \
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
-DCMAKE_EXE_LINKER_FLAGS:STRING=-rpath ${prefix}/lib \
-DCMAKE_INCLUDE_PATH:PATH=${prefix}/include \
-DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
-DCMAKE_INSTALL_NAME_DIR:STRING=${prefix}/lib \
-DCMAKE_LIBRARY_PATH:PATH=${prefix}/lib \
-DVTK_INSTALL_PREFIX:PATH=${prefix} \
-DVTK_DATA_ROOT:PATH=${prefix}/share/VTKData \
-DVTK_USE_CARBON:BOOL=OFF \
-DVTK_USE_COCOA:BOOL=ON \
-DVTK_USE_INFOVIS:BOOL=ON \
-DVTK_USE_PARALLEL:BOOL=OFF \
-DVTK_USE_RENDERING:BOOL=ON \
-DVTK_USE_VIEWS:BOOL=ON \
-DVTK_USE_X:BOOL=OFF \
-DVTK_WRAP_JAVA:BOOL=OFF \
-DVTK_WRAP_PYTHON:BOOL=OFF \
-DVTK_WRAP_TCL:BOOL=ON \
-DVTK_TCL_LIBRARY_DIR:FILEPATH=${prefix}/lib/tcl8.5 \
-DVTK_REQUIRED_EXE_LINKER_FLAGS:STRING=-rpath ${prefix}/lib \
../VTK

snip

[ 99%] Building CXX object Views/CMakeFiles/vtkViewsTCL.dir/vtkViewsTCLInit.o
Linking CXX static library ../bin/libvtkViewsTCL.a
[ 99%] Built target vtkViewsTCL
Scanning dependencies of target vtk
[100%] Building CXX object Wrapping/Tcl/CMakeFiles/vtk.dir/vtkTkAppInit.o
Linking CXX executable ../../bin/vtk
ld: library not found for -lhistory
collect2: ld returned 1 exit status
make[2]: *** [bin/vtk] Error 1
make[1]: *** [Wrapping/Tcl/CMakeFiles/vtk.dir/all] Error 2
make: *** [all] Error 2


I can 'locate' the following (among others):

/opt/local/lib/libhistory.5.0.dylib
/opt/local/lib/libhistory.5.1.dylib
/opt/local/lib/libhistory.5.2.dylib
/opt/local/lib/libhistory.5.dylib
/opt/local/lib/libhistory.a
/opt/local/lib/libhistory.dylib

/opt/local/lib/tcl8.5/history.tcl
/usr/local/lib/tcl8.4/history.tcl

/System/Library/Tcl/tklib0.4/history
/System/Library/Tcl/tklib0.4/history/history.tcl
/System/Library/Tcl/tklib0.4/history/pkgIndex.tcl


Among the active macports, I have:

tk @8.5.4_0 (active)
tcl @8.5.4_0+memdebug+threads (active)
tcllib @1.10_0 (active)
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] cmake variables to control full path in shared lib on OSX

2008-09-18 Thread Darren Weber
I'm exploring how to build and install VTK-5-2-0 on OSX.  I'm trying
to use shared libraries, but the default settings do not put full
paths in the .dylib file links for the libvtk* libraries.  I am using
a non-standard install path (macports /opt/local), so I may need to
set full paths for the libvtk* links.  For example, this is just one
of the dylib files and I may need all the links to libvtk* to contain
the full path (/opt/local/lib/vtk-5.2/):

[ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$ otool -L
/opt/local/lib/vtk-5.2/libvtkViewsTCL.5.2.0.dylib
/opt/local/lib/vtk-5.2/libvtkViewsTCL.5.2.0.dylib:
libvtkViewsTCL.5.2.dylib (compatibility version 0.0.0, current version 
0.0.0)
snip, block of libvtk*
libvtkzlib.5.2.dylib (compatibility version 0.0.0, current version 
0.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 111.1.1)
/opt/local/lib/libhistory.5.2.dylib (compatibility version 5.0.0,
current version 5.2.0)
/opt/local/lib/libreadline.5.2.dylib (compatibility version 5.0.0,
current version 5.2.0)
libvtkGraphicsTCL.5.2.dylib (compatibility version 0.0.0, current
version 0.0.0)
snip, block of libvtk*
libvtkCommon.5.2.dylib (compatibility version 0.0.0, current version 
0.0.0)
/System/Library/Frameworks/Tcl.framework/Versions/8.4/Tcl
(compatibility version 8.4.0, current version 8.4.0)
libvtkfreetype.5.2.dylib (compatibility version 0.0.0, current version 
0.0.0)
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
(compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
(compatibility version 1.0.0, current version 12.0.0)
libvtkexoIIc.5.2.dylib (compatibility version 0.0.0, current version 
0.0.0)
snip, block of libvtk*
libvtksys.5.2.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current 
version 7.4.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 
1.0.0)
[ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$


What are the right cmake variables that will enable full paths in the
shared libraries?

Potential candidates:

CMAKE_INSTALL_NAME_DIR  (eg: /opt/local/lib/vtk-5.2 ?)
CMAKE_SKIP_BUILD_RPATH (FALSE?)
CMAKE_SKIP_RPATH (FALSE?)

CMAKE_INSTALL_RPATH   (eg: /opt/local/lib/vtk-5.2 ?)
CMAKE_INSTALL_RPATH_USE_LINK_PATH  (TRUE?)

CMAKE_BUILD_WITH_INSTALL_RPATH (True?)


When I configured the build with just a switch to turn on shared libs,
then checked CMakeCache.txt, I can't see that any of these were set,
ie:

[ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$ cat CMakeCache.txt | grep RPATH
VTK_USE_RPATH:BOOL=OFF
//Advanced flag for variable: CMAKE_SKIP_RPATH
CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
CMAKE_SKIP_RPATH:INTERNAL=1
//Advanced flag for variable: VTK_USE_RPATH
VTK_USE_RPATH-ADVANCED:INTERNAL=1


I then set VTK_USE_RPATH=ON and built again.  This time I got the
wrong paths because I had set CMAKE_INSTALL_NAME_DIR=/opt/local/lib/

[ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$ otool -L
/opt/local/lib/vtk-5.2/libvtkInfovisTCL.5.2.0.dylib
/opt/local/lib/vtk-5.2/libvtkInfovisTCL.5.2.0.dylib:
/opt/local/lib/libvtkInfovisTCL.5.2.dylib (compatibility version
0.0.0, current version 0.0.0)
/opt/local/lib/libvtkInfovis.5.2.dylib (compatibility version 0.0.0,
current version 0.0.0)
etc.

So I changed CMAKE_INSTALL_NAME_DIR=${prefix}/lib/vtk-5.2 and it
seems right now:

[ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$ otool -L
/opt/local/lib/vtk-5.2/libvtkInfovisTCL.5.2.0.dylib
/opt/local/lib/vtk-5.2/libvtkInfovisTCL.5.2.0.dylib:
/opt/local/lib/vtk-5.2/libvtkInfovisTCL.5.2.dylib (compatibility
version 0.0.0, current version 0.0.0)
/opt/local/lib/vtk-5.2/libvtkInfovis.5.2.dylib (compatibility version
0.0.0, current version 0.0.0)
/opt/local/lib/vtk-5.2/libvtkWidgetsTCL.5.2.dylib (compatibility
version 0.0.0, current version 0.0.0)
etc.


Are there any major problems with using this installation approach for
the vtk 5.2 library in the macports path?

As a noob to RPATH, I found these links informative:
http://en.wikipedia.org/wiki/Rpath_(linking)
http://wiki.debian.org/RpathIssue
http://www.the-martins.org/index.php?name=Sectionsreq=viewarticleartid=6allpages=1


Thanks, Darren
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] [vtk-developers] problems with VTK python module installation on OSX (after a custom build)

2008-09-05 Thread Darren Weber
On Wed, Sep 3, 2008 at 3:28 PM, Mike Jackson
[EMAIL PROTECTED] wrote:
 Cross posting to vtkusers list as that may be more appropriate:


 Can you rebuild VTK with these two settings:

 CMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON \

Where is this?  I don't see it in ccmake.  How do you set it?

 VTK_USE_RPATH=ON

This I can see in ccmake


 Run ccmake on your vtk build directory and set those two cmake variables.
 Configure and build. After the build completes, then run make install.

 The default installation location is in /usr/local. I would change it to
 /usr/local/vtk-5.2.

 Next, Get rid of extra Python builds on your system. The only python build
 should be in /System/Library/Frameworks.

 Now try to build your project. If everything goes correctly you should NOT
 need to mess with DYLD_LIBRARY_PATH. The reason why you are having to set
 that variable is because, as you found out, the vtk libraries do NOT have an
 install_path (same as rpath on linux) set in them. Without that set to
 anything besides the library name the linker will not be able to encode the
 correct path in anything else that depends on the vtk libraries. Which is
 some of your problems.

 Let us know if you can get this far.

 Mike
 On Sep 3, 2008, at 2:19 PM, Darren Weber wrote:

 I think we may be on the right track with addition(s) to the DYLD path,
 ie:

 [ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$ echo $DYLD_LIBRARY_PATH

 [ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$ export
 DYLD_LIBRARY_PATH=/usr/local/lib/vtk-5.2
 [ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$ echo $DYLD_LIBRARY_PATH
 /usr/local/lib/vtk-5.2
 [ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$ python
 Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53)
 [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
 Type help, copyright, credits or license for more information.

 import vtk

 Traceback (most recent call last):
  File stdin, line 1, in module
  File /usr/local/lib/python2.5/site-packages/vtk/__init__.py, line
 43, in module
   from io import *
  File /usr/local/lib/python2.5/site-packages/vtk/io.py, line 7, in
 module
   from libvtkIOPython import *
 ImportError:
 dlopen(/usr/local/lib/python2.5/site-packages/vtk/libvtkIOPython.so,
 10): Library not loaded: libpq.5.dylib
  Referenced from:
 /usr/local/lib/python2.5/site-packages/vtk/libvtkIOPython.so
  Reason: image not found


 This is another failure, but this time it is related to the PostgreSQL
 library that resides in another location (under /Library path).  So, I
 conclude from this test that dlopen is now finding the vtk dylib
 files.

 Now, we can get the following diagnostics on the .so from the prior
 import problem:

 [ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$ otool -L
 /usr/local/lib/python2.5/site-packages/vtk/libvtkCommonPython.so
 /usr/local/lib/python2.5/site-packages/vtk/libvtkCommonPython.so:
libvtkCommonPythonD.5.2.dylib (compatibility version 0.0.0, current
 version 0.0.0)
/Library/Frameworks/Python.framework/Versions/2.5/Python
 (compatibility version 2.5.0, current version 2.5.0)
libvtkCommon.5.2.dylib (compatibility version 0.0.0, current
 version 0.0.0)
libvtksys.5.2.dylib (compatibility version 0.0.0, current version
 0.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
 version 111.1.1)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current
 version 7.4.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
 version 1.0.0)
 [ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$


 Notice how some of the system libaries have full paths (ie,
 /usr/lib/), but the vtk dylib files have no paths.  Hence, when we
 specify the DYLD_LIBRARY_PATH, the python import process is now
 finding these extra libraries because dlopen is now searching at least
 the /usr/local/lib/vtk... path (recursively? maybe not, because it
 doesn't work if we use /usr/local/lib without the specific vtk path).

 Similarly, now we can see the full library dependency for the
 IOPython.so file using:

 [ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$ otool -L
 /usr/local/lib/python2.5/site-packages/vtk/libvtkIOPython.so
 /usr/local/lib/python2.5/site-packages/vtk/libvtkIOPython.so:
libvtkIOPythonD.5.2.dylib (compatibility version 0.0.0, current
 version 0.0.0)
libvtkIO.5.2.dylib (compatibility version 0.0.0, current version
 0.0.0)
/usr/local/lib/libpqxx-2.6.9.dylib (compatibility version 0.0.0,
 current version 0.0.0)
libpq.5.dylib (compatibility version 5.0.0, current version 5.1.0)
/usr/local/mysql/lib/libmysqlclient.15.dylib (compatibility version
 16.0.0, current version 16.0.0)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version
 1.2.3)
libvtkFilteringPythonD.5.2.dylib (compatibility version 0.0.0,
 current version 0.0.0)
libvtkCommonPythonD.5.2.dylib (compatibility version 0.0.0, current
 version 0.0.0)
/Library/Frameworks

Re: [CMake] problems with VTK python module installation on OSX (after a custom build)

2008-09-03 Thread Darren Weber
Thanks heaps for some very useful insight into resolving my OSX nightmares.

It always helps to RTFM!  I was starting to think there is a problem
within the .so file and how it specifies the location of the dylib
required (path and version).  As yet, I have no idea how to debug
that.  I was stratching around for ldd or something and actually
started to read a couple of man pages on dlopen, but I didn't get far
enough with that and started to hack symlinks (no so elegant).  So, I
guess most of the dlopen paths point to framework locations (NeXT
stuff), rather than a full search of /usr/local/lib/, but I do have to
RTFM on that, among many other OSX things ;-)

Another option may be to hard code the paths in the .so build
(somehow), so that's another avenue to learn about (the build learning
curve is moderated by ccmake, but not entirely when you need to tweak
a few things).  I could not find instances of these variables in the
main ccmake interface:

-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON \
-DVTK_USE_RPATH=ON

Where are they set?  Are they set somewhere specific within the build tree?

In my build with this dylib problem, these are a few ccmake settings
(at the root level?) that may be relevant:

CMAKE_EXE_LINKER_FLAGS*   [empty]
CMAKE_SHARED_LINKER_FLAGS*   [empty]

CMAKE_USE_RELATIVE_PATHS   OFF

PYTHON_DEBUG_LIBRARY   /Library/Frameworks/python.framework
PYTHON_ENABLE_MODULE_*  ON
PYTHON_EXECUTABLE
/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5
PYTHON_EXTRA_LIBS   [empty]
PYTHON_INCLUDE_PATH   /Library/Frameworks/Python.framework/Headers
PYTHON_LIBRARY   /Library/Frameworks/Python.framework
PYTHON_MODULE_*   ON
PYTHON_UTIL_LIBRARY   /usr/lib/libutil.dylib

VTK_NO_PYTHON_THREADS   OFF
VTK_PYTHON_SETUP_ARGS   --prefix=${CMAKE_INSTALL_PREFIX}

VTK_USE_RPATH   OFF


Again, thanks!

Darren




On Wed, Sep 3, 2008 at 1:02 AM, Martin Costabel [EMAIL PROTECTED] wrote:

 Darren Weber wrote:
 []

 ImportError: 
 dlopen(/usr/local/lib/python2.5/site-packages/vtk/libvtkCommonPython.so, 
 10): Library not loaded: libvtkCommonPythonD.5.2.dylib
  Referenced from: 
 /usr/local/lib/python2.5/site-packages/vtk/libvtkCommonPython.so
  Reason: image not found

 This is not a problem you can solve with PYTHONPATH. It is not python that is 
 trying to find the dylib, but dlopen(). And dlopen does not look at 
 PYTHONPATH.

 There are several different ways how you can solve this problem (as always on 
 Mac OSX, given its hybrid Unix/NextStep nature):

 The simplest and cleanest way (this is how it is done by the Fink VTK 
 package, for example, perhaps also by macports vtk5) is to build vtk in such 
 a way that its dylibs have decent install_names that correspond to the place 
 where they are installed. In this way, dlopen() finds the dylib without any 
 help, because the full path name (or a correct relative path name) of the 
 dylib is hardcoded inside the libvtkCommonPython.so python module. For 
 example, I get from the command

 otool -L /sw/lib/python2.5/site-packages/vtk/libvtkCommonPython.so |head -n3

 the output:

 /sw/lib/python2.5/site-packages/vtk/libvtkCommonPython.so:
/sw/lib/vtk/libvtkCommonPythonD.5.0.dylib (compatibility version 
 5.0.0, current version 5.0.4)
/sw/lib/vtk/libvtkCommon.5.0.dylib (compatibility version 5.0.0, 
 current version 5.0.4)

 You see the whole path of libvtkCommonPythonD.5.0.dylib there. I am sure in 
 your case, you will see only libvtkCommonPythonD.5.0.dylib, without its 
 path. This is the default when building VTK. If you want to get the correct 
 install_name, you have to build VTK (this is for 5.0, I haven't tried 5.2 
 yet) with the cmake parameters


  -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON \
  -DVTK_USE_RPATH=ON

 Another way to help dlopen, if your VTK is built without install_names for 
 its dylibs, is to use one of the environment variables LD_LIBRARY_PATH, 
 DYLD_FALLBACK_LIBRARY_PATH or DYLD_LIBRARY_PATH (do *not* use the latter, it 
 risks wreaking havoc on your system). See man dlopen.

 --
 Martin


___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] [vtk-developers] problems with VTK python module installation on OSX (after a custom build)

2008-09-03 Thread Darren Weber
 (compatibility version 1.0.0, current version 
1.0.0)
[ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$


It's curious that it has a full path to /usr/local/lib/libpqxx (which
I had to build and install on this system), but it has no full path to
the associated libpq.  I don't fully understand this link dependency,
as I thought libpqxx would be the primary link target and, in turn, it
would link to libpq. (This postgreSQL stuff is another topic on the
list somewhere.)

It's also curious that 'locate' can find the libpq, but dlopen does
not.  So, something about the locate environment of default settings
is different from the dlopen environment, eg:

{{{
[ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$ locate libpq.5.dylib
/Library/PostgreSQL/8.3/lib/libpq.5.dylib
/Library/PostgreSQL/8.3/pgAdmin3.app/Contents/Frameworks/libpq.5.dylib
[ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$
}}}

So, now we modify the DYLD path to find libpq and WHA-LA, the import is working!

{{{
[ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$ export
DYLD_LIBRARY_PATH=/usr/local/lib/vtk-5.2:/Library/PostgreSQL/8.3/lib
[ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$ echo $DYLD_LIBRARY_PATH
/usr/local/lib/vtk-5.2:/Library/PostgreSQL/8.3/lib
[ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$ python
Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53)
[GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
Type help, copyright, credits or license for more information.
 import vtk

}}}


I'll have to double check the default settings on DYLD path for the
system.  This is A fix on this particular system, so the problem
remains for any general OSX distribution to fix this in an elegant
manner.  What would you recommend for a system-wide fix to these path
settings and how would you implement this within cmake?  (Again, I
need to RTFM, it's overdue.  I will persist with OSX.)

Thanks heaps for getting me back on track with OSX!  Power to the people ;-)

Darren


[PS, I suppose I could remove the /Library/Frameworks/Python.framework
installs to fall back on the /System/ python installation, but it
probably makes little difference apart from disk space.  I know it's
not wise to touch the /System area, so that's off limits.  I guess the
only advantage to the /Library installs from python.org is to keep up
with patches and new releases.  Actually I can't decide on whether to
use the binary packages direct from python.org or the macports /opt
installation, the latter seems to provide an option for ipython and
that would be a real bonus.  The macports install may be as close as I
need to get to a source build for python.  I've opted to use macports
rather than fink, but that may be a mistake too ;-)  I do like the
Debian package system, which is the basis for fink.  I just don't know
whether fink is keeping up with things the way that Ubuntu does; it
takes the best of Debian on popular platforms.  I've opted for
macports only because I know they will be specific to the OSX way of
doing things - but why did they choose /opt/ instead of the default
/usr or /usr/local path?  Gheez.]








On Wed, Sep 3, 2008 at 10:16 AM, Prabhu Ramachandran
[EMAIL PROTECTED] wrote:
 Darren Weber wrote:

 I've discovered a minor problem with the VTK python installation (from
 build) on OSX.  I'm basically having library path issues and I don't know
 how to bend VTK build-install to fit OSX python or how to bend OSX python to
 use the default VTK install paths.

 [...]

 However, despite my attempt to get the module installed in the right
 place, I get this traceback during the import:

  [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$ which python

 [...]

 ImportError:
 dlopen(/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/vtk/libvtkCommonPython.so,
 10): Library not loaded: libvtkCommonPythonD.5.2.dylib
  Referenced from:
 /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/vtk/libvtkCommonPython.so
  Reason: image not found
  


 This is where the libvtkCommon* libs are at:

 /usr/local/lib/python2.5/site-packages/vtk/libvtkCommonPython.so
 /usr/local/lib/vtk-5.2/libvtkCommonPythonD.5.2.0.dylib
 /usr/local/lib/vtk-5.2/libvtkCommonPythonD.5.2.dylib
 /usr/local/lib/vtk-5.2/libvtkCommonPythonD.dylib

 Try this:

 export DYLD_LIBRARY_PATH=/usr/local/lib/vtk-5.2

 Then rerun Python and see if import vtk works at all.

 cheers,
 prabhu

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] [vtk-developers] VTK-5-2 and Qt 4.4 build config on OSX

2008-09-03 Thread Darren Weber
Thanks, Clint!

As you say, they provide a separate debug library, ie see:
http://trolltech.com/developer/downloads/qt/mac

qt-mac-opensource-4.4.1.dmg
qt-mac-opensource-4.4.1-debug-libs.dmg (dmg containing ONLY the debug
libraries, only usable with dmg above installed)

I'll check this out and see if it makes any difference to the ccmake settings.

Best, Darren

On Wed, Sep 3, 2008 at 11:36 AM,  [EMAIL PROTECTED] wrote:
 On Wednesday 03 September 2008 12:28:57 pm Darren Weber wrote:
 In ccmake settings for VTK-5-2 with Qt 4.4 on OSX, I see a lot of
 settings like this:

 QT_QTCORE_LIBRARY
 optimized;/Library/Frameworks/QtCore.framework;debug;/Library/Frameworks/Qt
Core.framework QT_QTCORE_LIBRARY_DEBUG   QT_QTCORE_LIBRARY_DEBUG-NOTFOUND

 The optimized and debug libraries are both specified in one variable
 and missing in the other.

 The general build type is RelWithDebInfo.  I don't know if the Qt
 binary installation provides debug symbols (maybe I should build Qt
 4.4 from source?).

 Is this a problem to resolve?


 Its not a problem at all on Mac and Unix/Linux.  As long as you have something
 in QT_QTCORE_LIBRARY, you're fine.  Some versions of Qt have separate debug
 and release libraries on some/all platforms.

 Clint

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] problems with VTK python module installation on OSX (after a custom build)

2008-09-02 Thread Darren Weber
I've discovered a minor problem with the VTK python installation (from
build) on OSX.  I'm basically having library path issues and I don't know
how to bend VTK build-install to fit OSX python or how to bend OSX python to
use the default VTK install paths.


First, some explanation of the OSX python installation(s).

The OSX python installation is a framework that's installed into

/System/Library/Frameworks/Python.framework
AND
/Library/Frameworks/Python.framework

I'm no expert on python installations for OSX, so I'm puzzled, even confused
by the installation polymorphism.  It get's better.  If you use macports,
you can also have an installation somewhere below /opt/local/  Moreover,
each of these installation paths has the capacity for management of multiple
versions of python - that's becoming standard fare on most platforms (I
think).  So, for example, under /Library/ there are a bunch of symlinks
to manage the current version, eg (under the /System path):

weber-mbp:Python root# ls -l
/System/Library/Frameworks/Python.framework/Versions/
total 8
drwxr-xr-x   7 root  wheel  238 Feb 21  2008 2.3
drwxr-xr-x  11 root  wheel  374 Aug 22 17:59 2.5
lrwxr-xr-x   1 root  wheel3 Feb 21  2008 Current - 2.5
weber-mbp:Python root#

AND (under the /Library path):

weber-mbp:Python root# ls -l /Library/Frameworks/Python.framework/
total 24
lrwxr-xr-x  1 root  admin   24 Aug 29 16:13 Headers -
Versions/Current/Headers
lrwxr-xr-x  1 root  admin   23 Aug 29 16:13 Python -
Versions/Current/Python
lrwxr-xr-x  1 root  admin   26 Aug 29 16:13 Resources -
Versions/Current/Resources
drwxr-xr-x  4 root  admin  136 Feb 21  2008 Versions
weber-mbp:Python root# ls -l /Library/Frameworks/Python.framework/Versions/
total 8
drwxrwxr-x  10 admin  admin  340 Feb 21  2008 2.5
lrwxr-xr-x   1 root   admin3 Aug 29 16:13 Current - 2.5


As far as I can tell, there are no symlinks between these installations to a
common path, so they appear to be entirely independent installations.
That's probably to protect the system installation from other library
installations (eg, I downloaded an install package directly from the
python.org site and I think it installs into the /Library path).


NOW, the VTK installation script sets the --prefix=/usr/local/ when doing
the install.  In my case, the install command was echoed to the screen
during 'make install' as follows:

running cd /Users/dweber/src/kitware/VTK_build/Wrapping/Python 
/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5 setup.py
install --prefix=/usr/local  21

So this is the only site-package in the /usr/local python path, ie:

[ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$ ll
/usr/local/lib/python2.5/site-packages/
total 4.0K
-rw-r--r--  1 root wheel  248 Sep  2 14:42 VTK-5.2.0-py2.5.egg-info
drwxr-xr-x 54 root wheel 1.8K Sep  2 14:42 vtk/

That is, it seems this is not the default installation path for python
modules on OSX.  So, when I started the default python shell and tried to
import vtk, it failed with a message about no module found :-(

I then took some care to specify my default python installation for the bash
shell (I chose to use the /Library/... path as my default).  I then double
checked this setting in the ccmake config and ran the build again.  This
time, I noticed that the installation went into /usr/local again.  Then I
ran a post-install command as root:

# cd VTK_build_path/Wrapping/Python/
# /Library/Frameworks/Python.framework/Versions/Current/bin/python setup.py
install 21

Without the --prefix option for the installation, this installed into the
/Library/... path, ie:

/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/vtk


However, despite my attempt to get the module installed in the right
place, I get this traceback during the import:

 [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$ which python
/Library/Frameworks/Python.framework/Versions/Current/bin/python
[ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$
[ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$ python
Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53)
[GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
Type help, copyright, credits or license for more information.
 import vtk
Traceback (most recent call last):
  File stdin, line 1, in module
  File
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/vtk/__init__.py,
line 41, in module
from common import *
  File
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/vtk/common.py,
line 7, in module
from libvtkCommonPython import *
ImportError:
dlopen(/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/vtk/libvtkCommonPython.so,
10): Library not loaded: libvtkCommonPythonD.5.2.dylib
  Referenced from:
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/vtk/libvtkCommonPython.so
  Reason: image not found



This is where the libvtkCommon* libs are at:


Re: [CMake] problems with VTK python module installation on OSX (after a custom build)

2008-09-02 Thread Darren Weber
I've tried to bend python a little using the sys.path, but this also fails:


[ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$ pythonPython 2.5.2
(r252:60911, Feb 22 2008, 07:57:53)
[GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
Type help, copyright, credits or license for more information.
 import sys
 sys.path.append('/usr/local/lib/python2.5/site-packages')
 print sys.path
['', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python25.zip',
'/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5',
'/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-darwin',
'/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac',
'/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/lib-scriptpackages',
'/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-tk',
'/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload',
'/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages',
'/usr/local/lib/python2.5/site-packages']

 import vtk
Traceback (most recent call last):
  File stdin, line 1, in module
  File /usr/local/lib/python2.5/site-packages/vtk/__init__.py, line 41, in
module
from common import *
  File /usr/local/lib/python2.5/site-packages/vtk/common.py, line 7, in
module
from libvtkCommonPython import *
ImportError:
dlopen(/usr/local/lib/python2.5/site-packages/vtk/libvtkCommonPython.so,
10): Library not loaded: libvtkCommonPythonD.5.2.dylib
  Referenced from:
/usr/local/lib/python2.5/site-packages/vtk/libvtkCommonPython.so
  Reason: image not found







On Tue, Sep 2, 2008 at 3:35 PM, Darren Weber
[EMAIL PROTECTED]wrote:


 I've discovered a minor problem with the VTK python installation (from
 build) on OSX.  I'm basically having library path issues and I don't know
 how to bend VTK build-install to fit OSX python or how to bend OSX python to
 use the default VTK install paths.


 First, some explanation of the OSX python installation(s).

 The OSX python installation is a framework that's installed into

 /System/Library/Frameworks/Python.framework
 AND
 /Library/Frameworks/Python.framework

 I'm no expert on python installations for OSX, so I'm puzzled, even
 confused by the installation polymorphism.  It get's better.  If you use
 macports, you can also have an installation somewhere below /opt/local/
 Moreover, each of these installation paths has the capacity for management
 of multiple versions of python - that's becoming standard fare on most
 platforms (I think).  So, for example, under /Library/ there are a bunch
 of symlinks to manage the current version, eg (under the /System path):

 weber-mbp:Python root# ls -l
 /System/Library/Frameworks/Python.framework/Versions/
 total 8
 drwxr-xr-x   7 root  wheel  238 Feb 21  2008 2.3
 drwxr-xr-x  11 root  wheel  374 Aug 22 17:59 2.5
 lrwxr-xr-x   1 root  wheel3 Feb 21  2008 Current - 2.5
 weber-mbp:Python root#

 AND (under the /Library path):

 weber-mbp:Python root# ls -l /Library/Frameworks/Python.framework/
 total 24
 lrwxr-xr-x  1 root  admin   24 Aug 29 16:13 Headers -
 Versions/Current/Headers
 lrwxr-xr-x  1 root  admin   23 Aug 29 16:13 Python -
 Versions/Current/Python
 lrwxr-xr-x  1 root  admin   26 Aug 29 16:13 Resources -
 Versions/Current/Resources
 drwxr-xr-x  4 root  admin  136 Feb 21  2008 Versions
 weber-mbp:Python root# ls -l /Library/Frameworks/Python.framework/Versions/
 total 8
 drwxrwxr-x  10 admin  admin  340 Feb 21  2008 2.5
 lrwxr-xr-x   1 root   admin3 Aug 29 16:13 Current - 2.5


 As far as I can tell, there are no symlinks between these installations to
 a common path, so they appear to be entirely independent installations.
 That's probably to protect the system installation from other library
 installations (eg, I downloaded an install package directly from the
 python.org site and I think it installs into the /Library path).


 NOW, the VTK installation script sets the --prefix=/usr/local/ when doing
 the install.  In my case, the install command was echoed to the screen
 during 'make install' as follows:

 running cd /Users/dweber/src/kitware/VTK_build/Wrapping/Python 
 /Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5 setup.py
 install --prefix=/usr/local  21

 So this is the only site-package in the /usr/local python path, ie:

 [ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$ ll
 /usr/local/lib/python2.5/site-packages/
 total 4.0K
 -rw-r--r--  1 root wheel  248 Sep  2 14:42 VTK-5.2.0-py2.5.egg-info
 drwxr-xr-x 54 root wheel 1.8K Sep  2 14:42 vtk/

 That is, it seems this is not the default installation path for python
 modules on OSX.  So, when I started the default python shell and tried to
 import vtk, it failed with a message about no module found :-(

 I then took some care to specify my default python installation for the
 bash shell (I chose to use the /Library/... path as my default).  I then
 double checked this setting in the ccmake config and ran

Re: [CMake] problems with VTK python module installation on OSX (after a custom build)

2008-09-02 Thread Darren Weber
For the record, this page may provide the answer to appending the PYTHONPATH
on OSX
http://developer.apple.com/qa/qa2001/qa1067.html


On Tue, Sep 2, 2008 at 3:49 PM, Darren Weber
[EMAIL PROTECTED]wrote:


 I've tried to bend python a little using the sys.path, but this also fails:


 [ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$ pythonPython 2.5.2
 (r252:60911, Feb 22 2008, 07:57:53)
 [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
 Type help, copyright, credits or license for more information.
  import sys
  sys.path.append('/usr/local/lib/python2.5/site-packages')
  print sys.path
 ['', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python25.zip',
 '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5',
 '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-darwin',
 '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac',
 '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/lib-scriptpackages',
 '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-tk',
 '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload',
 '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages',
 '/usr/local/lib/python2.5/site-packages']
 
  import vtk
 Traceback (most recent call last):
   File stdin, line 1, in module
   File /usr/local/lib/python2.5/site-packages/vtk/__init__.py, line 41,
 in module
 from common import *
   File /usr/local/lib/python2.5/site-packages/vtk/common.py, line 7, in
 module
 from libvtkCommonPython import *
 ImportError:
 dlopen(/usr/local/lib/python2.5/site-packages/vtk/libvtkCommonPython.so,
 10): Library not loaded: libvtkCommonPythonD.5.2.dylib
   Referenced from:
 /usr/local/lib/python2.5/site-packages/vtk/libvtkCommonPython.so
   Reason: image not found

 






 On Tue, Sep 2, 2008 at 3:35 PM, Darren Weber [EMAIL PROTECTED]
  wrote:


 I've discovered a minor problem with the VTK python installation (from
 build) on OSX.  I'm basically having library path issues and I don't know
 how to bend VTK build-install to fit OSX python or how to bend OSX python to
 use the default VTK install paths.


 First, some explanation of the OSX python installation(s).

 The OSX python installation is a framework that's installed into

 /System/Library/Frameworks/Python.framework
 AND
 /Library/Frameworks/Python.framework

 I'm no expert on python installations for OSX, so I'm puzzled, even
 confused by the installation polymorphism.  It get's better.  If you use
 macports, you can also have an installation somewhere below /opt/local/
 Moreover, each of these installation paths has the capacity for management
 of multiple versions of python - that's becoming standard fare on most
 platforms (I think).  So, for example, under /Library/ there are a bunch
 of symlinks to manage the current version, eg (under the /System path):

 weber-mbp:Python root# ls -l
 /System/Library/Frameworks/Python.framework/Versions/
 total 8
 drwxr-xr-x   7 root  wheel  238 Feb 21  2008 2.3
 drwxr-xr-x  11 root  wheel  374 Aug 22 17:59 2.5
 lrwxr-xr-x   1 root  wheel3 Feb 21  2008 Current - 2.5
 weber-mbp:Python root#

 AND (under the /Library path):

 weber-mbp:Python root# ls -l /Library/Frameworks/Python.framework/
 total 24
 lrwxr-xr-x  1 root  admin   24 Aug 29 16:13 Headers -
 Versions/Current/Headers
 lrwxr-xr-x  1 root  admin   23 Aug 29 16:13 Python -
 Versions/Current/Python
 lrwxr-xr-x  1 root  admin   26 Aug 29 16:13 Resources -
 Versions/Current/Resources
 drwxr-xr-x  4 root  admin  136 Feb 21  2008 Versions
 weber-mbp:Python root# ls -l
 /Library/Frameworks/Python.framework/Versions/
 total 8
 drwxrwxr-x  10 admin  admin  340 Feb 21  2008 2.5
 lrwxr-xr-x   1 root   admin3 Aug 29 16:13 Current - 2.5


 As far as I can tell, there are no symlinks between these installations to
 a common path, so they appear to be entirely independent installations.
 That's probably to protect the system installation from other library
 installations (eg, I downloaded an install package directly from the
 python.org site and I think it installs into the /Library path).


 NOW, the VTK installation script sets the --prefix=/usr/local/ when
 doing the install.  In my case, the install command was echoed to the screen
 during 'make install' as follows:

 running cd /Users/dweber/src/kitware/VTK_build/Wrapping/Python 
 /Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5 setup.py
 install --prefix=/usr/local  21

 So this is the only site-package in the /usr/local python path, ie:

 [ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$ ll
 /usr/local/lib/python2.5/site-packages/
 total 4.0K
 -rw-r--r--  1 root wheel  248 Sep  2 14:42 VTK-5.2.0-py2.5.egg-info
 drwxr-xr-x 54 root wheel 1.8K Sep  2 14:42 vtk/

 That is, it seems this is not the default installation path for python
 modules on OSX.  So, when I started the default python shell and tried to
 import vtk, it failed

Re: [CMake] problems with VTK python module installation on OSX (after a custom build)

2008-09-02 Thread Darren Weber
Well, maybe not.  Even after adding a value to ~/.MacOSX/environment.plist,
the library load problem persists.

[ [EMAIL PROTECTED] ~ ]$ echo $PYTHONPATH
/usr/local/lib/python2.5/site-packages
[ [EMAIL PROTECTED] ~ ]$
[ [EMAIL PROTECTED] ~ ]$ python
Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53)
[GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
Type help, copyright, credits or license for more information.
 import vtk
Traceback (most recent call last):
  File stdin, line 1, in module
  File /usr/local/lib/python2.5/site-packages/vtk/__init__.py, line 41, in
module
from common import *
  File /usr/local/lib/python2.5/site-packages/vtk/common.py, line 7, in
module
from libvtkCommonPython import *
ImportError:
dlopen(/usr/local/lib/python2.5/site-packages/vtk/libvtkCommonPython.so,
10): Library not loaded: libvtkCommonPythonD.5.2.dylib
  Referenced from:
/usr/local/lib/python2.5/site-packages/vtk/libvtkCommonPython.so
  Reason: image not found
 import sys
 print sys.path
['', '/usr/local/lib/python2.5/site-packages',
'/Library/Frameworks/Python.framework/Versions/2.5/lib/python25.zip',
'/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5',
'/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-darwin',
'/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac',
'/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/lib-scriptpackages',
'/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-tk',
'/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload',
'/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages']

[ [EMAIL PROTECTED] ~ ]$




On Tue, Sep 2, 2008 at 5:29 PM, Darren Weber
[EMAIL PROTECTED]wrote:


 For the record, this page may provide the answer to appending the
 PYTHONPATH on OSX
 http://developer.apple.com/qa/qa2001/qa1067.html



 On Tue, Sep 2, 2008 at 3:49 PM, Darren Weber [EMAIL PROTECTED]
  wrote:


 I've tried to bend python a little using the sys.path, but this also
 fails:


 [ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$ pythonPython 2.5.2
 (r252:60911, Feb 22 2008, 07:57:53)
 [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
 Type help, copyright, credits or license for more information.
  import sys
  sys.path.append('/usr/local/lib/python2.5/site-packages')
  print sys.path
 ['', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python25.zip',
 '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5',
 '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-darwin',
 '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac',
 '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/lib-scriptpackages',
 '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-tk',
 '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload',
 '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages',
 '/usr/local/lib/python2.5/site-packages']
 
  import vtk
 Traceback (most recent call last):
   File stdin, line 1, in module
   File /usr/local/lib/python2.5/site-packages/vtk/__init__.py, line 41,
 in module
 from common import *
   File /usr/local/lib/python2.5/site-packages/vtk/common.py, line 7, in
 module
 from libvtkCommonPython import *
 ImportError:
 dlopen(/usr/local/lib/python2.5/site-packages/vtk/libvtkCommonPython.so,
 10): Library not loaded: libvtkCommonPythonD.5.2.dylib
   Referenced from:
 /usr/local/lib/python2.5/site-packages/vtk/libvtkCommonPython.so
   Reason: image not found

 






 On Tue, Sep 2, 2008 at 3:35 PM, Darren Weber 
 [EMAIL PROTECTED] wrote:


 I've discovered a minor problem with the VTK python installation (from
 build) on OSX.  I'm basically having library path issues and I don't know
 how to bend VTK build-install to fit OSX python or how to bend OSX python to
 use the default VTK install paths.


 First, some explanation of the OSX python installation(s).

 The OSX python installation is a framework that's installed into

 /System/Library/Frameworks/Python.framework
 AND
 /Library/Frameworks/Python.framework

 I'm no expert on python installations for OSX, so I'm puzzled, even
 confused by the installation polymorphism.  It get's better.  If you use
 macports, you can also have an installation somewhere below /opt/local/
 Moreover, each of these installation paths has the capacity for management
 of multiple versions of python - that's becoming standard fare on most
 platforms (I think).  So, for example, under /Library/ there are a bunch
 of symlinks to manage the current version, eg (under the /System path):

 weber-mbp:Python root# ls -l
 /System/Library/Frameworks/Python.framework/Versions/
 total 8
 drwxr-xr-x   7 root  wheel  238 Feb 21  2008 2.3
 drwxr-xr-x  11 root  wheel  374 Aug 22 17:59 2.5
 lrwxr-xr-x   1 root  wheel3 Feb 21  2008 Current - 2.5
 weber-mbp:Python root#

 AND (under

Re: [CMake] [vtk-developers] python, postgreSQL, VTK build

2008-08-30 Thread Darren Weber
With some manual tweaks, I got the following cmake variable settings:

POSTGRES_INCLUDE_DIRECTORIES
/Library/PostgreSQL/8.3/include

 POSTGRES_LIBRARIES
/Library/PostgreSQL/8.3/lib/libpq.dylib

 PQXX_HEADER_PATH
/usr/local/include

 PQXX_INCLUDE_DIRECTORIES
/usr/local/include;/Library/PostgreSQL/8.3/include

 PQXX_LIBRARIES
/usr/local/lib/libpqxx.dylib;/Library/PostgreSQL/8.3/lib/libpq.dylib

 PQXX_LIBRARY /usr/local/lib/libpqxx.dylib



With this, it will configure and generate without warnings.  I hope the
build works ;-)




On Fri, Aug 29, 2008 at 1:45 PM, David Cole [EMAIL PROTECTED] wrote:

 Including the libpq.dylib at the end. It's a full path to a file.


 On Fri, Aug 29, 2008 at 4:45 PM, David Cole [EMAIL PROTECTED]wrote:

 Set POSTGRES_LIBRARIES to the full path to the pq dylib...


 On Fri, Aug 29, 2008 at 4:39 PM, Darren Weber 
 [EMAIL PROTECTED] wrote:


 For my install of PGSQL, I had to build pqxx from source and I have the
 following libraries:

 [ [EMAIL PROTECTED] ~/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/
 [ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$
 [ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$ ls /usr/local/lib/libpqxx*
 /usr/local/lib/libpqxx-3.0.0.dylib*  /usr/local/lib/libpqxx.a
 /usr/local/lib/libpqxx.dylib@  /usr/local/lib/libpqxx.la*
 [ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$


 This is what I see for a VTK-5-2 checkout in VTK/IO/CMakeLists.txt (just
 the PGSQL section):


 #-
 # PostgreSQL
 # build the PostgreSQL database backend (if the PostgresSQL and pqxx
 libraries are available)
 #
 OPTION( VTK_USE_POSTGRES Build the PostgreSQL driver for
 vtkSQLDatabase. OFF)
 MARK_AS_ADVANCED(VTK_USE_POSTGRES)
 IF ( VTK_USE_POSTGRES )
   FIND_PACKAGE( PQXX REQUIRED )
   IF ( BUILD_TESTING )
 SET ( VTK_PSQL_TEST_URL  CACHE STRING A URL for a PostgreSQL
 server of the form psql://[[username[:[EMAIL PROTECTED]:port]]/[dbname]
 )
   ENDIF ( BUILD_TESTING )
 ENDIF ( VTK_USE_POSTGRES )
 #
 # Only include the Postgres backend if the user has explicitly turned on
 # VTK_USE_POSTGRES. If so, user must also have set POSTGRES_LIBRARIES
 # and POSTGRES_INCLUDE_DIRECTORIES to valid values.
 IF ( VTK_USE_POSTGRES AND PQXX_FOUND )
   INCLUDE_DIRECTORIES( ${PQXX_INCLUDE_DIRECTORIES} )
   SET( Kit_SRCS
 ${Kit_SRCS}
 vtkPostgreSQLDatabase.cxx
 vtkPostgreSQLQuery.cxx
   )
   LINK_LIBRARIES( ${PQXX_LIBRARIES} )
 ENDIF ( VTK_USE_POSTGRES AND PQXX_FOUND )


 #-


 So I changed the LINK_LIBRARIES as suggested and I'm running ccmake in
 the same build (I don't want to scrap it and lose the cache completely, it
 has a lot of settings that I need).  So now ccmake is finding:

 PQXX_HEADER_PATH /usr/local/include
 PQXX_LIBRARY
 /usr/local/lib/libpqxx.dylib

 PQXX_INCLUDE_DIRECTORIES /usr/local/include
 PQXX_LIBRARIES   /usr/local/lib/libpqxx.dylib

 POSTGRES_INCLUDE_DIRECTORIES
 /opt/local/include/postgresql83

 POSTGRES_LIBRARIES
 /opt/local/lib/postgresql83


 In my case, I first installed PGSQL with macports and then removed it
 using macports.  So, ccmake has a stale entry that is not updated when I run
 it again.  I should probably scrap this build directory and start again.
 Maybe there is a way to ensure ccmake double-checks the cache entries?  That
 might be easier, because a lot of this build is already done.  It should be
 finding the /Library/PostgreSQL/ path, which is what I used to build the
 pqxx library (there was no pqxx in macports).

 So, I've tried to manually change the POSTGRES* paths to:

 POSTGRES_INCLUDE_DIRECTORIES /Library/PostgreSQL/8.3/include
 POSTGRES_LIBRARIES /Library/PostgreSQL/8.3/lib

 However, I got a stack of warnings at the end of the generation (for most
 vtk components):

 WARNING: Target vtkIO requests linking to directory
 /Library/PostgreSQL/8.3/lib.  Targets may link only to libraries.  CMake
 is dropping the entry.


 So then I set all the PGSQL and PQXX paths to an empty value and I
 toggled off and on VTK_USE_POSTGRESQL and it came back with:

 PQXX NOT FOUND

 and the PGSQL paths remained empty.  I'm stumbling around in the dark :-(

 Thanks!








 On Fri, Aug 29, 2008 at 12:57 PM, David Cole [EMAIL PROTECTED]wrote:

 As David Thompson rightfully pointed out, we should not be using
 LINK_LIBRARIES in VTK's CMakeLists.txt files.
 Change the LINK_LIBRARIES statement in VTK/IO/CMakeLists.txt to:
 SET(KIT_LIBS ${KIT_LIBS} ${POSTGRES_LIBRARIES})

 and make sure

[CMake] Fwd: [vtk-developers] python, postgreSQL, VTK build

2008-08-29 Thread Darren Weber
Please see thread below on OS X link issue for VTK and PostgreSQL (using
binary install).

-- Forwarded message --
From: David Cole [EMAIL PROTECTED]
Date: Fri, Aug 29, 2008 at 10:58 AM
Subject: Re: [vtk-developers] python, postgreSQL, VTK build
To: Darren Weber [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED] [EMAIL PROTECTED]


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? 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 [EMAIL PROTECTED]


 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 
 [EMAIL PROTECTED] 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/*

 [ [EMAIL PROTECTED] ~/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/
 [ [EMAIL PROTECTED] ~/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
 [EMAIL PROTECTED]
 http://www.vtk.org/mailman/listinfo/vtk-developers


___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] [vtk-developers] python, postgreSQL, VTK build

2008-08-29 Thread Darren Weber
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/*

I started looking into dyld, but I'm not sure that's the problem here.

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.

Thanks!


On Fri, Aug 29, 2008 at 12:24 PM, David Thompson [EMAIL PROTECTED] wrote:

 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 [EMAIL PROTECTED]
 
  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
  [EMAIL PROTECTED] 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/*
 
  [ [EMAIL PROTECTED] ~/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.alibpgtypes.a
  libpq.5.dylib@ postgresql/
  [ [EMAIL PROTECTED] ~/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
  [EMAIL PROTECTED]
  http://www.vtk.org/mailman/listinfo/vtk-developers
 
 
 



___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] [vtk-developers] python, postgreSQL, VTK build

2008-08-29 Thread Darren Weber
For my install of PGSQL, I had to build pqxx from source and I have the
following libraries:

[ [EMAIL PROTECTED] ~/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/
[ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$
[ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$ ls /usr/local/lib/libpqxx*
/usr/local/lib/libpqxx-3.0.0.dylib*  /usr/local/lib/libpqxx.a
/usr/local/lib/libpqxx.dylib@  /usr/local/lib/libpqxx.la*
[ [EMAIL PROTECTED] ~/src/kitware/VTK_build ]$


This is what I see for a VTK-5-2 checkout in VTK/IO/CMakeLists.txt (just the
PGSQL section):

#-
# PostgreSQL
# build the PostgreSQL database backend (if the PostgresSQL and pqxx
libraries are available)
#
OPTION( VTK_USE_POSTGRES Build the PostgreSQL driver for vtkSQLDatabase.
OFF)
MARK_AS_ADVANCED(VTK_USE_POSTGRES)
IF ( VTK_USE_POSTGRES )
  FIND_PACKAGE( PQXX REQUIRED )
  IF ( BUILD_TESTING )
SET ( VTK_PSQL_TEST_URL  CACHE STRING A URL for a PostgreSQL server
of the form psql://[[username[:[EMAIL PROTECTED]:port]]/[dbname] )
  ENDIF ( BUILD_TESTING )
ENDIF ( VTK_USE_POSTGRES )
#
# Only include the Postgres backend if the user has explicitly turned on
# VTK_USE_POSTGRES. If so, user must also have set POSTGRES_LIBRARIES
# and POSTGRES_INCLUDE_DIRECTORIES to valid values.
IF ( VTK_USE_POSTGRES AND PQXX_FOUND )
  INCLUDE_DIRECTORIES( ${PQXX_INCLUDE_DIRECTORIES} )
  SET( Kit_SRCS
${Kit_SRCS}
vtkPostgreSQLDatabase.cxx
vtkPostgreSQLQuery.cxx
  )
  LINK_LIBRARIES( ${PQXX_LIBRARIES} )
ENDIF ( VTK_USE_POSTGRES AND PQXX_FOUND )

#-


So I changed the LINK_LIBRARIES as suggested and I'm running ccmake in the
same build (I don't want to scrap it and lose the cache completely, it has a
lot of settings that I need).  So now ccmake is finding:

PQXX_HEADER_PATH /usr/local/include
PQXX_LIBRARY
/usr/local/lib/libpqxx.dylib

PQXX_INCLUDE_DIRECTORIES /usr/local/include
PQXX_LIBRARIES   /usr/local/lib/libpqxx.dylib

POSTGRES_INCLUDE_DIRECTORIES
/opt/local/include/postgresql83

POSTGRES_LIBRARIES
/opt/local/lib/postgresql83


In my case, I first installed PGSQL with macports and then removed it using
macports.  So, ccmake has a stale entry that is not updated when I run it
again.  I should probably scrap this build directory and start again.  Maybe
there is a way to ensure ccmake double-checks the cache entries?  That might
be easier, because a lot of this build is already done.  It should be
finding the /Library/PostgreSQL/ path, which is what I used to build the
pqxx library (there was no pqxx in macports).

So, I've tried to manually change the POSTGRES* paths to:

POSTGRES_INCLUDE_DIRECTORIES /Library/PostgreSQL/8.3/include
POSTGRES_LIBRARIES /Library/PostgreSQL/8.3/lib

However, I got a stack of warnings at the end of the generation (for most
vtk components):

WARNING: Target vtkIO requests linking to directory
/Library/PostgreSQL/8.3/lib.  Targets may link only to libraries.  CMake
is dropping the entry.


So then I set all the PGSQL and PQXX paths to an empty value and I toggled
off and on VTK_USE_POSTGRESQL and it came back with:

PQXX NOT FOUND

and the PGSQL paths remained empty.  I'm stumbling around in the dark :-(

Thanks!







On Fri, Aug 29, 2008 at 12:57 PM, David Cole [EMAIL PROTECTED] wrote:

 As David Thompson rightfully pointed out, we should not be using
 LINK_LIBRARIES in VTK's CMakeLists.txt files.
 Change the LINK_LIBRARIES statement in VTK/IO/CMakeLists.txt to:
 SET(KIT_LIBS ${KIT_LIBS} ${POSTGRES_LIBRARIES})

 and make sure that POSTGRES_LIBRARIES has the full path to pq in it, and it
 should work.

 Let us know if it works, and we will commit that change to CVS HEAD in VTK.


 Thanks,
 David Cole


 On Fri, Aug 29, 2008 at 3:51 PM, Darren Weber 
 [EMAIL PROTECTED] wrote:


 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

Re: [CMake] [vtk-developers] python, postgreSQL, VTK build

2008-08-29 Thread Darren Weber
I downloaded libpqxx-2.6.9.tar.gz and build in /usr/src/libpqxx-2.6.9

Before doing anything, we have /usr/src/pqxx-2.6.9/include/pqxx/config.h.inwith:

/* Define if the compiler supports the standard long double type */
#undef PQXX_HAVE_LONG_DOUBLE

/* Define if the compiler supports long long types */
#undef PQXX_HAVE_LONG_LONG

I then prepare to run 'configure' to ensure it can find pg_config, as:

# export PATH=${PATH}:/Library/PostgreSQL/8.3/bin
# which pg_config
/Library/PostgreSQL/8.3/bin/pg_config

I then run configure:

After 'configure --enable-shared' there is include/pqxx/config.h

/* Define if the compiler supports the standard long double type */
#define PQXX_HAVE_LONG_DOUBLE 1

/* Define if the compiler supports long long types */
#define PQXX_HAVE_LONG_LONG 1

So it looks like it's enabled.  I then run:

# make
# make install

That takes care of the shared library for pqxx:

[ [EMAIL PROTECTED] /usr/src/libpqxx-2.6.9 ]# ll /usr/local/lib/libpqxx*
-rwxr-xr-x 1 root wheel 464K 2008-08-29 15:49
/usr/local/lib/libpqxx-2.6.9.dylib*
-rwxr-xr-x 1 root wheel 475K 2008-08-28 15:37
/usr/local/lib/libpqxx-3.0.0.dylib*
-rw-r--r-- 1 root wheel 3.8M 2008-08-29 15:49 /usr/local/lib/libpqxx.a
lrwxr-xr-x 1 root wheel   19 2008-08-29 15:49 /usr/local/lib/libpqxx.dylib
- libpqxx-2.6.9.dylib*
-rwxr-xr-x 1 root wheel  863 2008-08-29 15:49 /usr/local/lib/libpqxx.la*
[ [EMAIL PROTECTED] /usr/src/libpqxx-2.6.9 ]#


I still have a 3.0 dylib, but the default symlink points to the 2.6.9
version, so that should be fine.

A thousand thanks!  (What's next? Oh yea, back to building VTK with PGSQL!)





On Fri, Aug 29, 2008 at 3:13 PM, David C Thompson [EMAIL PROTECTED]wrote:


  My prior build for libpqxx was:
 
  ./configure --enable-shared
  make
  sudo make install
 
  So now I have pqxx 2.6.9, but how do I enable the LONG_LONG support?

 Just make sure that the configure script reported checking for long
 long: yes instead of checking for long long: no. If your pqxx build
 directory contains include/pqxx/config.h with this line in it:
  #define PQXX_HAVE_LONG_LONG 1
 then your libpqxx build should be OK.

David



___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

[CMake] MEMORYCHECK_COMMAND

2008-08-26 Thread Darren Weber
What is CMake variable: MEMORYCHECK_COMMAND ?

I'm compiling on OSX 10.5 and this variable is undefined (command not
found); should I install something for this?

Thanks, Darren
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

[CMake] libcmcurl no symbols - building CMake Utilities

2008-08-22 Thread Darren Weber
Should I be concerned about this note of no symbols in libcmcurl?

Scanning dependencies of target cmcurl
[ 14%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/base64.o
[ 14%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/connect.o
[ 15%] Building C object
Utilities/cmcurl/CMakeFiles/cmcurl.dir/content_encoding.o
[ 15%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/cookie.o
[ 15%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/dict.o
[ 15%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/easy.o
[ 16%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/escape.o
[ 16%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/file.o
[ 16%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/formdata.o
[ 17%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/ftp.o
[ 17%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/getenv.o
[ 17%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/getinfo.o
[ 18%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/gtls.o
[ 18%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/hash.o
[ 18%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/hostares.o
[ 19%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/hostasyn.o
[ 19%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/hostip4.o
[ 19%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/hostip6.o
[ 20%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/hostip.o
[ 20%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/hostsyn.o
[ 20%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/hostthre.o
[ 21%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/http.o
[ 21%] Building C object
Utilities/cmcurl/CMakeFiles/cmcurl.dir/http_chunks.o
[ 21%] Building C object
Utilities/cmcurl/CMakeFiles/cmcurl.dir/http_digest.o
[ 21%] Building C object
Utilities/cmcurl/CMakeFiles/cmcurl.dir/http_negotiate.o
[ 22%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/http_ntlm.o
[ 22%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/if2ip.o
[ 22%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/inet_ntop.o
[ 23%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/inet_pton.o
[ 23%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/krb4.o
[ 23%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/ldap.o
[ 24%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/llist.o
[ 24%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/md5.o
[ 24%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/mprintf.o
[ 25%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/multi.o
[ 25%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/netrc.o
[ 25%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/parsedate.o
[ 26%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/progress.o
[ 26%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/security.o
[ 26%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/select.o
[ 26%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/sendf.o
[ 27%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/share.o
[ 27%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/socks.o
[ 27%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/speedcheck.o
[ 28%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/splay.o
[ 28%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/ssh.o
[ 28%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/sslgen.o
[ 29%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/ssluse.o
[ 29%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/strdup.o
[ 29%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/strequal.o
[ 30%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/strerror.o
[ 30%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/telnet.o
[ 30%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/tftp.o
[ 31%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/timeval.o
[ 31%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/transfer.o
[ 31%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/url.o
[ 32%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/version.o
Linking C static library libcmcurl.a
ranlib: file: libcmcurl.a(content_encoding.o) has no symbols
ranlib: file: libcmcurl.a(gtls.o) has no symbols
ranlib: file: libcmcurl.a(hostares.o) has no symbols
ranlib: file: libcmcurl.a(hostasyn.o) has no symbols
ranlib: file: libcmcurl.a(hostip6.o) has no symbols
ranlib: file: libcmcurl.a(hostthre.o) has no symbols
ranlib: file: libcmcurl.a(http_negotiate.o) has no symbols
ranlib: file: libcmcurl.a(http_ntlm.o) has no symbols
ranlib: file: libcmcurl.a(inet_pton.o) has no symbols
ranlib: file: libcmcurl.a(krb4.o) has no symbols
ranlib: file: libcmcurl.a(ldap.o) has no symbols
ranlib: file: libcmcurl.a(security.o) has no symbols
ranlib: file: 

[CMake] KWstyle executable?

2008-08-22 Thread Darren Weber
For a CMake build, I would like to enable KWstyle, but it can't find an
executable.  Is this available for OSX (Leopard)?

Thanks, Darren
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] KWstyle executable?

2008-08-22 Thread Darren Weber
OK, I have the cvs checkout (no release tags used).  I used default build
options for a Release and it builds on OSX Leopard; in my case:
Darwin elegans.buckcenter.org 9.4.0 Darwin Kernel Version 9.4.0: Mon Jun  9
19:30:53 PDT 2008; root:xnu-1228.5.20~1/RELEASE_I386 i386

Just FYI, there is a CMake warning about the min version:

 CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

 cmake_minimum_required(VERSION 2.6)

   should be added at the top of the file.  The version specified may be
lower
   if you wish to support older CMake versions for this project.  For more
   information run cmake --help-policy CMP.
 This warning is for project developers.  Use -Wno-dev to suppress it.



I'm curious about how to package this as a binary for distribution to other
machines that I'm working on.  What should I read to learn about creating
OSX binary packages with cmake?  I have the book on mastering CMake, so it
looks like Chapter 5 will cover the details.  The tutorial in Chpt 12 is
fairly light.  Is there anything else I should take a look at?

Thanks!



On Fri, Aug 22, 2008 at 12:38 PM, David Cole [EMAIL PROTECTED] wrote:

 There is not a pre-built Mac installer available, but you can download the
 zip file of the source tree from here and build it:
 http://public.kitware.com/KWStyle/download.htm

 Or you can get the source from CVS and build it. It builds with CMake and
 it's a very quick build.

 Let us know if you have any problems building it or using it.


 David


 On Fri, Aug 22, 2008 at 2:53 PM, Darren Weber 
 [EMAIL PROTECTED] wrote:


 For a CMake build, I would like to enable KWstyle, but it can't find an
 executable.  Is this available for OSX (Leopard)?

 Thanks, Darren


 ___
 CMake mailing list
 CMake@cmake.org
 http://www.cmake.org/mailman/listinfo/cmake



___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

[CMake] 64bit programming

2008-08-22 Thread Darren Weber
I guess this is a real can of worms, but I have to ask because I'm a
relative noooby in the compiled software domain (too many years using
interpreted languages).

What are the traps and tricks for 64bit programming with CMake and other
kitware libraries?

What is the easiest way to create source trees that will compile for 32bit
or 64bit applications?  Can it be as simple as ifdefs in one or two headers?

Thanks, Darren
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

[CMake] CMake build: CMAKE_OBJCOPY?

2008-08-22 Thread Darren Weber
What is CMAKE_OBJCOPY and CMAKE_OBJDUMP? They are not found on my system. I
don't see an entry in the book index for these variables.

Thanks, Darren
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

[CMake] CMake build: CPACK variables

2008-08-22 Thread Darren Weber
When building CMake, there are options to enable CPACK_BINARY_* and
CPACK_SOURCE_*; are these options switching on functionality within CMake or
are they creating packages of the current CMake build?  I'm guessing they do
the latter, is that right?

Thanks, Darren
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

[CMake] BUILD_DOCUMENTATION vs. BUILD_DOXYGEN

2008-08-21 Thread Darren Weber
What's the difference between the CMake options:

BUILD_DOCUMENTATION vs. BUILD_DOXYGEN
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] command line build and install on OSX

2008-08-19 Thread Darren Weber
This script is working for me on OSX.  It over-writes the macports
installation (using prefix=/opt/local).  Note that it does two builds, one
with and another without the Qt gui.

#!/bin/bash
if [ -d ~/src/kitware/CMake ]; then
mkdir -p ~/src/kitware/CMake_build
cd ~/src/kitware/CMake_build

# make the Qt GUI
../CMake/bootstrap --qt-gui --prefix=/
make
sudo make DESTDIR=tmp install
sudo rm -rf /Applications/CMake*
sudo cp -rf tmp/CMake*.app /Applications/

# make the command line tools
sudo rm -rf *
../CMake/bootstrap --prefix=/opt/local
make
sudo make install
else
echo No directory ~/src/kitware/CMake
echo Get the source from cvs
fi




On Tue, Aug 19, 2008 at 11:04 AM, Mike Jackson [EMAIL PROTECTED] wrote:

 Here is my recommendation:
 Rebuild CMake with a CMAKE_INSTALL_PREFIX of /Applications/CMake (with the
 Qt option)

 sudo make install

 remove the cmake stuff from /usr/local/*

 After cmake builds and installs you will need to ensure that you have write
 permissions to /opt/local/bin.
 Launch CMake-Gui.app and use the GUI menu to create the sym links for you.

 The main problem is that typically /usr/local needs higher privs than admin
 on OS X (depending on how it was setup). The CMake-GUI app does NOT take
 advantage of the authentication framework in OS X to authenticate you as an
 admin so trying to create the symlinks where the active user does NOT have
 write permissions will fail **.

 The way I have done this is to install cmake into /Applications/CMake.
 Make /Applications/CMake writable by everyone, then have CMake-GUI create
 the symlinks in /Applications/CMake. Then add /Applications/CMake to your
 PATH variable AHEAD of /opt/local/bin.

 Just my 2 cents.

 ** I guess I should look at how to implement that and submit a patch***

 *** Not that I am volunteering to write the code.. ;-)  (yet)
 --
 Mike Jackson   Senior Research Engineer
 Innovative Management  Technology Services


 On Aug 19, 2008, at 1:53 PM, Darren Weber wrote:


 I've got a cvs checkout of CMake-2-6-1.

 I created a build directory and configured first for a Qt GUI.  The build
 completed and installed into /usr/local/CMake 2.6-1.app/.  Then, to ensure
 this version is in the default Applications directory:
 sudo cp -rf /usr/local/CMake* /Applications/

 I then tried to use the GUI interface to create symlinks for the command
 line (Tools  Install for Command Line Use), but it failed.

 I then reconfigured the build for a curses interface, built, and installed
 that.  It installed:

 -- Installing: /usr/local/bin/ccmake
 -- Installing: /usr/local/bin/cmake
 -- Installing: /usr/local/bin/cmakexbuild
 -- Installing: /usr/local/bin/cpack
 -- Installing: /usr/local/bin/ctest

 That's fine, but on this OSX system, cmake was first installed by macports
 into /opt/local/bin/ and this is the first entry on the $PATH.  So I could
 re-route the path or overwrite the macports install with symlinks to this
 build (I prefer the latter).

 Is there a command line utility or a make instruction to create all the
 symlinks?  Does it have an option to specify the root bin directory?
  Something like:

 make symlinks /usr/bin

 or

 make symlinks /opt/local/bin

 Thanks, Darren

 ___
 CMake mailing list
 CMake@cmake.org
 http://www.cmake.org/mailman/listinfo/cmake



 ___
 CMake mailing list
 CMake@cmake.org
 http://www.cmake.org/mailman/listinfo/cmake

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] command line build and install on OSX

2008-08-19 Thread Darren Weber
BTW, I removed a prior installation by running the following command from
the build directory
$ sudo make uninstall

This gets everything listed in BUILD_DIR/install_manifest.txt

Also, I did not get the GUI symlinks tool to work.  So I have two
installations, one as a GUI in /Applications/CMake* and another as command
line tools in /opt/local/.


On Tue, Aug 19, 2008 at 11:04 AM, Mike Jackson [EMAIL PROTECTED] wrote:

 Here is my recommendation:
 Rebuild CMake with a CMAKE_INSTALL_PREFIX of /Applications/CMake (with the
 Qt option)

 sudo make install

 remove the cmake stuff from /usr/local/*

 After cmake builds and installs you will need to ensure that you have write
 permissions to /opt/local/bin.
 Launch CMake-Gui.app and use the GUI menu to create the sym links for you.

 The main problem is that typically /usr/local needs higher privs than admin
 on OS X (depending on how it was setup). The CMake-GUI app does NOT take
 advantage of the authentication framework in OS X to authenticate you as an
 admin so trying to create the symlinks where the active user does NOT have
 write permissions will fail **.

 The way I have done this is to install cmake into /Applications/CMake.
 Make /Applications/CMake writable by everyone, then have CMake-GUI create
 the symlinks in /Applications/CMake. Then add /Applications/CMake to your
 PATH variable AHEAD of /opt/local/bin.

 Just my 2 cents.

 ** I guess I should look at how to implement that and submit a patch***

 *** Not that I am volunteering to write the code.. ;-)  (yet)
 --
 Mike Jackson   Senior Research Engineer
 Innovative Management  Technology Services


 On Aug 19, 2008, at 1:53 PM, Darren Weber wrote:


 I've got a cvs checkout of CMake-2-6-1.

 I created a build directory and configured first for a Qt GUI.  The build
 completed and installed into /usr/local/CMake 2.6-1.app/.  Then, to ensure
 this version is in the default Applications directory:
 sudo cp -rf /usr/local/CMake* /Applications/

 I then tried to use the GUI interface to create symlinks for the command
 line (Tools  Install for Command Line Use), but it failed.

 I then reconfigured the build for a curses interface, built, and installed
 that.  It installed:

 -- Installing: /usr/local/bin/ccmake
 -- Installing: /usr/local/bin/cmake
 -- Installing: /usr/local/bin/cmakexbuild
 -- Installing: /usr/local/bin/cpack
 -- Installing: /usr/local/bin/ctest

 That's fine, but on this OSX system, cmake was first installed by macports
 into /opt/local/bin/ and this is the first entry on the $PATH.  So I could
 re-route the path or overwrite the macports install with symlinks to this
 build (I prefer the latter).

 Is there a command line utility or a make instruction to create all the
 symlinks?  Does it have an option to specify the root bin directory?
  Something like:

 make symlinks /usr/bin

 or

 make symlinks /opt/local/bin

 Thanks, Darren

 ___
 CMake mailing list
 CMake@cmake.org
 http://www.cmake.org/mailman/listinfo/cmake



 ___
 CMake mailing list
 CMake@cmake.org
 http://www.cmake.org/mailman/listinfo/cmake

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake