<div dir="ltr"><div><div><div>Dear all,<br></div>After some success installing SAGA, I've tried editing SagaUtils.py and hard coding the SAGA_FOLDER to /usr/local/bin with not success. Having not knowledge of python, it seems to me that the following else clause should work in mac as well.<br>
<br>        if SextanteUtils.isMac():<br>            testfolder = os.path.join(str(QgsApplication.prefixPath()), "bin")<br>            if os.path.exists(os.path.join(testfolder, "saga_cmd")):<br>                folder = testfolder<br>
            else:<br>                testfolder = "/usr/local/bin"<br>                if os.path.exists(os.path.join(testfolder, "saga_cmd")):<br>                    folder = testfolder<br></div><br>and the same in the next call to Mac<br>
<br>        elif SextanteUtils.isMac():<br>            fout.write("export SAGA_MLB=" + SagaUtils.sagaPath() + "/../lib/saga\n");<br>            fout.write("export PATH=" + SagaUtils.sagaPath() + ":$PATH\n");<br>
        else:<br>            pass<br>        for command in commands:<br>            fout.write("saga_cmd " + command.encode("utf8") + "\n")<br></div><br>In this case I have doubts if SAGA_MLB should be "../lib/saga\n" instance of ""/../lib/saga\n"<div>
<div><div><div><div class="gmail_extra"><br>I've tested most of the above option with no success whatsoever<br></div><div class="gmail_extra">Error messages are not always the same but the further I get is to:<br><br>

<style type="text/css">
p, li { white-space: pre-wrap; }
</style>
<p style="margin:0px;text-indent:0px">Error while checking SAGA installation. SAGA might not be correctly configured.</p>
<p style="margin:0px;text-indent:0px">Traceback (most recent call last):</p>
<p style="margin:0px;text-indent:0px">  File "/Applications/QGIS_2.0-dev.app/Contents/Resources/python/plugins/sextante/saga/SagaUtils.py", line 146, in checkSagaIsInstalled</p>
<p style="margin:0px;text-indent:0px">    from sextante.core.Sextante import runalg</p>
<p style="margin:0px;text-indent:0px">ImportError: cannot import name runalg</p><br></div><div class="gmail_extra">Best<br></div><div class="gmail_extra"><div class="gmail_quote">On Thu, Apr 4, 2013 at 9:58 PM, William Kyngesburye <span dir="ltr"><<a href="mailto:woklist@kyngchaos.com" target="_blank">woklist@kyngchaos.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>On Apr 4, 2013, at 2:33 PM, gvSIGMac wrote:<br>
<br>
> Thanks William,<br>
> On 10.8 I can't compile because there is not autoconf available. See inline comments below.<br>
><br>
</div>That's part of what the instructions cover - installing the autotools.<br>
<br>
Anyways, I've been working on a packaging plan for saga within qgis.  I just got to the point of testing it, and it looks like Sextante does not care if the saga tools are in the current PATH (ie the QGIS bin folder), it requires a saga path to be configured in Sextante.  Problem is, there is a saga path option in the code, but there is no way to configure it in the Sextante preferences dialog box.  Orfeo and GRASS both have the preferences to set their paths, so this must be an oversight.<br>


<div><div><br>
> ________________________________<br>
> Agustin<br>
><br>
> On 04/04/2013, at 19:10, William Kyngesburye <<a href="mailto:woklist@kyngchaos.com" target="_blank">woklist@kyngchaos.com</a>> wrote:<br>
><br>
>> On Apr 4, 2013, at 7:52 AM, Agustin Diez-Castillo wrote:<br>
>><br>
>>> Other approaches compile in 10.7. Thanks William<br>
>>>> SDKs are really only needed when you compile on one system for an earlier system, like on Lion (10.7) for >Snow Leopard (10.6)<br>
>>> So, maybe my first compilation should work with 10.6 and 10.8. I did check both with no stable results.<br>
>><br>
>> The binaries created should not work on 10.6 because you used a 10.7 SDK.  It should work on 10.8.  The compilation method should work on all systems as long as the SDK, macosx-version-min and CXX options are adjusted to match (no need to set CXX on 10.6).<br>


>><br>
>>> I prepared a package [1] in case anyone want to test this.<br>
>>> Anyhow, if we're discussing that here is because we want to use SAGA via SEXTANTE in Qgis and there I have no success whatsoever. In my system, saga_cmd works but Qgis tells me that the SAGA installation maybe is not correct. I did put /usr/local/lib/saga on my path as well.<br>


>><br>
>> How did you add it to your path?  Adding it to .bash_profile will not work.  And that's the wrong path anyways, it should be /usr/local/bin.<br>
>><br>
> I added both to .bash_profile<br>
>> If QGIS can't find /usr/local/bin without help (no way to do that in QGIS 1.8, unless Sextante has a configuration option for the SAGA path), one way would be to compile directly into the QGIS app.  Add to the SAGA configure command:<br>


>><br>
>> --prefix=/Applications/QGIS.app/Content/MacOS<br>
> I did something like that to build my saga but did not think about putting this in QGIS. So maybe you can build QGIS with saga in the near future?<br>
> --prefix=/Applications/SAGA.app<br>
>><br>
>> it will then install into the QGIS app bin/ folder which QGIS/Sextante should find automatically.  Though you can't move or rename QGIS now or it will break SAGA.<br>
><br>
>><br>
>>> There are other issues when running SAGA but I guess those belong to the SAGA list.<br>
>>> Agustin<br>
>>> [1] <a href="https://www.dropbox.com/s/ufzsq7h826jp4u8/SAGA21.dmg" target="_blank">https://www.dropbox.com/s/ufzsq7h826jp4u8/SAGA21.dmg</a><br>
>>><br>
>>><br>
>>> On Thu, Mar 28, 2013 at 12:35 AM, William Kyngesburye <<a href="mailto:woklist@kyngchaos.com" target="_blank">woklist@kyngchaos.com</a>> wrote:<br>
>>> OK.  2 simple choices of solutions:<br>
>>><br>
>>> Don't use a SDK.  SDKs are really only needed when you compile on one system for an earlier system, like on Lion (10.7) for Snow Leopard (10.6), or when only the Xcode app is used (ie with an Xcode project).  With this, just remove the -isysroot up to .sdk in the configuration.<br>


>>><br>
>>> Or if you need the SDK, add "-F /Library/Frameworks" to LINK_MISC.  The documentation for the isysroot flag appears to be a little misleading.  It says that the sysroot specified is added to all search paths, but I think it really means all search paths that are within the scope of the SDK.  /Library is not.  But /usr is, so it would still catch /usr/local, so the wx libraries would be a problem...<br>


>>><br>
>><br>
>> -----<br>
>> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com><br>
>> <a href="http://www.kyngchaos.com/" target="_blank">http://www.kyngchaos.com/</a><br>
>><br>
>> First Pogril: Why is life like sticking your head in a bucket filled with hyena offal?<br>
>> Second Pogril: I don't know.  Why IS life like sticking your head in a bucket filled with hyena offal?<br>
>> First Pogril: I don't know either.  Wretched, isn't it?<br>
>><br>
>> -HitchHiker's Guide to the Galaxy<br>
>><br>
>><br>
<br>
-----<br>
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com><br>
<a href="http://www.kyngchaos.com/" target="_blank">http://www.kyngchaos.com/</a><br>
<br>
</div></div>Earth: "Mostly harmless"<br>
<br>
- revised entry in the HitchHiker's Guide to the Galaxy<br>
<br>
<br>
</blockquote></div><br></div></div></div></div></div></div>