[Qgis-developer] Sextante - OTB plugin and SAR data in Mac OS X

Noli Sicad nsicad at gmail.com
Tue Aug 28 21:14:30 PDT 2012


Hi William,

Thanks having a go with this.

I am using Mountain Lion (10.8.1).

Would it help if I am going to create this folder,

/Developer/SDKs and copy the MacOSX10.8.sdk from Xcode?

The end result would be like this (below) for the directory

  -D CMAKE_OSX_SYSROOT="/Developer/SDKs/MacOSX10.8.sdk"

#####

Now, I did this.

#######
Nolis-MacBook-Pro:OTB nsicad$ mkdir build
Nolis-MacBook-Pro:OTB nsicad$ cd build
Nolis-MacBook-Pro:build nsicad$ cmake -D
CMAKE_INSTALL_PREFIX=/usr/local -D CMAKE_BUILD_TYPE=MinSizeRel -D
CMAKE_OSX_ARCHITECTURES="x86_64" -D CMAKE_OSX_DEPLOYMENT_TARGET="10.8"
-D CMAKE_OSX_SYSROOT="/Developer/SDKs/MacOSX10.8.sdk" -D
OTB_WRAP_QT=OFF -D OTB_WRAP_JAVA=OFF -D OTB_WRAP_PYTHON=OFF -D
BUILD_APPLICATIONS=ON -D OTB_USE_VISU_GUI=OFF -D
TIFF_LIBRARY=/Library/Frameworks/UnixImageIO.framework -D
GEOTIFF_LIBRARY=/Library/Frameworks/UnixImageIO.framework -D
JPEG_LIBRARY=/Library/Frameworks/UnixImageIO.framework -D
USE_OPENMP=OFF -D CMAKE_INSTALL_NAME_DIR=/usr/local/lib/otb
CMake Error: The source directory
"/Users/nsicad/Documents/Work_1new/OTB/build/CMAKE_INSTALL_NAME_DIR=/usr/local/lib/otb"
does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
Nolis-MacBook-Pro:build nsicad$

######

Do have any idea why I am getting this error ?

CMake Error: The source directory "/Users/nsicad/Documents/Work_1new/OTB/build

Noli


On 8/29/12, William Kyngesburye <woklist at kyngchaos.com> wrote:
> Well, lots going on.  OTB linking was giving me problems (not well
> configured for OS X linking method) until I found the key.
>
> First, as Julien said, FLTK in OTB is not needed in the QGIS plugin, so skip
> that.  All you should need is the OTB source.  All of the dependencies have
> internal versions, so we can force it to use my frameworks and leave
> everything else to the internal sources.
>
> One big issue I found in this is with Apple's SDKs.  If you are on Lion+,
> Apple changed the SDKs starting with 10.7 SDK to remove the symlinks to
> /usr/local and /Library/Frameworks.  This means that linking/includes to
> these locations (custom SW in /usr/loca, my frameworks) will fail when using
> the 10.7 or 10.8 SDKs.  AND, if you don't specify an SDK in cmake, it
> defaults to the SDK matching the current system - there is no way to tell
> cmake to NOT use a SDK!
>
> SO, I need to update the QGIS build notes, but if you are compiling on 10.6
> Snow Leopard, you should have no problems.  If you are compiling on Lion+,
> you need to "fix" the SDKs.  Let me know and I'll spell that out.
>
> Assuming Snow Leopard or a fixed Lion SDK:
>
> Download the latest OTB source and unzip.
>
> In the OTB source folder:
>
> mkdir build
> cd build
> cmake -D CMAKE_INSTALL_PREFIX=/usr/local \
> -D CMAKE_BUILD_TYPE=MinSizeRel \
> -D CMAKE_OSX_ARCHITECTURES="x86_64" \
> -D CMAKE_OSX_DEPLOYMENT_TARGET="10.6" \
> -D CMAKE_OSX_SYSROOT="/Developer/SDKs/MacOSX10.6.sdk" \
> -D OTB_WRAP_QT=OFF -D OTB_WRAP_JAVA=OFF -D OTB_WRAP_PYTHON=OFF \
> -D BUILD_APPLICATIONS=ON -D OTB_USE_VISU_GUI=OFF \
> -D TIFF_LIBRARY=/Library/Frameworks/UnixImageIO.framework \
> -D GEOTIFF_LIBRARY=/Library/Frameworks/UnixImageIO.framework \
> -D JPEG_LIBRARY=/Library/Frameworks/UnixImageIO.framework \
> -D USE_OPENMP=OFF \
> -D CMAKE_INSTALL_NAME_DIR=/usr/local/lib/otb \
> ..
>
> (match the deployment target and SDK version to your system version)
>
> make
>
> (since this is a big project, parallel compilation is good here.  add -j n,
> with n=number to match your number of processors*cores.  see the QGIS
> install doc for a more detailed description)
>
> sudo make install
>
>
> That should do it.
>
>
> On Aug 27, 2012, at 10:26 PM, Noli Sicad wrote:
>
>> Hi William,
>>
>> Thanks for looking into this problem.
>>
>> Hopefully you can make it easier for us (mac users) to have OTB and
>> QGIS OTB plugin working in OS X.
>>
>> I think mac os users need a Remote Sensing tools e.g. OTB and QGIS OTB
>> python plugin.
>>
>> Thanks.
>>
>> Noli
>>
>
>
> -----
> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
> http://www.kyngchaos.com/
>
> The equator is so long, it could encircle the earth completely once.
>
>


More information about the Qgis-developer mailing list