WordPress database error Can't create/write to file '/tmp/#sql_e94_0.MYI' (Errcode: 28) for query SELECT t.*, tt.*, tr.object_id FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category', 'post_tag') AND tr.object_id IN (478) ORDER BY t.name ASC made by require, wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts, update_post_caches, update_object_term_cache, wp_get_object_terms
dimas priyanto a guy with mouse and keyboard

Using GNU GCC on XCode 4.2 and OSX Lion 10.7.2

Written on October 30, 2011

WordPress database error Can't create/write to file '/tmp/#sql_e94_0.MYI' (Errcode: 28) for query SELECT t.*, tt.*, tr.object_id FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category', 'post_tag') AND tr.object_id IN (138) ORDER BY t.name ASC made by require, require_once, include, get_header, locate_template, load_template, require_once, wp_head, do_action, call_user_func_array, start_post_rel_link, get_boundary_post_rel_link, get_boundary_post, get_posts, WP_Query->query, WP_Query->get_posts, update_post_caches, update_object_term_cache, wp_get_object_terms

so, i got a segmentation fault problem last day when i installed a package on osx lion 10.7.2 with xcode 4.2 installed on the operating system. the clue i got after digging into the solution was: “the package installed was compiled using LLVM gcc not GNU gcc”.

A few developers said that LLVM is problematic causing some memory errors, and using GNU gcc will not returning the kind of memory errors like what LLVM did. there are many posts in forums and blog posts on how to get GNU gcc working with lion 10.7.2 since starting from xcode 4.2, GCC has been removed, when formerly it’s included on the xcode distribution.

In xcode 4.1, we could still find /usr/bin/gcc and /usr/bin/gcc-4.2 the gcc one is LLVM and the gcc-4.2 is GNU, when it required to use GNU just need to link to the 4.2 one.

Now, we will not find the gcc 4.2 in the xcode, if we want to get a package that requires GNU we should downgrade the xcode to 4.1 version, but i don’t want to downgrade since it’s package size is so large, so what is the solution?

No need to destroy a house and build a new one if we just wanted to change a piece of window, so you just need to download an installer here, thanks to kennethreitz for the osx gcc installer.