<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Try this to see what libraries it's loading:<div class=""><div class="">sh-3.2$ otool -L /opt/local/bin/bash</div><div class="">/opt/local/bin/bash:</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/opt/local/lib/libncurses.6.dylib (compatibility version 6.0.0, current version 6.0.0)</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/opt/local/lib/libintl.8.dylib (compatibility version 13.0.0, current version 13.0.0)</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1858.112.0)</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/opt/local/lib/libiconv.2.dylib (compatibility version 9.0.0, current version 9.1.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 1311.100.3)</div><div class=""><br class=""></div><div class="">A login shell at least (don't know for sure about Terminal preferences) should be in /etc/shells. That may or may not exist. If not, it should be populated with the default entries as well as what you want. Mine looks like this:</div><div class="">========== cut here ==========</div><div class=""><div class=""># List of acceptable shells for chpass(1).</div><div class=""># Ftpd will not allow users to connect who are not using</div><div class=""># one of these shells.</div><div class=""><br class=""></div><div class="">/bin/bash</div><div class="">/bin/csh</div><div class="">/bin/dash</div><div class="">/bin/ksh</div><div class="">/bin/sh</div><div class="">/bin/tcsh</div><div class="">/bin/zsh</div><div class="">/usr/local/bin/pwsh</div></div><div class="">========== cut here ==========</div><div class=""><br class=""></div><div class="">The lines other than the last one there are the default, or were at the time I dug that out of whatever system library it was hardcoded in - which is hard to find now, since the actual dylib files no longer exist but are treated by dyld as references to something hidden in its cache. (that means that the otool -L output above is misleading, too). The rude thing is that the shells(5) man page (at least on Monterey) doesn't list the hardcoded defaults.</div><div class=""><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class="">On Nov 28, 2024, at 21:47, Steve Schow <<a href="mailto:steve@bstage.com" class="">steve@bstage.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I am new to MacPorts, so please excuse if this is dumb question.<div class=""><br class=""></div><div class="">I installed macports bash with the intention to use it as my primary shell with Terminal.app. But when I configured Terminal to use /opt/local/bin/bash as the shell, then I get crashing behavior. Specifically I can launch the terminal new window, it will open up the terminal window with bash running. However if I type in an unknown command, it crashes with the following:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Menlo; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(245, 245, 245); background-color: rgb(21, 21, 21);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Steves-MacBook-Air:~ sjs$ lasdfasdf</span></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Menlo; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(245, 245, 245); background-color: rgb(21, 21, 21);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">objc[61030]: +[Swift.__SharedStringStorage initialize] may have been in progress in another thread when fork() was called.</span></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Menlo; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(245, 245, 245); background-color: rgb(21, 21, 21);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">objc[61030]: +[Swift.__SharedStringStorage initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.</span></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Menlo; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(245, 245, 245); background-color: rgb(21, 21, 21);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Abort trap: 6</span></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Menlo; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(245, 245, 245); background-color: rgb(21, 21, 21);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Steves-MacBook-Air:~ sjs$ </span></div></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class="">If I run /opt/local/bin/bash another level deeper, then that instance of bash works as expected without crashing…</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class="">So what do I need to do in order to use /opt/local/bin/bash as my primary login shell under Terminal.app?</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class="">My suspicion is that when it’s first launched, it does not have /opt/local in the path yet until .bashrc is loaded later. And so I’m theorizing that it’s linking up the wrong libraries or something from my MacOS Sequoia system. On the other hand once I’m in the broken shell, how the path is set from .bashrc, so running bash again, then links up the second bash instance with the right underlying libs. Just guessing out loud…</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class="">But anyone know what we need to do in order to use /opt/local/bin/bash as primary shell from Terminal.app?</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div></div></div></blockquote></div><br class=""></div></body></html>