No subject


Fri May 8 15:29:31 EDT 2009


"installed" into a software repository in /opt/local/var/macports/software/,
then (b) the files in that repository are "activated" by hard links to
${prefix} locations.  After that, the temporary build tree is removed,
including the DESTDIR.


####################BEGIN MACPORTS INSTALL and ACTIVATE

[ dweber at X ~/ports/devel/cableswig ]$ sudo port -d install cableswig

--->  Installing cableswig @20090514_0
DEBUG: Executing org.macports.install (cableswig)
DEBUG: installing directory:
/opt/local/var/macports/software/cableswig/20090514_0/opt
DEBUG: installing directory:
/opt/local/var/macports/software/cableswig/20090514_0/opt/local
DEBUG: installing directory:
/opt/local/var/macports/software/cableswig/20090514_0/opt/local/bin
DEBUG: installing file:
/opt/local/var/macports/software/cableswig/20090514_0/opt/local/bin/cableidx
DEBUG: installing file:
/opt/local/var/macports/software/cableswig/20090514_0/opt/local/bin/cswig
DEBUG: installing directory:
/opt/local/var/macports/software/cableswig/20090514_0/opt/local/lib
DEBUG: installing directory:
/opt/local/var/macports/software/cableswig/20090514_0/opt/local/lib/CableSwig
DEBUG: installing file:
/opt/local/var/macports/software/cableswig/20090514_0/opt/local/lib/CableSwig/CableSwigConfig.cmake
DEBUG: installing directory:
/opt/local/var/macports/software/cableswig/20090514_0/opt/local/lib/CableSwig/SWIGLib
DEBUG: installing file:
/opt/local/var/macports/software/cableswig/20090514_0/opt/local/lib/CableSwig/SWIGLib/_std_deque.i
DEBUG: installing file:
/opt/local/var/macports/software/cableswig/20090514_0/opt/local/lib/CableSwig/SWIGLib/allkw.swg
DEBUG: installing file:
/opt/local/var/macports/software/cableswig/20090514_0/opt/local/lib/CableSwig/SWIGLib/carrays.i
.
.
[snipped]
.
.
DEBUG: installing file:
/opt/local/var/macports/software/cableswig/20090514_0/opt/local/lib/CableSwig/SWIGLib/tcl/tcl8kw.swg
DEBUG: installing file:
/opt/local/var/macports/software/cableswig/20090514_0/opt/local/lib/CableSwig/SWIGLib/tcl/tclsh.i
DEBUG: installing file:
/opt/local/var/macports/software/cableswig/20090514_0/opt/local/lib/CableSwig/SWIGLib/tcl/typemaps.i
DEBUG: installing file:
/opt/local/var/macports/software/cableswig/20090514_0/opt/local/lib/CableSwig/SWIGLib/tcl/wish.i
DEBUG: Executing org.macports.activate (cableswig)

--->  Activating cableswig @20090514_0
DEBUG: activating directory: /
DEBUG: activating directory: /opt
DEBUG: activating directory: /opt/local
DEBUG: activating directory: /opt/local/bin
DEBUG: activating file: /opt/local/bin/cableidx
DEBUG: activating file: /opt/local/bin/cswig
DEBUG: activating directory: /opt/local/lib
DEBUG: activating directory: /opt/local/lib/CableSwig
DEBUG: activating file: /opt/local/lib/CableSwig/CableSwigConfig.cmake
DEBUG: activating directory: /opt/local/lib/CableSwig/SWIGLib
DEBUG: activating file: /opt/local/lib/CableSwig/SWIGLib/_std_deque.i
DEBUG: activating file: /opt/local/lib/CableSwig/SWIGLib/allkw.swg
DEBUG: activating file: /opt/local/lib/CableSwig/SWIGLib/carrays.i
DEBUG: activating file: /opt/local/lib/CableSwig/SWIGLib/cdata.i
.
.
[snipped]
.
.
DEBUG: activating file: /opt/local/lib/CableSwig/SWIGLib/tcl/std_vector.i
DEBUG: activating file: /opt/local/lib/CableSwig/SWIGLib/tcl/swigtcl8.swg
DEBUG: activating file: /opt/local/lib/CableSwig/SWIGLib/tcl/tcl8.swg
DEBUG: activating file: /opt/local/lib/CableSwig/SWIGLib/tcl/tcl8kw.swg
DEBUG: activating file: /opt/local/lib/CableSwig/SWIGLib/tcl/tclsh.i
DEBUG: activating file: /opt/local/lib/CableSwig/SWIGLib/tcl/typemaps.i
DEBUG: activating file: /opt/local/lib/CableSwig/SWIGLib/tcl/wish.i

