I'm trying to make a Mac OSX application with OCRopus inside it, but
./configure --prefix=/whatever doesn't seem to work correctly because
there are hard coded paths to /usr/local/share/ocropus. I am also want
to be using ocropus on my paid hosting where I can only install things
in my home directory, /usr/local is off limits. I believe I will have
failures there for the same reasons.
My configure line:
LD_LIBRARY_DIRS=/Applications/TakOCR.app/Contents/Resources/lib/
./configure --prefix=/Applications/TakOCR.app/Contents/Resources/
--with-tesseract=/Applications/TakOCR.app/Contents/Resources/
--with-iulib=/Applications/TakOCR.app/Contents/Resources/
Me having the problem:
iMac-2:Resources icm$ which ocroscript
/Applications/TakOCR.app/Contents/Resources/bin//ocroscript
iMac-2:Resources icm$ pwd
/Applications/TakOCR.app/Contents/Resources
iMac-2:Resources icm$ ocroscript recognize ~/tako/ocrme.png
ocroscript: [string "require(arg_script_name)"]:1: module 'recognize' not found:
no field package.preload['recognize']
no file '/usr/local/share/ocropus/scripts//recognize.lua'
no file './recognize.so'
no file '/usr/local/lib/lua/5.1/recognize.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
iMac-2:Resources icm$ ocroscript share/ocropus/scripts/recognize.lua
~/tako/ocrme.png
ocroscript: share/ocropus/scripts/recognize.lua:25: module 'lib.util' not found:
no field package.preload['lib.util']
no file '/usr/local/share/ocropus/scripts//lib/util.lua'
<======== Still looking in /usr/local/ despite --prefix in
configure line
no file './lib/util.so'
no file '/usr/local/lib/lua/5.1/lib/util.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file './lib.so'
no file '/usr/local/lib/lua/5.1/lib.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
share/ocropus/scripts/recognize.lua:25: in main chunk
[C]: ?
iMac-2:Resources icm$
Here's where I'm guessing the problem is, but I'm not really familiar
with the codebase yet, so tell me if I'm off...
iMac-2:ocropus-svn icm$ svn info
Path: .
URL: http://ocropus.googlecode.com/svn/trunk
Repository Root: http://ocropus.googlecode.com/svn
Repository UUID: 16af51af-5c28-0410-86d7-8151429d2513
Revision: 1307
Node Kind: directory
Schedule: normal
Last Changed Author: christian.kofler
Last Changed Rev: 1307
Last Changed Date: 2008-11-26 06:21:16 -0600 (Wed, 26 Nov 2008)
iMac-2:ocropus-svn icm$ grep -r '/usr/local/share/ocropus' . | grep -v
'\.svn' <=========== List of places in code where /usr/local/
is hardcoded
./ocr-utils/resource-path.cc:static const char *default_path =
"/usr/local/share/ocropus:"
./ocroscript/ocrotoplevel.cc:#define OCROSCRIPTS
"/usr/local/share/ocropus/scripts/"
./ocroscript/ocrotoplevel.cc:#define OCRODATA "/usr/local/share/ocropus/"
./ocroscript/scripts/lib/util.lua: local ocrodata =
'.:../data/models:/usr/local/share/ocropus'
./utilities/align-all:
bpnet=/usr/local/share/ocropus/models/neural-net-file.nn ocroscript
align-transcription --cut $image $base.txt $base.cseg.png
$base.rseg.png $base.costs
./utilities/process-volume:nnet_file =
"/usr/local/share/ocropus/models/neural-net-file.nn"
Thank you,
--
Michael Moore
-------------------------
Share your families' genealogy and family history books. It's easy and
free : http://bookscanned.com
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---