<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Compilation</title><link>https://sourceforge.net/p/osra/wiki/Compilation/</link><description>Recent changes to Compilation</description><atom:link href="https://sourceforge.net/p/osra/wiki/Compilation/feed" rel="self"/><language>en</language><lastBuildDate>Tue, 21 Jul 2020 19:12:42 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/osra/wiki/Compilation/feed" rel="self" type="application/rss+xml"/><item><title>Compilation modified by Igor</title><link>https://sourceforge.net/p/osra/wiki/Compilation/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v9
+++ v10
@@ -81,8 +81,8 @@
 :export LDFLAGS=/usr/local/lib/libiconv.a
 :mkdir build
 :cd build
-:cmake -DBUILD_SHARED=OFF ..\/
-: sudo make install
+:cmake -DBUILD_SHARED=OFF ..
+:sudo make install

 GraphicsMagick:
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Igor</dc:creator><pubDate>Tue, 21 Jul 2020 19:12:42 -0000</pubDate><guid>https://sourceforge.netab6e8df64850571b2004af7449204a9d6dcdf542</guid></item><item><title>Compilation modified by Igor</title><link>https://sourceforge.net/p/osra/wiki/Compilation/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v8
+++ v9
@@ -81,7 +81,7 @@
 :export LDFLAGS=/usr/local/lib/libiconv.a
 :mkdir build
 :cd build
-:cmake -DBUILD_SHARED=OFF ../
+:cmake -DBUILD_SHARED=OFF ..\/
 : sudo make install

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Igor</dc:creator><pubDate>Tue, 21 Jul 2020 19:12:00 -0000</pubDate><guid>https://sourceforge.net5a7125bd4314ec9507cd2b9e452c1c7580688e1b</guid></item><item><title>Compilation modified by Igor</title><link>https://sourceforge.net/p/osra/wiki/Compilation/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v7
+++ v8
@@ -84,6 +84,7 @@
 :cmake -DBUILD_SHARED=OFF ../
 : sudo make install

+
 GraphicsMagick:
 :./configure --disable-shared --with-x=no --disable-openmp --without-threads
 :make
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Igor</dc:creator><pubDate>Tue, 21 Jul 2020 19:10:56 -0000</pubDate><guid>https://sourceforge.net3b18f0d91d63b74d324d24ecf48e8c256dcbac18</guid></item><item><title>Compilation modified by Igor</title><link>https://sourceforge.net/p/osra/wiki/Compilation/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v6
+++ v7
@@ -5,7 +5,7 @@
 * Compile and/or install all the necessary [Dependencies].
 * Unpack OSRA package.
 * Run &lt;tt&gt;./configure&lt;/tt&gt;. By default all dependencies should be autodetected. If not, you need to specify them e.g.:
-*:&lt;pre&gt;./configure --with-tclap-include=/usr/local/include/tclap --with-openbabel-include=/usr/local/include/openbabel-2.0 --with-openbabel-lib=/usr/local/lib&lt;/pre&gt;
+*:&lt;pre&gt;./configure --with-tclap-include=/usr/local/include/tclap --with-openbabel-include=/usr/local/include/openbabel3 --with-openbabel-lib=/usr/local/lib&lt;/pre&gt;
 *: Note: In order to generate and install manpages, you need to '''--enable-docs'''
 * Run &lt;tt&gt;make all install&lt;/tt&gt;. Now you can use OSRA from command-line.

@@ -109,19 +109,17 @@

 Compile and install GraphicsMagick, GOCR (needs "make libs" for library), Potrace (needs ./configure --enable-libpotrace for library), TCLAP, OCRAD.

-Compiling OpenBabel version 2.3.0:
-First make sure zlib, eigen2, and libxml2 are installed. For libxml2 I used the 
-following
+Compiling OpenBabel version 3.0.0:
+First make sure zlib, eigen2, and libxml2 are installed. For libxml2 I used the following
 options for configure: --without-threads --disable-shared;

 Run cmake with the following options:
-:cmake.exe   -G"MSYS Makefiles" -DZLIB_LIBRARY=/usr/local/lib/libz.a -DZLIB_INCLUDE_DIR=/usr/local/inclulde 
-::-DEIGEN2_INCLUDE_DIR=/usr/local/include/eigen2 -DLIBXML2_LIBRARIES=/usr/local/lib/libxml2.a 
-::-DLIBXML2_INCLUDE_DIR=/usr/local/include/libxml2 -DCMAKE_INSTALL_PREFIX=/usr/local/
-::-DBUILD_SHARED=OFF -DCMAKE_CXX_FLAGS=-DLIBXML_STATIC -DCMAKE_C_FLAGS=-DLIBXML_STATIC
-::-DCMAKE_CXX_STANDARD_LIBRARIES=-lws2_32 ../
-:make
-:make install
+cmake.exe   -G"MSYS Makefiles" -DZLIB_LIBRARY=/usr/local/lib/libz.a -DZLIB_INCLUDE_DIR=/usr/local/inclulde -DEIGEN2_INCLUDE_DIR=/usr/local/include/eigen2 -DLIBXML2_LIBRARIES=/usr/local/lib/libxml2.a -DLIBXML2_INCLUDE_DIR=/usr/local/include/libxml2 -DCMAKE_INSTALL_PREFIX=/usr/local/ -DBUILD_SHARED=OFF -DCMAKE_CXX_FLAGS=-DLIBXML_STATIC -DCMAKE_C_FLAGS=-DLIBXML_STATIC -DCMAKE_CXX_STANDARD_LIBRARIES=-lws2_32 ../
+make
+make install
+
+Compiling poppler:
+With MinGW one may need to edit poppler-global.h (lines 25-26) to remove dllimport and dllexport defines, also add to gfile.cc  "#define _WIN32_WINNT 0x0501"

 Compiling osra:

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Igor</dc:creator><pubDate>Tue, 21 Jul 2020 19:08:16 -0000</pubDate><guid>https://sourceforge.net7370aa7b70e201c91eac461ececc8212dfebbad8</guid></item><item><title>Compilation modified by Igor</title><link>https://sourceforge.net/p/osra/wiki/Compilation/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v5
+++ v6
@@ -93,3 +93,77 @@
 :./configure --enable-static-linking --disable-graphicsmagick-config --with-graphicsmagick-lib=/Users/igor/build/lib --with-graphicsmagick-include=/Users/igor/build/include/GraphicsMagick
 :make