--->  Cleaning cableswig
DEBUG: Executing org.macports.clean (cableswig)

--->  Removing build directory for cableswig
DEBUG: Removing directory:
/opt/local/var/macports/build/_Users_dweber_ports_devel_cableswig
DEBUG: delete:
/opt/local/var/macports/build/_Users_dweber_ports_devel_cableswig
DEBUG: Removing symlink: /Users/dweber/ports/devel/cableswig/work
DEBUG: delete: /Users/dweber/ports/devel/cableswig/work

####################END MACPORTS INSTALL and ACTIVATE


So far so good, everything appears to work.  Now, for the run-time failure,
cswig is looking for SWIGLib in the *source* path, not the installation
library path in /opt/local/lib/CableSwig/SWIGLib:

[ dweber at X ~/ports/devel/cableswig ]$ ls -l /opt/local/bin/cswig
-rwxr-xr-x 2 root admin 1.4M 2009-05-15 18:43 /opt/local/bin/cswig*
[ dweber at X ~/ports/devel/cableswig ]$ which cswig
/opt/local/bin/cswig
[ dweber at X ~/ports/devel/cableswig ]$ cswig
Cannot find SWIG Lib directory.  Checked:

/opt/local/var/macports/build/_Users_dweber_ports_devel_cableswig/work/cableswig-20090514/SWIG/Lib
[ dweber at X ~/ports/devel/cableswig ]$ ls /opt/local/lib/CableSwig/SWIGLib/
_std_deque.i  carrays.i  cmalloc.i   constraints.i  cstring.i    java/
pointer.i  std_deque.i  swig.swg   tcl/
allkw.swg     cdata.i    common.swg  cpointer.i     exception.i  math.i
python/    stl.i        swigrun.i


In looking at the CMakeLists.txt files, I wonder what controls the SWIGLib
path setting, e.g.:

LINK_DIRECTORIES( "${LIBRARY_OUTPUT_PATH}" )
LINK_DIRECTORIES( "${EXECUTABLE_OUTPUT_PATH}" )

Near the end of CMakeLists.txt file in the section "# Settings for the
install tree." we have:

SET(CableSwig_DEFAULT_LIB_CONFIG
${CMAKE_INSTALL_PREFIX}/${CableSwig_INSTALL_ROOT}lib/CableSwig/SWIGLib)

This seems to control the location of the installation for SWIGLib, but not
how cswig links to it (after installation).

Again, sorry about the long explanation; there it is.  Will it be possible
to get this working as a stand-alone installation?  It seems that cableswig
is primarily designed to build and run within the Insight build, rather than
as a stand-alone binary.  To provide the latter, I wonder if it's possible
to identify a configuration variable to change how cswig links to or finds
the SWIGLib path?

Kind regards,
Darren





On Fri, May 15, 2009 at 4:13 AM, Luis Ibanez <luis.ibanez at kitware.com>wrote:

> Hi Darren,
>
> You may find useful to look at the Tutorial:
>
> http://farsight-toolkit.org/wiki/FARSIGHT_Tutorials/Building_Software/Building_CableSwig
>
> Please let us know if you still find any problems.
>
>
>    Thanks
>
>
>       Luis
>
>
> --------------------
> Darren Weber wrote:
>
>>
>> A source build and binary install for cswig fails with:
>>
>> [ dweber at X ~/ports ]$ cswig
>> Cannot find SWIG Lib directory.  Checked:
>>
>>  /opt/local/var/macports/build/_Users_dweber_ports_devel_cableswig/work/cableswig-20090514/SWIG/Lib
>> [ dweber at X ~/ports ]$
>> [ dweber at X ~/ports ]$ otool -L /opt/local/bin/cswig
>> /opt/local/bin/cswig:
>>    /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)
>>    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
>> version 111.1.3)
>>
>>
>> This build of cableswig must use a DESTDIR on the install and the final
>> installation is actually moved from that DESTDIR into a ${prefix} location
>> (actually /opt/local in this case).  The final location for the SWIG Lib is
>> actually /opt/local/lib/CableSwig/SWIGLib/.
>>
>> How can we specify this SWIG Lib directory during the build configuration?
>>  Is it a cmake variable or is it a CMakeList.txt setting?
>>
>> 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 ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>

