[Insight-developers] Re: problem with cableswig when sources are removed

Brad King brad.king at kitware.com
Wed Dec 7 11:27:05 EST 2005


Gaetan Lehmann wrote:
> 
> Hi Brad,
> 
> CableSwig seems to search files only in source dir, and so, can't run 
> when  sources are deleted:
> 
> Generating swigrunPython.cxx
> cd  
> /home/glehmann/rpm/BUILD/InsightToolkit-2.4.0/Wrapping/CSwig/SwigRuntime  
> && /usr/bin/cswig -o  
> /home/glehmann/rpm/BUILD/InsightToolkit-2.4.0/Wrapping/CSwig/SwigRuntime/swigrunPython.cxx  
> -python  -c++ 
> /home/glehmann/rpm/BUILD/InsightToolkit-2.4.0/Wrapping/CSwig/SwigRuntime/swigrun.xml 
> 
> Cannot find SWIG Lib directory.  Checked:
>   /export/home/mandrake/rpm-rebuilder/RPM/BUILD/CableSwig/SWIG/Lib

I'll assume you're talking about an installed CableSwig tree in which 
the source has been deleted.  It is supposed to look in the install 
location for the SWIG/Lib directory.  In the file

   SWIG/Source/Include/swigconfig.h.cmake.in

the line

   #cmakedefine SWIG_LIB_INSTALL "@SWIG_LIB_INSTALL@"

appears.  It is supposed to get configured to the install location of 
the SWIG library.  Then in Executables/cableSwigMain.cxx there is code 
that looks for the library there if SWIG_LIB_INSTALL is defined.  Check 
your build tree to see if the header was properly configured.

This install support is very minimal and hard-codes the full-path to the 
install location.  It also prefers looking in the source tree even when 
running from the install tree.  Really it should look relative to the 
executable location in the install tree to find the library but we've 
not had time to implement this.

-Brad


More information about the Insight-developers mailing list