{"id":181,"date":"2009-02-13T15:44:40","date_gmt":"2009-02-13T23:44:40","guid":{"rendered":"http:\/\/www.outflux.net\/blog\/?p=181"},"modified":"2009-02-13T15:44:40","modified_gmt":"2009-02-13T23:44:40","slug":"world-of-goo-compiled-on-ubuntu","status":"publish","type":"post","link":"https:\/\/outflux.net\/blog\/archives\/2009\/02\/13\/world-of-goo-compiled-on-ubuntu\/","title":{"rendered":"World Of Goo compiled on Ubuntu"},"content":{"rendered":"<p>I first played <a href=\"http:\/\/worldofgoo.com\/\">World of Goo<\/a> on the Wii.  I loved it.  Great stuff, reminded me a little of <a href=\"http:\/\/en.wikipedia.org\/wiki\/Lemmings_(video_game)\">Lemmings<\/a>, but way way better.  Today I found out it&#8217;s also <a href=\"http:\/\/worldofgoo.com\/dl2.php?lk=demo\">available for Linux<\/a>, and I immediately downloaded it.  I was pleased to see a <code>.deb<\/code> available and thought I&#8217;d dig into the binary a little to see how it was put together.<\/p>\n<p>I&#8217;m hugely excited to see that it looks like the game was built on Ubuntu Intrepid for both the .deb and .tar.gz packages:<\/p>\n<blockquote><p><code>$ strings -a WorldOfGoo.bin | grep -i gcc<br \/>\n...<br \/>\nGCC: (Ubuntu 4.3.2-1ubuntu12) 4.3.2<br \/>\n<\/code><\/p><\/blockquote>\n<p>The bundled libraries appear to come from Gentoo:<\/p>\n<blockquote><p><code>$ strings -a libs\/libogg.so.0 | grep -i gcc<br \/>\n...<br \/>\nGCC: (GNU) 4.2.3 (Gentoo 4.2.3 p1.0)<br \/>\n<\/code><\/p><\/blockquote>\n<p>OpenSSL (and libpng?) from Gentoo seem to have been statically linked into the binary:<\/p>\n<blockquote><p><code>$ strings -a WorldOfGoo<br \/>\n...<br \/>\nGCC: (GNU) 4.2.3 (Gentoo 4.2.3 p1.0)<br \/>\n_x86_AES_encrypt<br \/>\n...<br \/>\n<\/code><\/p><\/blockquote>\n<p>What I&#8217;m so very excited about is that third party software producers are using Ubuntu for their releases.  This means they get all the security and code-quality improvements that are <a href=\"https:\/\/wiki.ubuntu.com\/CompilerFlags\">built into the Ubuntu compiler<\/a> for free:<\/p>\n<blockquote><p><code>$ objdump -CR WorldOfGoo.bin | grep _chk<br \/>\n...<br \/>\n084043f0 R_386_JUMP_SLOT   __memcpy_chk<br \/>\n<\/code><\/p><\/blockquote>\n<p>Many thanks to <a href=\"http:\/\/linuxlock.blogspot.com\/2009\/02\/linux-gets-gooey-on-friday-13th.html\">Maks Verver<\/a> for doing the porting.  I&#8217;m really enjoying the demo.  Also, I can see your devel path!  :)<\/p>\n<blockquote><p><code>$ strings -a WorldOfGoo.bin | grep openssl<br \/>\nOPENSSLDIR: \"\/home\/maks\/Projects\/wog\/libs\/openssl-0.9.8j-linux-i386\/ssl\"<br \/>\n...<br \/>\n<\/code><\/p><\/blockquote>\n<p>All this said, it may be that they&#8217;re actually only compiling pieces (like the Open Dynamics Engine, which seems to contain the bulk of the *_chk calls) on Ubuntu (or using .a files from a distro-compiled library that enables hardening only in builds &#8212; RedHat, SuSE), but doing the .deb and .tar.gz project linking on Ubuntu (which is why the compiler name shows up in the resulting binary).  The RPM shows the *_chk functions too &#8212; actually the disassembly is <em>identical<\/em> between deb and RPM, which would imply that only final linking was done on the native distros but compiled elsewhere.  I&#8217;d love to hear more details if Maks stumbles on this blog.  :)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I first played World of Goo on the Wii. I loved it. Great stuff, reminded me a little of Lemmings, but way way better. Today I found out it&#8217;s also available for Linux, and I immediately downloaded it. I was pleased to see a .deb available and thought I&#8217;d dig into the binary a little [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,18,10,14],"tags":[],"_links":{"self":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/posts\/181"}],"collection":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/comments?post=181"}],"version-history":[{"count":0,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/posts\/181\/revisions"}],"wp:attachment":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/media?parent=181"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/categories?post=181"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/tags?post=181"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}