--0016e64652fad21c420469fe5dc1
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<br>Hi Luis,<br><br>Thanks for pointing out the tutorial, nice tip.=C2=A0 I=
 do have a successful build, but it seems that I need something more than a=
 vanilla build and install.=C2=A0 I apologize in advance for this long emai=
l, but there&#39;s no other way than this to explain the situation.=C2=A0 I=
 may need a patch to somehow change how the cswig binary finds the SWIGLib =
directory.<br>
<br>I&#39;m a registered MacPorts developer and my focus is on porting kitw=
are tools into the MacPorts system (see <a href=3D"http://www.macports.org/=
">http://www.macports.org/</a>).=C2=A0 I got involved in this so that I can=
 document the dependencies and the build configuration in a functional syst=
em for OSX software distribution that will replicate a given installation o=
n any compatible OSX system, with MacPorts installed.<br>
<br>In order to use MacPorts, all the configuration details are saved in a =
Portfile in the MacPorts svn, i.e.:<br><a href=3D"http://svn.macports.org/r=
epository/macports/">http://svn.macports.org/repository/macports/</a><br>
<br>The Portfiles are pseudo tcl scripts.=C2=A0 The content is fairly easy =
to read too, even if you don&#39;t know tcl.=C2=A0 For example, this is the=
 Portfile I&#39;ve been working on for vtk 5.4.0:<br><a href=3D"http://svn.=
macports.org/repository/macports/trunk/dports/graphics/vtk-devel/Portfile">=
http://svn.macports.org/repository/macports/trunk/dports/graphics/vtk-devel=
/Portfile</a><br>
Similarly, this is the Portfile for itk 3.12.0 (still a work in progress):<=
br><a href=3D"http://svn.macports.org/repository/macports/trunk/dports/grap=
hics/InsightToolkit/Portfile">http://svn.macports.org/repository/macports/t=
runk/dports/graphics/InsightToolkit/Portfile</a><br>
Also, here is a recent commit on a cableswig Portfile (a work in progress):=
<br><a href=3D"http://svn.macports.org/repository/macports/trunk/dports/dev=
el/cableswig/Portfile">http://svn.macports.org/repository/macports/trunk/dp=
orts/devel/cableswig/Portfile</a><br>
<br>One thing to understand about MacPorts is that all the configuration an=
d builds occur in a *temporary* workspace and the &#39;make install&#39; is=
 directed to a *temporary* DESTDIR within the workspace.=C2=A0 Once all the=
 files are installed in the DESTDIR, the MacPorts system scans and logs all=
 the files, then &quot;installs&quot; them to a software repository.=C2=A0 =
The final &quot;activation&quot; is actually a process of hardlinks from th=
e CMAKE_INSTALL_PATH to this software repository.=C2=A0 A library or applic=
ation can be &quot;deactivated&quot; by simply removing the hard links and =
it can be immediately re-activated by creating the hard links again.=C2=A0 =
It&#39;s a neat system that includes dependency resolution and it&#39;s swe=
et when it all works well.<br>
<br>Note that the cmake variables have been updated to the following (which=
 must be defined using the command line cmake with -D options for variables=
; ${prefix} is &#39;/opt/local&#39;):<br><br><span style=3D"font-family: co=
urier new,monospace;">configure.args-append \</span><br style=3D"font-famil=
y: courier new,monospace;">
<span style=3D"font-family: courier new,monospace;">=C2=A0=C2=A0=C2=A0 -DBI=
SON_YACC:FILEPATH=3D${prefix}/bin/bison \</span><br style=3D"font-family: c=
ourier new,monospace;"><span style=3D"font-family: courier new,monospace;">=
=C2=A0=C2=A0=C2=A0 -DCMAKE_BUILD_TYPE:STRING=3DRelease \</span><br style=3D=
"font-family: courier new,monospace;">
<span style=3D"font-family: courier new,monospace;">=C2=A0=C2=A0=C2=A0 -DCM=
AKE_INSTALL_PREFIX:PATH=3D${prefix} \</span><br style=3D"font-family: couri=
er new,monospace;"><span style=3D"font-family: courier new,monospace;">=C2=
=A0=C2=A0=C2=A0 -DCMAKE_OSX_SYSROOT=3D${universal_sysroot} \</span><br styl=
e=3D"font-family: courier new,monospace;">
<span style=3D"font-family: courier new,monospace;">=C2=A0=C2=A0=C2=A0 -DCM=
AKE_SKIP_RPATH:BOOL=3DOFF \</span><br style=3D"font-family: courier new,mon=
ospace;"><span style=3D"font-family: courier new,monospace;">=C2=A0=C2=A0=
=C2=A0 -DCMAKE_VERBOSE_MAKEFILE:BOOL=3DON \</span><br style=3D"font-family:=
 courier new,monospace;">
<span style=3D"font-family: courier new,monospace;">=C2=A0=C2=A0=C2=A0 -DCS=
WIG_USE_SYSTEM_GCCXML:BOOL=3DON \</span><br style=3D"font-family: courier n=
ew,monospace;"><span style=3D"font-family: courier new,monospace;">=C2=A0=
=C2=A0=C2=A0 -DSWIG_BUILD_EXAMPLES:BOOL=3DOFF \</span><br style=3D"font-fam=
ily: courier new,monospace;">
<span style=3D"font-family: courier new,monospace;">=C2=A0=C2=A0=C2=A0 -DBU=
ILD_TESTING:BOOL=3DOFF</span><br><br><br>Here&#39;s a summary of the build =
and installation to the DESTDIR (everything works):<br><br>[... snip the bu=
ild details ...]<br>
<br>Install the project...<br>/opt/local/bin/cmake -P cmake_install.cmake<b=
r>-- Install configuration: &quot;Release&quot;<br>-- Installing: /opt/loca=
l/var/macports/build/_Users_dweber_ports_devel_cableswig/work/destroot/opt/=
local/lib/CableSwig/CableSwigConfig.cmake<br>
-- Installing: /opt/local/var/macports/build/_Users_dweber_ports_devel_cabl=
eswig/work/destroot/opt/local/lib/CableSwig/SWIGLib/_std_deque.i<br>...[sni=
p a few files]...<br><br><br>[ dweber at X ~/ports/devel/cableswig ]$ ll work/=
destroot/opt/local/bin/<br>
total 1.8M<br>-rwxr-xr-x 1 root admin 445K 2009-05-15 18:42 cableidx*<br>-r=
wxr-xr-x 1 root admin 1.4M 2009-05-15 18:43 cswig*<br><br>[ dweber at X ~/port=
s/devel/cableswig ]$ ll work/destroot/opt/local/lib/CableSwig/<br>total 4.0=
K<br>
-rw-r--r--=C2=A0 1 root admin 314 2009-05-15 18:37 CableSwigConfig.cmake<br=
>drwxr-xr-x 21 root admin 714 2009-05-15 18:43 SWIGLib/<br>[ dweber at X ~/por=
ts/devel/cableswig ]$ ll work/destroot/opt/local/lib/CableSwig/SWIGLib/<br>=
total 96K<br>
-rw-r--r--=C2=A0 1 root admin 4.1K 2003-04-09 10:34 _std_deque.i<br>-rw-r--=
r--=C2=A0 1 root admin=C2=A0 659 2004-02-18 06:45 allkw.swg<br>-rw-r--r--=
=C2=A0 1 root admin 2.9K 2004-02-18 06:45 carrays.i<br>-rw-r--r--=C2=A0 1 r=
oot admin 2.5K 2004-02-18 06:45 cdata.i<br>
-rw-r--r--=C2=A0 1 root admin 2.2K 2004-02-18 06:45 cmalloc.i<br>-rw-r--r--=
=C2=A0 1 root admin 7.3K 2004-06-15 08:26 common.swg<br>-rw-r--r--=C2=A0 1 =
root admin 6.2K 2003-04-09 10:34 constraints.i<br>-rw-r--r--=C2=A0 1 root a=
dmin 3.6K 2004-02-18 06:45 cpointer.i<br>
-rw-r--r--=C2=A0 1 root admin=C2=A0=C2=A0 78 2003-04-09 10:34 cstring.i<br>=
-rw-r--r--=C2=A0 1 root admin 8.6K 2004-02-18 06:45 exception.i<br>drwxr-xr=
-x 14 root admin=C2=A0 476 2009-05-15 18:43 java/<br>-rw-r--r--=C2=A0 1 roo=
t admin 2.0K 2004-02-18 06:45 math.i<br>
-rw-r--r--=C2=A0 1 root admin=C2=A0 115 2003-04-09 10:34 pointer.i<br>drwxr=
-xr-x 33 root admin 1.1K 2009-05-15 18:43 python/<br>-rw-r--r--=C2=A0 1 roo=
t admin=C2=A0 118 2003-04-09 10:34 std_deque.i<br>-rw-r--r--=C2=A0 1 root a=
dmin=C2=A0 276 2004-02-18 06:45 stl.i<br>
-rw-r--r--=C2=A0 1 root admin=C2=A0 13K 2004-02-18 06:45 swig.swg<br>-rw-r-=
-r--=C2=A0 1 root admin=C2=A0=C2=A0 74 2004-02-18 06:45 swigrun.i<br>drwxr-=
xr-x 15 root admin=C2=A0 510 2009-05-15 18:43 tcl/<br><br><br><br>From here=
 on, MacPorts takes over the &quot;installation&quot; and &quot;activation&=
quot;.=C2=A0=C2=A0 This is essentially a two step process: (a) the entire i=
nstallation is &quot;installed&quot; into a software repository in /opt/loc=
al/var/macports/software/, then (b) the files in that repository are &quot;=
activated&quot; by hard links to ${prefix} locations.=C2=A0 After that, the=
 temporary build tree is removed, including the DESTDIR.<br>
<br><br>####################BEGIN MACPORTS INSTALL and ACTIVATE<br><br>[ dw=
eber at X ~/ports/devel/cableswig ]$ sudo port -d install cableswig <br><br>--=
-&gt;=C2=A0 Installing cableswig @20090514_0<br>DEBUG: Executing org.macpor=
ts.install (cableswig)<br>
DEBUG: installing directory: /opt/local/var/macports/software/cableswig/200=
90514_0/opt<br>DEBUG: installing directory: /opt/local/var/macports/softwar=
e/cableswig/20090514_0/opt/local<br>DEBUG: installing directory: /opt/local=
/var/macports/software/cableswig/20090514_0/opt/local/bin<br>
DEBUG: installing file: /opt/local/var/macports/software/cableswig/20090514=
_0/opt/local/bin/cableidx<br>DEBUG: installing file: /opt/local/var/macport=
s/software/cableswig/20090514_0/opt/local/bin/cswig<br>DEBUG: installing di=
rectory: /opt/local/var/macports/software/cableswig/20090514_0/opt/local/li=
b<br>
DEBUG: installing directory: /opt/local/var/macports/software/cableswig/200=
90514_0/opt/local/lib/CableSwig<br>DEBUG: installing file: /opt/local/var/m=
acports/software/cableswig/20090514_0/opt/local/lib/CableSwig/CableSwigConf=
ig.cmake<br>
DEBUG: installing directory: /opt/local/var/macports/software/cableswig/200=
90514_0/opt/local/lib/CableSwig/SWIGLib<br>DEBUG: installing file: /opt/loc=
al/var/macports/software/cableswig/20090514_0/opt/local/lib/CableSwig/SWIGL=
ib/_std_deque.i<br>
DEBUG: installing file: /opt/local/var/macports/software/cableswig/20090514=
_0/opt/local/lib/CableSwig/SWIGLib/allkw.swg<br>DEBUG: installing file: /op=
t/local/var/macports/software/cableswig/20090514_0/opt/local/lib/CableSwig/=
SWIGLib/carrays.i<br>
.<br>.<br>[snipped]<br>.<br>.<br>DEBUG: installing file: /opt/local/var/mac=
ports/software/cableswig/20090514_0/opt/local/lib/CableSwig/SWIGLib/tcl/tcl=
8kw.swg<br>DEBUG: installing file: /opt/local/var/macports/software/cablesw=
ig/20090514_0/opt/local/lib/CableSwig/SWIGLib/tcl/tclsh.i<br>
DEBUG: installing file: /opt/local/var/macports/software/cableswig/20090514=
_0/opt/local/lib/CableSwig/SWIGLib/tcl/typemaps.i<br>DEBUG: installing file=
: /opt/local/var/macports/software/cableswig/20090514_0/opt/local/lib/Cable=
Swig/SWIGLib/tcl/wish.i<br>
DEBUG: Executing org.macports.activate (cableswig)<br><br>---&gt;=C2=A0 Act=
ivating cableswig @20090514_0<br>DEBUG: activating directory: /<br>DEBUG: a=
ctivating directory: /opt<br>DEBUG: activating directory: /opt/local<br>DEB=
UG: activating directory: /opt/local/bin<br>
DEBUG: activating file: /opt/local/bin/cableidx<br>DEBUG: activating file: =
/opt/local/bin/cswig<br>DEBUG: activating directory: /opt/local/lib<br>DEBU=
G: activating directory: /opt/local/lib/CableSwig<br>DEBUG: activating file=
: /opt/local/lib/CableSwig/CableSwigConfig.cmake<br>
DEBUG: activating directory: /opt/local/lib/CableSwig/SWIGLib<br>DEBUG: act=
ivating file: /opt/local/lib/CableSwig/SWIGLib/_std_deque.i<br>DEBUG: activ=
ating file: /opt/local/lib/CableSwig/SWIGLib/allkw.swg<br>DEBUG: activating=
 file: /opt/local/lib/CableSwig/SWIGLib/carrays.i<br>
DEBUG: activating file: /opt/local/lib/CableSwig/SWIGLib/cdata.i<br>.<br>.<=
br>[snipped]<br>.<br>.<br>DEBUG: activating file: /opt/local/lib/CableSwig/=
SWIGLib/tcl/std_vector.i<br>DEBUG: activating file: /opt/local/lib/CableSwi=
g/SWIGLib/tcl/swigtcl8.swg<br>
DEBUG: activating file: /opt/local/lib/CableSwig/SWIGLib/tcl/tcl8.swg<br>DE=
BUG: activating file: /opt/local/lib/CableSwig/SWIGLib/tcl/tcl8kw.swg<br>DE=
BUG: activating file: /opt/local/lib/CableSwig/SWIGLib/tcl/tclsh.i<br>DEBUG=
: activating file: /opt/local/lib/CableSwig/SWIGLib/tcl/typemaps.i<br>
DEBUG: activating file: /opt/local/lib/CableSwig/SWIGLib/tcl/wish.i<br><br>=
---&gt;=C2=A0 Cleaning cableswig<br>DEBUG: Executing org.macports.clean (ca=
bleswig)<br><br>---&gt;=C2=A0 Removing build directory for cableswig<br>DEB=
UG: Removing directory: /opt/local/var/macports/build/_Users_dweber_ports_d=
evel_cableswig<br>
DEBUG: delete: /opt/local/var/macports/build/_Users_dweber_ports_devel_cabl=
eswig<br>DEBUG: Removing symlink: /Users/dweber/ports/devel/cableswig/work<=
br>DEBUG: delete: /Users/dweber/ports/devel/cableswig/work<br><br>#########=
###########END MACPORTS INSTALL and ACTIVATE<br>

<br><br>So far so good, everything appears to work.=C2=A0 Now, for the run-=
time failure, cswig is looking for SWIGLib in the *source* path, not the in=
stallation library path in /opt/local/lib/CableSwig/SWIGLib:<br><br>[ dwebe=
r at X ~/ports/devel/cableswig ]$ ls -l /opt/local/bin/cswig <br>
-rwxr-xr-x 2 root admin 1.4M 2009-05-15 18:43 /opt/local/bin/cswig*<br>[ dw=
eber at X ~/ports/devel/cableswig ]$ which cswig<br>/opt/local/bin/cswig<br>[ =
dweber at X ~/ports/devel/cableswig ]$ cswig<br>Cannot find SWIG Lib directory=
.=C2=A0 Checked:<br>
=C2=A0 /opt/local/var/macports/build/_Users_dweber_ports_devel_cableswig/wo=
rk/cableswig-20090514/SWIG/Lib<br>[ dweber at X ~/ports/devel/cableswig ]$ ls =
/opt/local/lib/CableSwig/SWIGLib/<br>_std_deque.i=C2=A0 carrays.i=C2=A0 cma=
lloc.i=C2=A0=C2=A0 constraints.i=C2=A0 cstring.i=C2=A0=C2=A0=C2=A0 java/=C2=
=A0=C2=A0 pointer.i=C2=A0 std_deque.i=C2=A0 swig.swg=C2=A0=C2=A0 tcl/<br>
allkw.swg=C2=A0=C2=A0=C2=A0=C2=A0 cdata.i=C2=A0=C2=A0=C2=A0 common.swg=C2=
=A0 cpointer.i=C2=A0=C2=A0=C2=A0=C2=A0 exception.i=C2=A0 math.i=C2=A0 pytho=
n/=C2=A0=C2=A0=C2=A0 stl.i=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 swigru=
n.i<br><br><br>In looking at the CMakeLists.txt files, I wonder what contro=
ls the SWIGLib path setting, e.g.:<br><br>LINK_DIRECTORIES( &quot;${LIBRARY=
_OUTPUT_PATH}&quot; )<br>
LINK_DIRECTORIES( &quot;${EXECUTABLE_OUTPUT_PATH}&quot; )<br><br>Near the e=
nd of CMakeLists.txt file in the section &quot;# Settings for the install t=
ree.&quot; we have:<br><br>SET(CableSwig_DEFAULT_LIB_CONFIG ${CMAKE_INSTALL=
_PREFIX}/${CableSwig_INSTALL_ROOT}lib/CableSwig/SWIGLib)<br>
<br>This seems to control the location of the installation for SWIGLib, but=
 not how cswig links to it (after installation).<br><br>Again, sorry about =
the long explanation; there it is.=C2=A0 Will it be possible to get this wo=
rking as a stand-alone installation?=C2=A0 It seems that cableswig is prima=
rily designed to build and run within the Insight build, rather than as a s=
tand-alone binary.=C2=A0 To provide the latter, I wonder if it&#39;s possib=
le to identify a configuration variable to change how cswig links to or fin=
ds the SWIGLib path?<br>
<br>Kind regards,<br>Darren<br><br><br><br><br><br><div class=3D"gmail_quot=
e">On Fri, May 15, 2009 at 4:13 AM, Luis Ibanez <span dir=3D"ltr">&lt;<a hr=
ef=3D"mailto:luis.ibanez at kitware.com">luis.ibanez at kitware.com</a>&gt;</span=
> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, =
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Darren,<br>
<br>
You may find useful to look at the Tutorial:<br>
<a href=3D"http://farsight-toolkit.org/wiki/FARSIGHT_Tutorials/Building_Sof=
tware/Building_CableSwig" target=3D"_blank">http://farsight-toolkit.org/wik=
i/FARSIGHT_Tutorials/Building_Software/Building_CableSwig</a><br>
<br>
Please let us know if you still find any problems.<br>
<br>
<br>
 =C2=A0 =C2=A0Thanks<br>
<br>
<br>
 =C2=A0 =C2=A0 =C2=A0 Luis<br>
<br>
<br>
--------------------<br>
Darren Weber wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, =
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><=
div class=3D"h5">
<br>
A source build and binary install for cswig fails with:<br>
<br>
[ dweber at X ~/ports ]$ cswig<br>
Cannot find SWIG Lib directory. =C2=A0Checked:<br>
 =C2=A0/opt/local/var/macports/build/_Users_dweber_ports_devel_cableswig/wo=
rk/cableswig-20090514/SWIG/Lib<br>
[ dweber at X ~/ports ]$<br>
[ dweber at X ~/ports ]$ otool -L /opt/local/bin/cswig<br>
/opt/local/bin/cswig:<br>
 =C2=A0 =C2=A0/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, curr=
ent version 7.4.0)<br>
 =C2=A0 =C2=A0/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, curre=
