<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Thanks very much - I am very ignorant in this area and all help is much appreciated. However, when I do as you suggest I get<div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div class="">$ otool -L a.out</div><div class="">a.out:</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>@rpath/Foo.dylib (compatibility version 0.0.0, current version 0.0.0)</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>@rpath/libHSrts-ghc8.0.1.dylib (compatibility version 0.0.0, current version 0.0.0)</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/usr/local/lib/gcc/6/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)</div><div class="">$ set | grep -i dyld</div><div class="">DYLD_FALLBACK_LIBRARY_PATH=/Users/dom/Library/Haskell/ghc-8.0.1/lib/test-via-c-0.1.0.0/bin:/Library/Frameworks/GHC.framework/Versions/8.0.1-x86_64/usr/lib/ghc-8.0.1/rts</div><div class="">~/Dropbox/Private/TestU01-1.2.3/examples/src $ ./a.out</div><div class="">dyld: Library not loaded: /usr/local/lib/gcc/5/libgcc_s.1.dylib</div><div class=""> Referenced from: /Library/Frameworks/GHC.framework/Versions/8.0.1-x86_64/usr/lib/ghc-8.0.1/rts/libHSrts-ghc8.0.1.dylib</div><div class=""> Reason: image not found</div><div class="">Trace/BPT trap: 5</div></blockquote><div class=""><br class=""></div><div class="">It’s not clear to me why it’s looking for `gcc/5` which is not installed when it looks as though it should be looking for `gcc/6`.</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 13 Jan 2017, at 16:06, Brandon Allbery <<a href="mailto:allbery.b@gmail.com" class="">allbery.b@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Fri, Jan 13, 2017 at 8:53 AM, <span dir="ltr" class=""><<a href="mailto:dominic@steinitz.org" target="_blank" class="">dominic@steinitz.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote type="cite" class="">export DYLD_LIBRARY_PATH=/Users/dom/<wbr class="">Library/Haskell/ghc-8.0.1/lib/<wbr class="">test-via-c-0.1.0.0/bin:/<wbr class="">Library/Frameworks/GHC.<wbr class="">framework/Versions/8.0.1-x86_<wbr class="">64/usr/lib/ghc-8.0.1/rts</blockquote></blockquote></div><br class="">That's a good way to break things. Consider <font face="monospace, monospace" class="">DYLD_FALLBACK_LIBRARY_PATH</font> instead.</div><div class="gmail_extra">Also, use <font face="monospace, monospace" class="">otool -l a.out</font> to inspect the <font face="monospace, monospace" class="">RPATH</font> commands embedded in <font face="monospace, monospace" class="">a.out</font>; that will tell you where dyld searches when it sees <font face="monospace, monospace" class="">@rpath/Foo.dylib</font>.<br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class="">brandon s allbery kf8nh sine nomine associates</div><div class=""><a href="mailto:allbery.b@gmail.com" target="_blank" class="">allbery.b@gmail.com</a> <a href="mailto:ballbery@sinenomine.net" target="_blank" class="">ballbery@sinenomine.net</a></div><div class="">unix, openafs, kerberos, infrastructure, xmonad <a href="http://sinenomine.net/" target="_blank" class="">http://sinenomine.net</a></div></div></div>
</div></div>
</div></blockquote></div><br class=""><div class="">
<div class="">Dominic Steinitz</div><div class=""><a href="mailto:dominic@steinitz.org" class="">dominic@steinitz.org</a></div><div class=""><a href="http://idontgetoutmuch.wordpress.com" class="">http://idontgetoutmuch.wordpress.com</a></div>
</div>
<br class=""></div></div></body></html>