{"id":125,"date":"2009-06-11T15:35:59","date_gmt":"2009-06-11T21:35:59","guid":{"rendered":"http:\/\/www.brunerd.com\/blog\/?p=125"},"modified":"2009-06-11T15:35:59","modified_gmt":"2009-06-11T21:35:59","slug":"bash-architecture-mismatch-in-tiger-intel-builds","status":"publish","type":"post","link":"https:\/\/www.brunerd.com\/blog\/2009\/06\/11\/bash-architecture-mismatch-in-tiger-intel-builds\/","title":{"rendered":"bash architecture mismatch in Tiger intel builds"},"content":{"rendered":"<p>Tiger, I know, ancient history&#8230;<br \/>\nWell, I&#8217;ve stumbled on an old oddity with bash on intel builds of Tiger:<br \/>\nBash thinks its running on a PPC machine!?<br \/>\nAt least the environment variables think so&#8230;<br \/>\n<code>$ arch<br \/>\ni386<br \/>\n$ echo $HOSTTYPE<br \/>\npowerpc<br \/>\n$echo $MACHTYPE<br \/>\npowerpc-apple-darwin8.0<br \/>\n<\/code><\/p>\n<p>This might only affect those who are using Fink or building your apps, or those who like things to be right.<\/p>\n<p>Append these lines to \/etc\/profile, using <code>sudo nano \/etc\/profile<\/code><br \/>\n<code>HOSTTYPE=i386<br \/>\nMACHTYPE=i386-apple-darwin8.0<br \/>\nexport HOSTTYPE<br \/>\nexport MACHTYPE<\/code><\/p>\n<p>Now the one thing this won&#8217;t do is affect the 5th element of the BASH_VERSINFO array, it seems to be readonly&#8230; so if you are very adventurous you can go into \/bin\/bash with a <a href=\"http:\/\/www.suavetech.com\/0xed\/0xed.html\">Hex Editor<\/a> and <strong>overwrite<\/strong> the first two &#8216;powerpc&#8217; references with i386 (the second set of powerpc refs are correct that is the ppc portion of the fat binary), don&#8217;t move the start of of string, just pad the end with zeros (NULL) and it will affect this variable as well.<\/p>\n<p>Alright, now it&#8217;s in &#8220;The Google&#8221;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tiger, I know, ancient history&#8230; Well, I&#8217;ve stumbled on an old oddity with bash on intel builds of Tiger: Bash thinks its running on a PPC machine!? At least the environment variables think so&#8230; $ arch i386 $ echo $HOSTTYPE powerpc $echo $MACHTYPE powerpc-apple-darwin8.0 This might only affect those who are using Fink or building [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4],"tags":[],"class_list":["post-125","post","type-post","status-publish","format-standard","hentry","category-apple","category-os-x"],"_links":{"self":[{"href":"https:\/\/www.brunerd.com\/blog\/wp-json\/wp\/v2\/posts\/125","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.brunerd.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.brunerd.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.brunerd.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.brunerd.com\/blog\/wp-json\/wp\/v2\/comments?post=125"}],"version-history":[{"count":4,"href":"https:\/\/www.brunerd.com\/blog\/wp-json\/wp\/v2\/posts\/125\/revisions"}],"predecessor-version":[{"id":129,"href":"https:\/\/www.brunerd.com\/blog\/wp-json\/wp\/v2\/posts\/125\/revisions\/129"}],"wp:attachment":[{"href":"https:\/\/www.brunerd.com\/blog\/wp-json\/wp\/v2\/media?parent=125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.brunerd.com\/blog\/wp-json\/wp\/v2\/categories?post=125"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.brunerd.com\/blog\/wp-json\/wp\/v2\/tags?post=125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}