{"id":775,"date":"2012-03-24T19:32:03","date_gmt":"2012-03-24T23:32:03","guid":{"rendered":"http:\/\/timony.com\/mickzblog\/?p=775"},"modified":"2012-03-24T19:32:03","modified_gmt":"2012-03-24T23:32:03","slug":"build-install-osra-1-3-8","status":"publish","type":"post","link":"http:\/\/timony.com\/mickzblog\/2012\/03\/24\/build-install-osra-1-3-8\/","title":{"rendered":"Build &#038; Install Osra 1.3.8 on Ubuntu 11.10"},"content":{"rendered":"<h2>Summary<\/h2>\n<p>Osra is a a utility designed to convert graphical representations of chemical structures create by Igor Filippov at the National Cancer Institute. This page documents how to compile and install Osra on Ubuntu Linux 11.10. These instructions may work on other versions of Ubuntu Linux and on Debian Linux.\u00a0 Please leave a comment if you have compiled Osra using these instructions on a different version of Ubuntu, or on other Linux distributions.<\/p>\n<h2>Overview<\/h2>\n<p>At the time of writing this doc, March 2012, the Osra version is 1.3.8 and is available at:<\/p>\n<ul>\n<li><a title=\"Osra Docs\" href=\"http:\/\/cactus.nci.nih.gov\/osra\/#6\" target=\"_blank\"> http:\/\/cactus.nci.nih.gov\/osra\/#6<\/a><\/li>\n<\/ul>\n<p>I copied all the source to a directory in \/tmp. If you need the source code at some later point in time, don&#8217;t use \/tmp as files in \/tmp are deleted upon reboot (if they&#8217;re older than 14 days). Also, at the time of writing Osra requires a patched version of Gocr for Osra to work. You need to install Gocr before you try to compile and install Osra, you also need to install other packages required for Osra to compile. Most are listed below, but see the <a title=\"Osra Dependencies \" href=\"http:\/\/cactus.nci.nih.gov\/osra\/#2\" target=\"_blank\">Osra Homepage<\/a> for more details.<\/p>\n<p>An overview of the steps are:<\/p>\n<ol>\n<li>Install required Ubuntu packages<\/li>\n<li>Compile and Install Gocr<\/li>\n<li>Compile and Install Osra<\/li>\n<\/ol>\n<p>I&#8217;ve also written instructions on how to install Osra 1.2.1 on <a title=\"Compiling Osra in Ubuntu Jaunty\" href=\"http:\/\/timony.com\/mickzblog\/2009\/07\/04\/compiling-osra-on-ubuntu-jaunty\/\" target=\"_blank\">Ubuntu 9.04<\/a>, however that was written in 2009.<!--more--><\/p>\n<h2>Install Ubuntu Packages<\/h2>\n<p>These packages are required to build Osta. Install the following (you will also need some gaphicsmagick packages also, libgraphicsmagick1-dev libgraphicsmagick++3 and maybe some others).<\/p>\n<p style=\"padding-left: 30px;\">sudo apt-get install libtclap-dev libpotrace0\u00a0 libpotrace-dev\u00a0 libocrad-dev openbabel libopenbabel-dev\u00a0 libgraphicsmagick++1-dev libgraphicsmagick++1-dev libgraphicsmagick++3 libgraphicsmagick1-dev libgraphicsmagick3 libnetpbm10-dev<\/p>\n<h2>Quick Install<\/h2>\n<p>Copy and paste the following line to make a directory in \/tmp called OSRA, download the source, extract the packages, and build and install both:<\/p>\n<blockquote><p>cd \/tmp; mkdir OSRA; cd OSRA; wget http:\/\/cactus.nci.nih.gov\/osra\/osra-1.3.8.tgz ; wget http:\/\/cactus.nci.nih.gov\/osra\/gocr-0.50pre-patched.tgz ; tar xzvf osra-1.3.8.tgz; tar xzvf gocr-0.50pre-patched.tgz; cd \/tmp\/OSRA\/gocr-0.50pre-patched; .\/configure; make libs; sudo make all install; cd \/tmp\/OSRA\/osra-1.3.8\/; .\/configure; make all; sudo make install<\/p><\/blockquote>\n<p>Osra should be\u00a0 installed in \/usr\/local\/bin .<\/p>\n<p>Below are the same steps, but with more detail so that you know what your doing:<\/p>\n<h2>Create Directory to Build the Packages<\/h2>\n<p style=\"padding-left: 30px;\">mkdir \/tmp\/OSRA<\/p>\n<h2>Download the Source<\/h2>\n<p>If you have wget install you can download the source via the command line:<\/p>\n<p style=\"padding-left: 30px;\">cd \/tmp\/OSRA;<\/p>\n<p style=\"padding-left: 30px;\">wget http:\/\/cactus.nci.nih.gov\/osra\/osra-1.3.8.tgz ;<\/p>\n<p style=\"padding-left: 30px;\">wget http:\/\/cactus.nci.nih.gov\/osra\/gocr-0.50pre-patched.tgz<\/p>\n<p>Otherwise go to the <a title=\"Download Osra\" href=\"http:\/\/cactus.nci.nih.gov\/osra\/#6\" target=\"_blank\">Osar home page<\/a> and download the source code pacakge for both Osra and Gocr and save it in the directory you created.<\/p>\n<h2>Extract both packages<\/h2>\n<p style=\"padding-left: 30px;\">tar xzvf osra-1.3.8.tgz<br \/>\ntar xzvf gocr-0.50pre-patched.tgz<\/p>\n<h2>Compile &amp; Install Gocr<\/h2>\n<p>You need to make and install the patched Gocr before you try to build Osra:<\/p>\n<p style=\"padding-left: 30px;\">cd \/tmp\/OSRA\/gocr-0.50pre-patched<br \/>\n.\/configure;<br \/>\nmake libs;<br \/>\nsudo make all install;<\/p>\n<p>This will install the patched gocr into \/usr\/local and copy Gocr header files to \/usr\/local\/include\/gocr. This may cause conflicts if you&#8217;ve installed gocr using another methods for instance using apt-get or aptitude. The gocr binary will be in \/usr\/local . If you have any problems, remove any other version of Gocr you may have build.<\/p>\n<p>Before you continue to the next step, make sure the Gocr header files are installed:<\/p>\n<blockquote><p>$ ls \/usr\/local\/include\/gocr\/<br \/>\nconfig.h*\u00a0 gocr.h*\u00a0 list.h*\u00a0 output.h*\u00a0\u00a0 \u00a0pgm2asc.h*\u00a0 pnm.h*\u00a0 unicode.h*<\/p><\/blockquote>\n<p>If you don&#8217;t see the header files, make sure you followed all the steps above.<\/p>\n<h2>Compile &amp; Install Osra<\/h2>\n<p>Next compile Osra:<\/p>\n<p style=\"padding-left: 30px;\">cd \/tmp\/OSRA\/gocr-0.50pre-patched<br \/>\n.\/configure<br \/>\nmake all<\/p>\n<p>To install Osra on your system, run the following using sudo:<\/p>\n<p style=\"padding-left: 30px;\">sudo make install<\/p>\n<p>Look for it in \/usr\/local\/bin:<\/p>\n<p style=\"padding-left: 30px;\">\/usr\/local\/bin\/osra<\/p>\n<p><em><strong>Note<\/strong>: If you break your system while following these instructions, it&#8217;s not my fault. These are give in good faith, but if I&#8217;ve typed something wrong, too bad, I am not responsible! \ud83d\ude42<\/em><\/p>\n<p>\/usr\/local\/bin\/osra &#8211;version<\/p>\n<p>\/usr\/local\/bin\/osra\u00a0 version: 1.3.8<\/p>\n<p>Updated April 12th 2012: Added libnetpbm10-dev to the list of required packaged to pre-install.<br \/>\nUpdated April 16th 2012: Added missing build steps to Gocr section. Was missing .\/configure step<br \/>\nUpdated April 17th 2012: Added &#8220;make libs&#8221; to the Gocr build steps, and fixed typo in the quickie install section.<br \/>\nUpdated April 20th 2012: Added libocrad-dev to list of packages to add. Note: This package is not available for Lucid!<br \/>\nUpdated April 21st: Updated dependencies and cleaned up the document.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary Osra is a a utility designed to convert graphical representations of chemical structures create by Igor Filippov at the National Cancer Institute. This page documents how to compile and install Osra on Ubuntu Linux 11.10. These instructions may work on other versions of Ubuntu Linux and on Debian Linux.\u00a0 Please leave a comment if &hellip; <a href=\"http:\/\/timony.com\/mickzblog\/2012\/03\/24\/build-install-osra-1-3-8\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Build &#038; Install Osra 1.3.8 on Ubuntu 11.10<\/span> <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":{"_exactmetrics_skip_tracking":false,"footnotes":""},"categories":[50,22,33,41],"tags":[164,293,325,337,429,440,450,451,455,498,602],"class_list":["post-775","post","type-post","status-publish","format-standard","hentry","category-cplusplus","category-linux","category-programming","category-ubuntu-linux-2","tag-chemistry","tag-gocr","tag-howto","tag-igor-filippov","tag-nci","tag-nih","tag-ocra","tag-ocrad","tag-openbabel","tag-potrace","tag-ubuntu"],"_links":{"self":[{"href":"http:\/\/timony.com\/mickzblog\/wp-json\/wp\/v2\/posts\/775","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/timony.com\/mickzblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/timony.com\/mickzblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/timony.com\/mickzblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/timony.com\/mickzblog\/wp-json\/wp\/v2\/comments?post=775"}],"version-history":[{"count":0,"href":"http:\/\/timony.com\/mickzblog\/wp-json\/wp\/v2\/posts\/775\/revisions"}],"wp:attachment":[{"href":"http:\/\/timony.com\/mickzblog\/wp-json\/wp\/v2\/media?parent=775"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/timony.com\/mickzblog\/wp-json\/wp\/v2\/categories?post=775"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/timony.com\/mickzblog\/wp-json\/wp\/v2\/tags?post=775"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}