[prev in list] [next in list] [prev in thread] [next in thread]
List: insight-users
Subject: Re: [Insight-users] How to Cross-Compile ITK for Raspberry Pi
From: Luis Ibanez <luis.ibanez () kitware ! com>
Date: 2012-12-27 21:59:27
Message-ID: CABAUzPqBkh11QUjW75ZjoJP9rk8h5pja0pZOiaFcTpbzL2J2kw () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
On Thu, Dec 27, 2012 at 3:24 PM, Bradley Lowekamp <blowekamp@mail.nih.gov>wrote:
> Luis,
>
> Congratulations on getting ITK on the Raspberry Pi.
>
> I am not too familiar with cross-compilation. Is it possible to use and
> link link against the systems libtiff library?
>
> Brad
>
>
-----------------------------------
Yes, it is possible.
Here are the required steps;
A) Install the libtiff-dev libraries in the Raspberry Pi
sudo apt-get install libtiff-dev
The libraries go to the directory:
/usr/lib/arm-linux-gnueabihf
and the headers (tiff.h) go to the directory
/usr/include/
B) rsync (copy) those directories in the host
(the Linux Latop in this case):
cd /home/ibanez/bin/RaspberryPi
mkdir usr/lib
cd usr/lib
rsync -rl pi@raspberrypi:/usr/lib/arm-linux-gnueabihf .
cd /home/ibanez/bin/RaspberryPi/usr
rsync -rl pi@raspberrypi:/usr/include .
C) Configure with CMake as before:
ccmake -C ~/Uploads/TryRunResults.cmake
-DCMAKE_TOOLCHAIN_FILE=/home/ibanez/bin/RaspberryPi/CMakeToolChain/Toolchain-RaspberryPi.cmake
/home/ibanez/src/RaspberryPi/ITK
In CCMake Select ITK_USE_SYSTEM_TIFF ON
D) Provide the paths in the local host to the two
directories that we copied (rsync) from the Raspberry Pi:
TIFF_INCLUDE_DIR /home/ibanez/bin/RaspberryPi/usr/include
TIFF_LIBRARY
/home/ibanez/bin/RaspberryPi/usr/lib/arm-linux-gnueabihf/libtiff.so
E) Make
----
This actually, might be a good way of getting around the
bootstrapping problem with mkg3states in the TIFF library.
http://www.itk.org/Wiki/ITK/Cross_Compiling#Dealing_with_TIFF_bootstrapping
Luis
[Attachment #5 (text/html)]
<div class="gmail_quote">On Thu, Dec 27, 2012 at 3:24 PM, Bradley Lowekamp <span \
dir="ltr"><<a href="mailto:blowekamp@mail.nih.gov" \
target="_blank">blowekamp@mail.nih.gov</a>></span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> <div \
style="word-wrap:break-word">Luis,<div><br></div><div>Congratulations on getting ITK \
on the Raspberry Pi.</div><div><br></div><div>I am not too familiar with \
cross-compilation. Is it possible to use and link link against the systems libtiff \
library?</div> <div><br></div><div>Brad</div><div> \
</div></div></blockquote></div>-----------------------------------<br><br><br>Yes, it \
is possible.<br><br>Here are the required steps;<br><br>A) Install the libtiff-dev \
libraries in the Raspberry Pi<br> <br> sudo apt-get \
install libtiff-dev<br><br>The libraries go to the \
directory:<br>/usr/lib/arm-linux-gnueabihf<br><br>and the headers (tiff.h) go to the \
directory<br>/usr/include/<br><br><br>B) rsync (copy) those directories in the host \
<br> (the Linux Latop in this case):<br><br>cd \
/home/ibanez/bin/RaspberryPi<br><br>mkdir usr/lib<br>cd usr/lib<br><br>rsync -rl \
pi@raspberrypi:/usr/lib/arm-linux-gnueabihf .<br><br>cd \
/home/ibanez/bin/RaspberryPi/usr<br>rsync -rl pi@raspberrypi:/usr/include .<br> \
<br><br>C) Configure with CMake as before:<br><br><span style="font-family:courier \
new,courier">ccmake -C ~/Uploads/TryRunResults.cmake
-DCMAKE_TOOLCHAIN_FILE=/home/ibanez/bin/RaspberryPi/CMakeToolChain/Toolchain-RaspberryPi.cmake \
/home/ibanez/src/RaspberryPi/ITK</span><br><br><br> In CCMake Select \
ITK_USE_SYSTEM_TIFF ON<br><br><br>D) Provide the paths in the local host to the \
two<br> directories that we copied (rsync) from the Raspberry Pi:<br> \
<br>TIFF_INCLUDE_DIR /home/ibanez/bin/RaspberryPi/usr/include<br>TIFF_LIBRARY \
/home/ibanez/bin/RaspberryPi/usr/lib/arm-linux-gnueabihf/libtiff.so<br><br><br><br>E) \
Make<br><br><br>----<br><br><br>This actually, might be a good way of getting around \
the<br> bootstrapping problem with mkg3states in the TIFF library.<br><a \
href="http://www.itk.org/Wiki/ITK/Cross_Compiling#Dealing_with_TIFF_bootstrapping">http://www.itk.org/Wiki/ITK/Cross_Compiling#Dealing_with_TIFF_bootstrapping</a><br>
<br><br><br> Luis<br><br><br>
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic