{"id":40,"date":"2010-01-27T06:32:20","date_gmt":"2010-01-27T10:32:20","guid":{"rendered":"http:\/\/www.joshmatthews.net\/blog\/?p=40"},"modified":"2010-03-01T05:54:54","modified_gmt":"2010-03-01T09:54:54","slug":"make-ye-a-hydra","status":"publish","type":"post","link":"https:\/\/www.joshmatthews.net\/blog\/2010\/01\/make-ye-a-hydra\/","title":{"rendered":"Make ye a hydra"},"content":{"rendered":"<p>I&#8217;m interested in playing around with <a href=\"https:\/\/wiki.mozilla.org\/Dehydra\">Dehydra<\/a> to see whether I can create a pre-review checker, hopefully to lessen the amount of nits that inevitably crop up in any patch submitted on Bugzilla.  However, as always, the immediate hurdle is acquiring and building the software involved.  Making dehydra from scratch involves building gcc 4.3.x, SpiderMonkey 1.7+, and dehydra itself.  The instructions in the dehydra <a href=\"http:\/\/hg.mozilla.org\/rewriting-and-analysis\/dehydra\/log\/tip\/README\">README<\/a> gave me good, error-less instructions for gcc, and installing SpiderMonkey was nothing more than <code>.\/configure ; make ; sudo make install<\/code>.  Building dehydra was a bit hairier; here&#8217;s my final sequence of steps:<\/p>\n<p><code>export CXX=\/home\/t_mattjo\/src\/gcc-dehydra\/installed\/bin\/g++<br \/>\n.\/configure --js-libs=\/usr\/local\/lib --js-name=js_static --js-headers=\/usr\/local\/include\/js\/<br \/>\nmake<\/code><\/p>\n<p>Of course, I also had to go into the <code>Makefile<\/code> and add <code>-lstdc++<\/code> because I kept receiving this error while trying to use the generated gcc_dehydra.so (thanks bradh!): <code>\/home\/t_mattjo\/src\/gcc-dehydra\/installed\/bin\/..\/libexec\/gcc\/i686-pc-linux-gnu\/4.3.4\/cc1plus:<br \/>\n      symbol lookup error: .\/gcc_dehydra.so: undefined symbol: _Znwj<\/code><\/p>\n<p>So after all that, <code>make check<\/code> almost passes everything.  I&#8217;m running into the same six errors that <a href=\"http:\/\/enderstruth.wordpress.com\/2009\/11\/16\/classapi-with-a-little-treehydra-on-the-side\/\">Roger Dicke<\/a> got a few days ago, so I might try digging into that.  However!  I can hopefully start playing with static analysis soon, and that&#8217;s a very exciting prospect.<\/p>\n<p>Update: the treehydra problem is a <a href=\"http:\/\/www.bugzil.la\/526299\">known regression<\/a> in Spidermonkey trunk.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m interested in playing around with Dehydra to see whether I can create a pre-review checker, hopefully to lessen the amount of nits that inevitably crop up in any patch submitted on Bugzilla. However, as always, the immediate hurdle is &hellip; <a href=\"https:\/\/www.joshmatthews.net\/blog\/2010\/01\/make-ye-a-hydra\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,15,22],"tags":[],"class_list":["post-40","post","type-post","status-publish","format-standard","hentry","category-dehydra","category-mozilla","category-projects"],"_links":{"self":[{"href":"https:\/\/www.joshmatthews.net\/blog\/wp-json\/wp\/v2\/posts\/40","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.joshmatthews.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.joshmatthews.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.joshmatthews.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.joshmatthews.net\/blog\/wp-json\/wp\/v2\/comments?post=40"}],"version-history":[{"count":6,"href":"https:\/\/www.joshmatthews.net\/blog\/wp-json\/wp\/v2\/posts\/40\/revisions"}],"predecessor-version":[{"id":60,"href":"https:\/\/www.joshmatthews.net\/blog\/wp-json\/wp\/v2\/posts\/40\/revisions\/60"}],"wp:attachment":[{"href":"https:\/\/www.joshmatthews.net\/blog\/wp-json\/wp\/v2\/media?parent=40"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.joshmatthews.net\/blog\/wp-json\/wp\/v2\/categories?post=40"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.joshmatthews.net\/blog\/wp-json\/wp\/v2\/tags?post=40"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}