Building Decapod

17 views
Skip to first unread message

Martin Krämer

unread,
Nov 22, 2011, 12:32:19 PM11/22/11
to Decapod
Hi,

while setting up Decapod recently I noticed a few (blocking) issues
(Ubuntu 11.10 64 bit):

1. SConstruct of iulib contains a bad check and aborts the installation process:
assert conf.CheckLibWithHeader('tiff', 'tiff.h', 'C', 'inflate();',
1), "please install: libtiff4-dev"

You can apply this patch to iulib's SConstruct to perform the right checks:

--- a/SConstruct Sun May 16 03:57:22 2010 +0200
+++ b/SConstruct Thu Jun 24 14:07:26 2010 +0200
@@ -61,29 +61,30 @@

assert conf.CheckLibWithHeader('png', 'png.h', 'C', 'png_byte;',
1),"please install: libpng12-dev"
assert conf.CheckLibWithHeader('jpeg', 'jconfig.h', 'C',
'jpeg_std_error();', 1),"please install: libjpeg62-dev"
-assert conf.CheckLibWithHeader('tiff', 'tiff.h', 'C', 'inflate();',
1), "please install: libtiff4-dev"
+assert conf.CheckLibWithHeader('z', 'zlib.h', 'C', 'inflate;', 1),
"please install: zlib"
+assert conf.CheckLibWithHeader('tiff', 'tiff.h', 'C', 'TIFFOpen();',
1), "please install: libtiff4-dev"

2. The repository for ocropus 0.4.4 has changed:
hg clone -r ocropus-0.4.4 https://code,google.com/p/ocropus.ocroold
Checking out from another repository, e.g. using the install script,
will NOT install ocropus 0.4.4 at the moment and Decapod won't work.

We will switch to the new version of ocropus in the coming weeks and
fix these issues in the process.

Cheers
Martin

Martin Krämer

unread,
Nov 22, 2011, 12:46:47 PM11/22/11
to Decapod
Please replace the comma with a dot in the mercurial:
hg clone -r ocropus-0.4.4 https://code.google.com/p/ocropus.ocroold

Jonathan Hung

unread,
Nov 22, 2011, 6:52:04 PM11/22/11
to dec...@googlegroups.com
Hi Martin,

Thanks for the tip. Going through the install process revealed some other moved URLs (i.e. openfst has moved too).

I managed to get Decapod running starting with the tip version from the default repository (https://jhung.u...@code.google.com/p/decapod/ )

After cloning the repository, I did the following changes

1.I changed some of the URLs in the ./install-scripts/decapod-ocropus.sh script. openfst url moved, and the iulib and ocropus hg addresses didn't seem to resolve sometimes. Here's what my block from Line 58-63 looks like:

clone_and_install_ocropus_lib https://code.google.com/p/iulib/ iulib
clone_and_install_ocropus_lib https://code.google.com/p/ocropus.ocroold/ ocropus
download_and_install https://launchpad.net/debian/+archive/primary/+files/openfst_1.1.orig.tar.gz openfst-1.1.tar.gz openfst-1.1 openfst 1.1
clone_and_make_ocropus_lib https://pyopenfst.googlecode.com/hg/ pyopenfst
clone_and_make_ocropus_lib https://ocroswig.ocropus.googlecode.com/hg/ ocroswig
clone_and_install_python_lib https://ocropy.ocropus.googlecode.com/hg/ ocropy

2. Line 33 in ./install-scripts/decapod-decapod.sh, I changed it to:
hg update -r c7ade205dec2

3. Line 12 in /decapod-genpdf/src/setup.py was changed to:
scripts = glob.glob("ocro*") + ["decapod-genpdf.py"] + ["fontGrouper.py"] + ["img2pdfper.py"],

Then running ./install-scripts/decapod-all.py

4. Removing the build/ directory and reinstalling without running the ./decapod-all.sh -remove command seems to work. Removing the build directory seems to force an overwrite of any previously installed files.

5. It appears I did not have to patch iulib to run correctly, but it may still be required for some cases?

If this works correctly, then we'll make the above changes to the repository code.

- Jon.



--
You received this message because you are subscribed to the Google Groups "Decapod" group.
To post to this group, send email to dec...@googlegroups.com.
To unsubscribe from this group, send email to decapod+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/decapod?hl=en.


test2-t3.pdf

Martin Krämer

unread,
Nov 22, 2011, 8:16:53 PM11/22/11
to dec...@googlegroups.com
> 5. It appears I did not have to patch iulib to run correctly, but it may still be required for some cases?

Yes, this issue didn't occur on all installations. I encountered it
first time on the latest setup of Ubuntu 11.10 64-bit a few days ago.
I wouldn't directly patch the repository before making sure that it
doesn't break anything on other setups.

Martin

Reply all
Reply to author
Forward
0 new messages