nt version 1.0.0)<br>
 =C2=A0 =C2=A0/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, curr=
ent version 111.1.3)<br>
<br>
<br>
This build of cableswig must use a DESTDIR on the install and the final ins=
tallation is actually moved from that DESTDIR into a ${prefix} location (ac=
tually /opt/local in this case). =C2=A0The final location for the SWIG Lib =
is actually /opt/local/lib/CableSwig/SWIGLib/.<br>

<br>
How can we specify this SWIG Lib directory during the build configuration? =
=C2=A0Is it a cmake variable or is it a CMakeList.txt setting?<br>
<br>
Thanks in advance,<br>
Darren<br>
<br>
<br></div></div>
------------------------------------------------------------------------<br=
>
<br>
_____________________________________<br>
Powered by <a href=3D"http://www.kitware.com" target=3D"_blank">www.kitware=
.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href=3D"http://www.kitware.com/opensource/opensource.html" target=3D"_bl=
ank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at: <a href=3D"http://w=
ww.itk.org/Wiki/ITK_FAQ" target=3D"_blank">http://www.itk.org/Wiki/ITK_FAQ<=
/a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href=3D"http://www.itk.org/mailman/listinfo/insight-users" target=3D"_bl=
ank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</blockquote>
</blockquote></div><br>

--0016e64652fad21c420469fe5dc1--


More information about the Insight-users mailing list