+## Windows
+It is possible to compile OSRA using either Cygwin or MinGW environment, however it appears that Cygwin-compiled executable runs about two orders of magnitude slower than a Linux version running on an equivalent class CPU. Therefore it is strongly recommended NOT to use Cygwin to compile OSRA.
+
+#### Instructions for MinGW environment
+
+Before you compile GraphicsMagick it is necessary to install the pre-requisite libraries - zlib, bzip2, jasper (I was able to compile only version 1.701.0 and not the later 1.900.1), jbigkit, jpeg-6b, lcms (1.19 not lcms2), libpng, tiff (3.8.2, not the later 3.9.3, 3.9.4).
+You can read ["ADD-ON LIBRARIES &amp; PROGRAMS"](http://www.graphicsmagick.org/www/README.html) for GraphicsMagick which seems to apply to ImageMagick as well.
+
+Whenever "configure" script was available I used the following options:
+:./configure --disable-shared LDFLAGS=-L/usr/local/lib CPPFLAGS=-I/usr/local/include
+
+To configure GraphicsMagick I used the following options:
+:./configure --disable-shared --without-threads --disable-openmp LDFLAGS=-L/usr/local/lib/ CPPFLAGS=-I/usr/local/include/
+
+Compile and install GraphicsMagick, GOCR (needs "make libs" for library), Potrace (needs ./configure --enable-libpotrace for library), TCLAP, OCRAD.
+
+Compiling OpenBabel version 2.3.0:
+First make sure zlib, eigen2, and libxml2 are installed. For libxml2 I used the 
+following
+options for configure: --without-threads --disable-shared;
+
+Run cmake with the following options:
+:cmake.exe   -G"MSYS Makefiles" -DZLIB_LIBRARY=/usr/local/lib/libz.a -DZLIB_INCLUDE_DIR=/usr/local/inclulde 
+::-DEIGEN2_INCLUDE_DIR=/usr/local/include/eigen2 -DLIBXML2_LIBRARIES=/usr/local/lib/libxml2.a 
+::-DLIBXML2_INCLUDE_DIR=/usr/local/include/libxml2 -DCMAKE_INSTALL_PREFIX=/usr/local/
+::-DBUILD_SHARED=OFF -DCMAKE_CXX_FLAGS=-DLIBXML_STATIC -DCMAKE_C_FLAGS=-DLIBXML_STATIC
+::-DCMAKE_CXX_STANDARD_LIBRARIES=-lws2_32 ../
+:make
+:make install
+
+Compiling osra:
+
+:./configure --with-openbabel-lib=/usr/local/bin --enable-static-linking
+:make
+
+Make sure you take a look at osra.bat to see that the environment is set
+correctly. You will still need delegates.xml from ImageMagick installation
+and a separately installed Ghostscript if you'd like to process PDF and
+PostScript files.
+
+#### Compiling OSRA v1.3.6 or earlier 
+
+Edit the Makefile to set &lt;tt&gt;ARCH&lt;/tt&gt; variable to &lt;tt&gt;win32&lt;/tt&gt;. Running make should (hopefully) generate &lt;tt&gt;osra.exe&lt;/tt&gt;. 
+You're done!
+
+### Instructions for CygWin environment
+
+#### OSRA CLI 
+
+Note: if you are going to link against certain libraries below statically (&lt;tt&gt;--enable-static-linking&lt;/tt&gt; OSRA configuration option), then you need to choose the corresponding option.
+
+* GraphicsMagick (&lt;tt&gt;libGraphicsMagick3&lt;/tt&gt; and &lt;tt&gt;libGraphicsMagick-devel&lt;/tt&gt; v1.3.12) and netpbm (&lt;tt&gt;libnetpbm&lt;/tt&gt; and &lt;tt&gt;libnetpbm-devel&lt;/tt&gt; v10.49.2) are part of CygWin. Install them.
+* Download [GOCR](http://sourceforge.net/projects/osra/files/gocr-patched/gocr-0.50pre-patched.tgz/download) v0.48 and install via &lt;tt&gt;./configure &amp;&amp; make libs install&lt;/tt&gt;
+* Download [OCRAD](http://ftp.de.debian.org/debian/pool/main/o/ocrad/ocrad_0.21.orig.tar.gz) v0.21 and install via &lt;tt&gt;./configure &amp;&amp; make all install&lt;/tt&gt;
+* Download [POTRACE](http://ftp.de.debian.org/debian/pool/main/p/potrace/potrace_1.9.orig.tar.gz) v1.9 and install:
+* As a static library &lt;tt&gt;./configure --with-libpotrace --enable-static &amp;&amp; make all install&lt;/tt&gt;
+* As a dynamic library &lt;tt&gt;./configure --with-libpotrace --enable-shared &amp;&amp; make all install&lt;/tt&gt;
+* Download [TCLAP](http://ftp.de.debian.org/debian/pool/main/t/tclap/tclap_1.2.0.orig.tar.gz) v1.2.0 and install via &lt;tt&gt;./configure &amp;&amp; make all install&lt;/tt&gt;
+* Download [OpenBabel](http://ftp.de.debian.org/debian/pool/main/o/openbabel/openbabel_2.2.3.orig.tar.gz) v2.2.3, fix [this](https://sourceforge.net/support/tracker.php?aid=3308500) (if appropriate), and install:
+* As a dynamic library via &lt;tt&gt;./configure --enable-shared &amp;&amp; make all install&lt;/tt&gt; (needed to install header files)
+* As a static library &lt;tt&gt;./configure --enable-static &amp;&amp; make all install&lt;/tt&gt; (will fail but after the static library is installed so don't care)
+
+#### Java support
+
+* Download and unpack [Sun SDK](http://www.oracle.com/technetwork/java/javase/downloads/index.html).
+* Install / compile [Dependencies] as mentioned above.
+* Set the &lt;tt&gt;JAVA_HOME&lt;/tt&gt; variable to point to JDK (the path should not contain spaces or special characters):
+*:&lt;/pre&gt;&lt;pre&gt;export JAVA_HOME=/cygdrive/c/Java/jdk1.6.0_27&lt;/pre&gt;
+* Run &lt;tt&gt;./configure&lt;/tt&gt; (add any necessary configuration options):
+&lt;pre&gt;./configure --enable-java --enable-static-linking --disable-graphicsmagick-config&lt;/pre&gt;
+* Run &lt;tt&gt;make all install&lt;/tt&gt;. Now library is available in &lt;tt&gt;src/libosra_java.dll&lt;/tt&gt;.
+* Rename the library to &lt;tt&gt;osra_java.dll&lt;/tt&gt; and copy it to either system-wide directory (e.g. &lt;tt&gt;C:\Windows\System32&lt;/tt&gt;) or define &lt;tt&gt;java.library.path&lt;/tt&gt; system property when starting Java:
+&lt;pre&gt;java -Djava.library.path=C:\osra\src -cp commons-io-1.4.jar net.sf.osra.OsraLibTest&lt;/pre&gt;
+

&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Igor</dc:creator><pubDate>Sat, 14 Jun 2014 11:45:09 -0000</pubDate><guid>https://sourceforge.netd25d800b66e1a384aaa4b6c127550326cc367ad1</guid></item><item><title>Compilation modified by Igor</title><link>https://sourceforge.net/p/osra/wiki/Compilation/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v4
+++ v5
@@ -61,4 +61,35 @@
 * Unpack OSRA package and run
 *:&lt;/pre&gt;&lt;pre&gt;./configure &amp;&amp; make all install&lt;/pre&gt;
&lt;p&gt;+## Mac OS X&lt;/p&gt;
&lt;p&gt;+To have static libraries install through MacPorts the following:&lt;br /&gt;
+libxml2, libiconv, zlib, bzip2, freetype, libpng, tiff, lcms, jasper.&lt;br /&gt;
+&lt;br /&gt;
+Download and compile JPEG. Macports version does not work.&lt;br /&gt;
+&lt;br /&gt;
+Compile OCRAD and TCLAP as follows:&lt;br /&gt;
+:./configure;make;sudo make install&lt;br /&gt;
+&lt;br /&gt;
+Potrace:&lt;br /&gt;
+:./configure --with-libpotrace --disable-shared; make; sudo make install&lt;br /&gt;
+&lt;br /&gt;
+GOCR:&lt;br /&gt;
+:./configure; make libs; sudo make install&lt;br /&gt;
+&lt;br /&gt;
+OpenBabel:&lt;br /&gt;
+:export LDFLAGS=/usr/local/lib/libiconv.a&lt;br /&gt;
+:mkdir build&lt;br /&gt;
+:cd build&lt;br /&gt;
+:cmake -DBUILD_SHARED=OFF ../&lt;br /&gt;
+: sudo make install&lt;br /&gt;
+&lt;br /&gt;
+GraphicsMagick:&lt;br /&gt;
+:./configure --disable-shared --with-x=no --disable-openmp --without-threads&lt;br /&gt;
+:make&lt;br /&gt;
+:sudo make install&lt;br /&gt;
+&lt;br /&gt;
+OSRA (assuming you installed static GraphicsMagick libraries and header files in /Users/igor/build):&lt;br /&gt;
+:./configure --enable-static-linking --disable-graphicsmagick-config --with-graphicsmagick-lib=/Users/igor/build/lib --with-graphicsmagick-include=/Users/igor/build/include/GraphicsMagick&lt;br /&gt;
+:make&lt;br /&gt;
+&lt;br /&gt;
&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Igor</dc:creator><pubDate>Sat, 14 Jun 2014 11:44:05 -0000</pubDate><guid>https://sourceforge.netbcf468f4d1117059ada92953e6d2421997dadf92</guid></item><item><title>Compilation modified by Igor</title><link>https://sourceforge.net/p/osra/wiki/Compilation/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -1 +1,64 @@
+### General Linux

+#### OSRA CLI 
+
+* Compile and/or install all the necessary [Dependencies].
+* Unpack OSRA package.
+* Run &lt;tt&gt;./configure&lt;/tt&gt;. By default all dependencies should be autodetected. If not, you need to specify them e.g.:
+*:&lt;/pre&gt;&lt;pre&gt;./configure --with-tclap-include=/usr/local/include/tclap --with-openbabel-include=/usr/local/include/openbabel-2.0 --with-openbabel-lib=/usr/local/lib&lt;/pre&gt;
+*: Note: In order to generate and install manpages, you need to '''--enable-docs'''
+* Run &lt;tt&gt;make all install&lt;/tt&gt;. Now you can use OSRA from command-line.
+
+#### Library support
+
+It is possible to compile OSRA as library (&lt;tt&gt;.so&lt;/tt&gt;).
+
+* All [[dependencies|prerequisites]] that are planned to be statically linked, should be compiled with position-independent code enabled ('''-fPIC''') (not relevant for Windows platform). In particular:
+** For OCRAD: &lt;tt&gt;configure; make CXXFLAGS="-fPIC"&lt;/tt&gt;
+** For GOCR: &lt;tt&gt;configure CFLAGS="-fPIC"; make libs&lt;/tt&gt;
+* Run &lt;tt&gt;./configure&lt;/tt&gt; (add any necessary configuration options):
+*:&lt;pre&gt;./configure --enable-lib&lt;/pre&gt;
+* Run &lt;tt&gt;make all install&lt;/tt&gt;. Now both CLI and library are installed.
+
+#### Java support
+
+* Download and unpack .
+* Make sure that all [Dependencies] that are planned to be statically linked, are compiled with '''-fPIC''' (see previous chapter).
+* Set the &lt;tt&gt;JAVA_HOME&lt;/tt&gt; variable to point to JDK:
+*:&lt;pre&gt;export JAVA_HOME=/usr/local/jdk1.6.0_27&lt;/pre&gt;
+* Run &lt;tt&gt;./configure&lt;/tt&gt; (add any necessary configuration options):
+*:&lt;pre&gt;./configure --enable-java&lt;/pre&gt;
+* Run &lt;tt&gt;make all install&lt;/tt&gt;. This will install dictionaries in shared folder and library to &lt;tt&gt;libs&lt;/tt&gt;.
+* Run &lt;tt&gt;mvn install&lt;/tt&gt;. This will compile Java part of JNI bridge (in &lt;tt&gt;target/osra-1.3.6.jar&lt;/tt&gt;). Alternatively you can use &lt;tt&gt;[OsraLib.java](https://osra.svn.sourceforge.net/svnroot/osra/trunk/addons/lib_java_sample/net/sf/osra/OsraLib.java)&lt;/tt&gt; that does not depend on [JNATI](http://jnati.sourceforge.net/) library.
+* Use the source in &lt;tt&gt;[OsraLibTest.java](https://osra.svn.sourceforge.net/svnroot/osra/trunk/addons/lib_java_sample/net/sf/osra/OsraLibTest.java)&lt;/tt&gt; as example of library usage.
+
+Notes:
+* JVM looks up the libraries in system-wide directories but also in specified by &lt;tt&gt;java.library.path&lt;/tt&gt; system property. So when starting the java application, make sure this property is properly setup or OSRA library is in system path (&lt;tt&gt;/usr/local/lib&lt;/tt&gt; is usually '''not'''):
+*:&lt;pre&gt;java -Djava.library.path=/usr/local/lib -cp commons-io-1.4.jar net.sf.osra.OsraLibTest&lt;/pre&gt;
+* Under unknown circumstances OpenBabel is not correctly initialized when dynamically loaded by JNI bridge. The symptom is that for any image the JNI version returns empty chemical strcuture while CLI vresion works OK. The solution in this case is the following:
+*:&lt;pre&gt;LD_PRELOAD=/usr/local/lib/libopenbabel.so java ...&lt;/pre&gt;
+* It is nearly not possible to compile library (or java library) statically in Linux. This is because most dependencies (POTRACE / OpenBabel / GraphicsMagick) provide libraries for static linking (&lt;tt&gt;.a&lt;/tt&gt;) without position-independent code enabled ('''-fPIC'''). If you wish to include them statically, you need to recompile them the same way as GOCR / OCRAD above (not relevant for Windows platform where all code is position-independent thus creating a statically linked library is easier).
+
+### SuSE
+
+#### OSRA CLI
+
+* You need [SLES v11](http://download.novell.com/protected/Summary.jsp?buildid=hwRS9NNA004~) or SuSE 11.3.
+* Install the following packages:
+*:&lt;pre&gt;yast -i \&amp;#10;  gcc-c++ libstdc++-devel \&amp;#10;  libGraphicsMagick++2 libGraphicsMagick2 libGraphicsMagick++-devel \&amp;#10;  libopenbabel3 libopenbabel-devel libnetpbm-devel libbz2-devel&lt;/pre&gt;
+* The following packages are needed for '''--enable-docs''':
+*:&lt;pre&gt;yast -i libxslt docbook-xsl-stylesheets&lt;/pre&gt;
+* Download and build &lt;tt&gt;tclap&lt;/tt&gt; (build prerequisites: &lt;tt&gt;yast -i doxygen graphviz libtool fdupes&lt;/tt&gt;):
+*:&lt;pre&gt;# wget -nv 'http://download.opensuse.org/repositories/devel:/libraries:/c_c++/openSUSE_Factory/src/tclap-1.2.0-6.18.src.rpm'&amp;#10;# rpm -i tclap-1.2.0-6.18.src.rpm&amp;#10;# rpmbuild -ba /usr/src/packages/SPEC/tclap.spec&amp;#10;# rpm -i /usr/src/packages/RPMS/i686/tclap-1.2.0-6.18.i686.rpm&lt;/pre&gt;
+* Download and build &lt;tt&gt;potrace&lt;/tt&gt; (apply the &lt;tt&gt;&lt;/tt&gt;&lt;!-- ref&gt;POTRACE SuSE patch for &lt;tt&gt;-lib&lt;/tt&gt; and &lt;tt&gt;-devel&lt;/tt&gt; packages&lt;/ref --&gt; or use &lt;tt&gt;&lt;/tt&gt;&lt;!-- ref&gt;POTRACE SuSE source RPM with all patches already applied&lt;/ref --&gt;):
+*:&lt;pre&gt;# wget -nv 'http://download.opensuse.org/source/distribution/11.2/repo/oss/suse/src/potrace-1.8-84.1.src.rpm'&amp;#10;# rpm -i potrace-1.8-84.1.src.rpm&amp;#10;# zcat potrace_1.8.suse.patch.gz | patch -d /usr/src/packages -p1&amp;#10;# rpmbuild -ba /usr/src/packages/SPECS/potrace.spec&amp;#10;# rpm -i /usr/src/packages/RPMS/i686/{potrace-lib-1.8-84.2.i686.rpm,potrace-devel-1.8-84.2.i686.rpm}&lt;/pre&gt;
+* Download and build &lt;tt&gt;ocrad&lt;/tt&gt;:
+*:&lt;pre&gt;# wget -nv 'https://sourceforge.net/projects/osra/files/contrib/1.3.7/ocrad-0.20-1.0.src.rpm/download'&amp;#10;# rpmbuild --rebuild ocrad-0.20-1.0.src.rpm&amp;#10;# rpm -i /usr/src/packages/RPMS/i686/ocrad-devel-0.20-1.0.i686.rpm&lt;/pre&gt;
+* Download and build &lt;tt&gt;gocr&lt;/tt&gt;
+*:&lt;pre&gt;# wget -nv 'https://sourceforge.net/projects/osra/files/contrib/1.3.7/gocr-0.50-1.0.src.rpm/download'&amp;#10;# rpmbuild --rebuild gocr-0.50-1.0.src.rpm&amp;#10;# rpm -i /usr/src/packages/RPMS/i686/gocr-devel-0.50-1.0.i686.rpm&lt;/pre&gt;
+* Optionally you can download, compile and install Cuneiform and Tesseract (you can use '''--with-cuneiform --with-tesseract''' then):
+*:&lt;pre&gt;# wget -nv 'ftp://rpmfind.net/linux/fedora/development/rawhide/source/SRPMS/cuneiform-1.1.0-4.fc17.src.rpm'&amp;#10;# rpmbuild --rebuild cuneiform-1.1.0-4.fc17.src.rpm&amp;#10;# rpm -i /usr/src/packages/RPMS/i686/cuneiform{-devel,}-1.1.0-4.i686.rpm&amp;#10;# wget -nv 'ftp://rpmfind.net/linux/fedora/development/rawhide/source/SRPMS/tesseract-3.00-2.fc15.src.rpm'&amp;#10;# rpmbuild --rebuild tesseract-3.00-2.fc15.src.rpm&amp;#10;# rpm -i /usr/src/packages/RPMS/i686/tesseract{-devel,}-3.00-2.i686.rpm&lt;/pre&gt;
+* Unpack OSRA package and run
+*:&lt;pre&gt;./configure &amp;&amp; make all install&lt;/pre&gt;
+
+

&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Igor</dc:creator><pubDate>Sat, 14 Jun 2014 11:43:04 -0000</pubDate><guid>https://sourceforge.net39c0fe3ada722d58f6e99c1462fe745cf672a1c1</guid></item><item><title>Discussion for Compilation page</title><link>https://sourceforge.net/p/osra/wiki/Compilation/</link><description>&lt;div class="markdown_content"&gt;&lt;h2 id="windows"&gt;Windows&lt;/h2&gt;
&lt;p&gt;It is possible to compile OSRA using either Cygwin or MinGW environment, however it appears that Cygwin-compiled executable runs about two orders of magnitude slower than a Linux version running on an equivalent class CPU. Therefore it is strongly recommended NOT to use Cygwin to compile OSRA.&lt;/p&gt;
&lt;h4 id="instructions-for-mingw-environment"&gt;Instructions for MinGW environment&lt;/h4&gt;
&lt;p&gt;Before you compile GraphicsMagick it is necessary to install the pre-requisite libraries - zlib, bzip2, jasper (I was able to compile only version 1.701.0 and not the later 1.900.1), jbigkit, jpeg-6b, lcms (1.19 not lcms2), libpng, tiff (3.8.2, not the later 3.9.3, 3.9.4).&lt;br /&gt;
You can read &lt;a class="" href="http://www.graphicsmagick.org/www/README.html" rel="nofollow"&gt;"ADD-ON LIBRARIES &amp;amp; PROGRAMS"&lt;/a&gt; for GraphicsMagick which seems to apply to ImageMagick as well.&lt;/p&gt;
&lt;p&gt;Whenever "configure" script was available I used the following options:&lt;br /&gt;
:./configure --disable-shared LDFLAGS=-L/usr/local/lib CPPFLAGS=-I/usr/local/include&lt;/p&gt;
&lt;p&gt;To configure GraphicsMagick I used the following options:&lt;br /&gt;
:./configure --disable-shared --without-threads --disable-openmp LDFLAGS=-L/usr/local/lib/ CPPFLAGS=-I/usr/local/include/&lt;/p&gt;
&lt;p&gt;Compile and install GraphicsMagick, GOCR (needs "make libs" for library), Potrace (needs ./configure --enable-libpotrace for library), TCLAP, OCRAD.&lt;/p&gt;
&lt;p&gt;Compiling OpenBabel version 2.3.0:&lt;br /&gt;
First make sure zlib, eigen2, and libxml2 are installed. For libxml2 I used the &lt;br /&gt;
following&lt;br /&gt;
options for configure: --without-threads --disable-shared;&lt;/p&gt;
&lt;p&gt;Run cmake with the following options:&lt;br /&gt;
:cmake.exe   -G"MSYS Makefiles" -DZLIB_LIBRARY=/usr/local/lib/libz.a -DZLIB_INCLUDE_DIR=/usr/local/inclulde &lt;br /&gt;
::-DEIGEN2_INCLUDE_DIR=/usr/local/include/eigen2 -DLIBXML2_LIBRARIES=/usr/local/lib/libxml2.a &lt;br /&gt;
::-DLIBXML2_INCLUDE_DIR=/usr/local/include/libxml2 -DCMAKE_INSTALL_PREFIX=/usr/local/&lt;br /&gt;
::-DBUILD_SHARED=OFF -DCMAKE_CXX_FLAGS=-DLIBXML_STATIC -DCMAKE_C_FLAGS=-DLIBXML_STATIC&lt;br /&gt;
::-DCMAKE_CXX_STANDARD_LIBRARIES=-lws2_32 ../&lt;br /&gt;
:make&lt;br /&gt;
:make install&lt;/p&gt;
&lt;p&gt;Compiling osra:&lt;/p&gt;
&lt;p&gt;:./configure --with-openbabel-lib=/usr/local/bin --enable-static-linking&lt;br /&gt;
:make&lt;/p&gt;
&lt;p&gt;Make sure you take a look at osra.bat to see that the environment is set&lt;br /&gt;
correctly. You will still need delegates.xml from ImageMagick installation&lt;br /&gt;
and a separately installed Ghostscript if you'd like to process PDF and&lt;br /&gt;
PostScript files.&lt;/p&gt;
&lt;h4 id="compiling-osra-v136-or-earlier"&gt;Compiling OSRA v1.3.6 or earlier&lt;/h4&gt;
&lt;p&gt;Edit the Makefile to set &lt;tt&gt;ARCH&lt;/tt&gt; variable to &lt;tt&gt;win32&lt;/tt&gt;. Running make should (hopefully) generate &lt;tt&gt;osra.exe&lt;/tt&gt;. &lt;br /&gt;
You're done!&lt;/p&gt;
&lt;h3 id="instructions-for-cygwin-environment"&gt;Instructions for CygWin environment&lt;/h3&gt;
&lt;h4 id="osra-cli"&gt;OSRA CLI&lt;/h4&gt;
&lt;p&gt;Note: if you are going to link against certain libraries below statically (&lt;tt&gt;--enable-static-linking&lt;/tt&gt; OSRA configuration option), then you need to choose the corresponding option.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;GraphicsMagick (&lt;tt&gt;libGraphicsMagick3&lt;/tt&gt; and &lt;tt&gt;libGraphicsMagick-devel&lt;/tt&gt; v1.3.12) and netpbm (&lt;tt&gt;libnetpbm&lt;/tt&gt; and &lt;tt&gt;libnetpbm-devel&lt;/tt&gt; v10.49.2) are part of CygWin. Install them.&lt;/li&gt;
&lt;li&gt;Download &lt;a class="" href="http://sourceforge.net/projects/osra/files/gocr-patched/gocr-0.50pre-patched.tgz/download"&gt;GOCR&lt;/a&gt; v0.48 and install via &lt;tt&gt;./configure &amp;amp;&amp;amp; make libs install&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;Download &lt;a class="" href="http://ftp.de.debian.org/debian/pool/main/o/ocrad/ocrad_0.21.orig.tar.gz" rel="nofollow"&gt;OCRAD&lt;/a&gt; v0.21 and install via &lt;tt&gt;./configure &amp;amp;&amp;amp; make all install&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;Download &lt;a class="" href="http://ftp.de.debian.org/debian/pool/main/p/potrace/potrace_1.9.orig.tar.gz" rel="nofollow"&gt;POTRACE&lt;/a&gt; v1.9 and install:&lt;/li&gt;
&lt;li&gt;As a static library &lt;tt&gt;./configure --with-libpotrace --enable-static &amp;amp;&amp;amp; make all install&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;As a dynamic library &lt;tt&gt;./configure --with-libpotrace --enable-shared &amp;amp;&amp;amp; make all install&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;Download &lt;a class="" href="http://ftp.de.debian.org/debian/pool/main/t/tclap/tclap_1.2.0.orig.tar.gz" rel="nofollow"&gt;TCLAP&lt;/a&gt; v1.2.0 and install via &lt;tt&gt;./configure &amp;amp;&amp;amp; make all install&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;Download &lt;a class="" href="http://ftp.de.debian.org/debian/pool/main/o/openbabel/openbabel_2.2.3.orig.tar.gz" rel="nofollow"&gt;OpenBabel&lt;/a&gt; v2.2.3, fix &lt;a class="" href="https://sourceforge.net/support/tracker.php?aid=3308500"&gt;this&lt;/a&gt; (if appropriate), and install:&lt;/li&gt;
&lt;li&gt;As a dynamic library via &lt;tt&gt;./configure --enable-shared &amp;amp;&amp;amp; make all install&lt;/tt&gt; (needed to install header files)&lt;/li&gt;
&lt;li&gt;As a static library &lt;tt&gt;./configure --enable-static &amp;amp;&amp;amp; make all install&lt;/tt&gt; (will fail but after the static library is installed so don't care)&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="java-support"&gt;Java support&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Download and unpack &lt;a class="" href="http://www.oracle.com/technetwork/java/javase/downloads/index.html" rel="nofollow"&gt;Sun SDK&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Install / compile &lt;a class="alink" href="/p/osra/wiki/Dependencies/"&gt;[Dependencies]&lt;/a&gt; as mentioned above.&lt;/li&gt;
&lt;li&gt;Set the &lt;tt&gt;JAVA_HOME&lt;/tt&gt; variable to point to JDK (the path should not contain spaces or special characters):&lt;br /&gt;
*:&lt;pre&gt;export JAVA_HOME=/cygdrive/c/Java/jdk1.6.0_27&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Run &lt;tt&gt;./configure&lt;/tt&gt; (add any necessary configuration options):&lt;br /&gt;
&lt;pre&gt;./configure --enable-java --enable-static-linking --disable-graphicsmagick-config&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Run &lt;tt&gt;make all install&lt;/tt&gt;. Now library is available in &lt;tt&gt;src/libosra_java.dll&lt;/tt&gt;.&lt;/li&gt;
&lt;li&gt;Rename the library to &lt;tt&gt;osra_java.dll&lt;/tt&gt; and copy it to either system-wide directory (e.g. &lt;tt&gt;C:\Windows\System32&lt;/tt&gt;) or define &lt;tt&gt;java.library.path&lt;/tt&gt; system property when starting Java:&lt;br /&gt;
&lt;pre&gt;java -Djava.library.path=C:\osra\src -cp commons-io-1.4.jar net.sf.osra.OsraLibTest&lt;/pre&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Igor</dc:creator><pubDate>Fri, 13 Jun 2014 23:26:02 -0000</pubDate><guid>https://sourceforge.net3b3e6c5a9e1f45ab26e33482eb876da64fde661d</guid></item><item><title>Discussion for Compilation page</title><link>https://sourceforge.net/p/osra/wiki/Compilation/</link><description>&lt;div class="markdown_content"&gt;&lt;h2 id="mac-os-x"&gt;Mac OS X&lt;/h2&gt;
&lt;p&gt;To have static libraries install through MacPorts the following:&lt;br /&gt;
libxml2, libiconv, zlib, bzip2, freetype, libpng, tiff, lcms, jasper.&lt;/p&gt;
&lt;p&gt;Download and compile JPEG. Macports version does not work.&lt;/p&gt;
&lt;p&gt;Compile OCRAD and TCLAP as follows:&lt;br /&gt;
:./configure;make;sudo make install&lt;/p&gt;
&lt;p&gt;Potrace:&lt;br /&gt;
:./configure --with-libpotrace --disable-shared; make; sudo make install&lt;/p&gt;
&lt;p&gt;GOCR:&lt;br /&gt;
:./configure; make libs; sudo make install&lt;/p&gt;
&lt;p&gt;OpenBabel:&lt;br /&gt;
:export LDFLAGS=/usr/local/lib/libiconv.a&lt;br /&gt;
:mkdir build&lt;br /&gt;
:cd build&lt;br /&gt;
:cmake -DBUILD_SHARED=OFF ../&lt;br /&gt;
: sudo make install&lt;/p&gt;
&lt;p&gt;GraphicsMagick:&lt;br /&gt;
:./configure --disable-shared --with-x=no --disable-openmp --without-threads&lt;br /&gt;
:make&lt;br /&gt;
:sudo make install&lt;/p&gt;
&lt;p&gt;OSRA (assuming you installed static GraphicsMagick libraries and header files in /Users/igor/build):&lt;br /&gt;
:./configure --enable-static-linking --disable-graphicsmagick-config --with-graphicsmagick-lib=/Users/igor/build/lib --with-graphicsmagick-include=/Users/igor/build/include/GraphicsMagick&lt;br /&gt;
:make&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Igor</dc:creator><pubDate>Fri, 13 Jun 2014 23:19:02 -0000</pubDate><guid>https://sourceforge.net7c9840dd2aa2eb3d620ef286013fc5a1f3ccc3bd</guid></item><item><title>Compilation modified by Igor</title><link>https://sourceforge.net/p/osra/wiki/Compilation/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -1 +1 @@
-  1. REDIRECT [:Category:Compilation] 
+
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Igor</dc:creator><pubDate>Fri, 13 Jun 2014 23:17:48 -0000</pubDate><guid>https://sourceforge.net236a4b738782b226b50532070795eb8daa769359</guid></item></channel></rss>