<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_1_1440339328328_122733" class="">Gonzalo,</div><div id="yiv9265338746yui_3_16_0_1_1440339328328_118213" class=""><br clear="none" class=""></div><div dir="ltr" id="yiv9265338746yui_3_16_0_1_1440339328328_118214" class="">Could you please elaborate, where should I check it? Will CMake indeed generate -L/usr/local/lib argument for the linker if it sees something in LD_LIBRARY_PATH?</div><div dir="ltr" id="yiv9265338746yui_3_16_0_1_1440339328328_118214" class=""><br clear="none" class=""></div><div dir="ltr" id="yiv9265338746yui_3_16_0_1_1440339328328_118214" class="">Do you have any insight why other flags (-arch, -isysroot) get generated in one environment, but not the other?    </div><div class=""></div><div id="yiv9265338746yui_3_16_0_1_1440339328328_118215" class=""> </div><div class="" id="yiv9265338746yui_3_16_0_1_1440339328328_118217" dir="ltr"><br></div><div></div><div> </div><div class="signature" id="yui_3_16_0_1_1440339328328_123251">WBR Oleg Zhylin   ovz@yahoo.com</div>  <br><div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"> <font size="2" face="Arial"> On Sunday, August 23, 2015 8:10 PM, Oleg Zhylin <ovz@yahoo.com> wrote:<br> </font> </div>  <br><br> <div class="y_msg_container"><div id="yiv1658366628"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"><div style="margin-top:0px;margin-bottom:1em;border:0px;font-size:15px;clear:both;color:rgb(34, 34, 34);font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;line-height:19.5px;" class="yiv1658366628">I have a CMake C++ dylib project that builds correctly in one MacOS X environment but fails in another. Environments are on the same machine, but under different users. I'm seeking help how to do I troubleshoot where the failure in the second one comes from.</div><div style="margin-top:0px;margin-bottom:1em;border:0px;font-size:15px;clear:both;color:rgb(34, 34, 34);font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;line-height:19.5px;" class="yiv1658366628">What I managed to figure out is that in failing configuration CMake adds the following flags in link.txt (the commands used to link the executable)</div><pre style="margin-top:0px;padding:5px;border:0px;font-size:13px;overflow:auto;width:auto;max-height:600px;font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;word-wrap:normal;color:rgb(34, 34, 34);background-color:rgb(238, 238, 238);" class="yiv1658366628" id="yiv1658366628yui_3_16_0_1_1440339328328_32234"><code style="margin-top:0px;margin-bottom:0px;padding:0px;border:0px;font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;white-space:inherit;" class="yiv1658366628">-arch x86_64

-isysroot  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk

-mmacosx-version-min=10.6

-L/usr/local/lib
</code></pre><div style="margin-top:0px;margin-bottom:1em;border:0px;font-size:15px;clear:both;color:rgb(34, 34, 34);font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;line-height:19.5px;" class="yiv1658366628" id="yiv1658366628yui_3_16_0_1_1440339328328_32235">The last one causes havoc as it makes ld pick up dependencies from /usr/local/lib instead of link directories I configured in CMake.</div><div style="margin-top:0px;margin-bottom:1em;border:0px;font-size:15px;clear:both;color:rgb(34, 34, 34);font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;line-height:19.5px;" dir="ltr" class="yiv1658366628" id="yiv1658366628yui_3_16_0_1_1440339328328_32236">I would appreciate any insight what triggers generating the flags above and what is the best way to squelch them, especially -L/usr/local/lib?</div><div></div><div id="yiv1658366628yui_3_16_0_1_1440339328328_32198"> </div><div class="yiv1658366628signature" id="yiv1658366628yui_3_16_0_1_1440339328328_32237">WBR Oleg Zhylin   ovz@yahoo.com</div></div></div></div><br><br></div>  </div> </div>  </div></div></body></html>