The recommended distribution for building ocropus is ubuntu. However, I have more experience with Fedora and am currently running Fedora 12.
Most things work fine using Fedora instead of ubuntu, but the external library names are slightly different. I don't know whether ubuntu or Fedora are being creative with naming conventions. A bit of time with Google is sufficient to find the correct names for compiling and running under Fedora. See below: *Ocropus on Fedora 12* After installing mercurial and downloading ocropus Need to yum install scons yum install gcc yum install gcc-c++ yum install ImageMagick-devel yum install SDL-devel yum install SDL_gfx-devel yum install SDL_image-devel yum install libjpeg-devel yum install giflib-devel yum install sqlite-devel yum install gsl-devel yum install blas-devel yum install atlas-devel (maybe not necessary) Go to http://code.google.com/p/leptonica/downloads/list and download the latest version of leptonlib<version>.tar.gz then, in a directory separate (parent) from ocropus, do tar zxf leptonlib<version>.tar.gz cd leptonlib* ./configure make make install cd ../ocropus *ocropus will compile and install now, but if you want to add more options:* edit SConstruct change env.Append(LIBS=["gsl","blas"]) to env.Append(LIBS=["gsl","blas","gslcblas"]) change opts.Add(BoolVariable('gsl', "use GSL-dependent features", "no") to opts.Add(BoolVariable('gsl', "use GSL-dependent features", "yes") * Compile and Install* scons scons install To get the shared libraries to link properly at run time, make sure the lines /usr/local/lib64 /usr/local/lib are visible to the program ldconfig The best way to do this is to add the file ocropus.conf to the directory /etc/ld.so.conf.d The contents of the file ocropus.conf is: /usr/local/lib64 /usr/local/lib After creating this file, then do ldconfig to link all the /usr/local libraries into the shared library lists. You can turn on leptonica in SConstruct, but when you do scons, you will run into the error: In file included from ocr-layout/ocr-layout-internal.h:60, from ocr-layout/ocr-color-encode-layout.cc:29: ocr-layout/ocr-text-image-seg.h:77: error: no unique final overrider for 'virtual const char* iulib::IComponent::interface()' in 'ocropus::RemoveImageRegions' scons: *** [ocr-layout/ocr-color-encode-layout.os] Error 1 scons: building terminated because of errors. See ocropus email list - this has not yet been resolved. I am running ocropus with the leptonica turned to "no" in SConstruct *Testing* Version? ocropus --version doesn't seem to work, however: # strings version.os 352+ 2010-03-08 x86_64 GNU/Linux # # ocropus page data/testimages/12col-300.png [info] got 4060 bboxes [info] all = 0 Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur nonummy varius augue . Nunc velit eros, faucibus id, fermentum eget, semper eget, odio. Praesent tempus tincidunt risus. Ut non diam vel .... .... # time ocropus page data/testimages/test-layout.png real 0m18.744s user 0m11.383s sys 0m7.357s # My system has a quad Intel cpu and 8GB of memory. At its max, about half of the memory was used during the run as seen on the system monitor graphic. *Further notes:* $ scons -j 4 sdl=1 $ sudo scons -j 4 sdl=1 install Does not seem to be much difference with or without "-j 4 sdl=1" Have fun - Bob G -- You received this message because you are subscribed to the Google Groups "ocropus" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/ocropus?hl=en.
