#19 Does not build on OS X

open
nobody
None
5
2006-11-05
2006-11-05
Anonymous
No

The build setup is hopelessly brain-dead, failing to compile on OS X due
to lack of linux includes:

$ make
make all-recursive
Making all in ccstruct
source='blobbox.cpp' object='blobbox.o' libtool=no \ depfile='.deps/blobbox.Po' tmpdepfile='.deps/blobbox.TPo' \ depmode=gcc3 /bin/sh ../config/depcomp \ g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../ccutil -I../cutil -I../image -I../
viewer -I/opt/local/include -DNDEBUG -O3 -Wall -c -o blobbox.o `test
-f 'blobbox.cpp' || echo './'`blobbox.cpp
In file included from ../ccutil/host.h:73,
from ../ccutil/clst.h:24,
from ../ccutil/varable.h:24,
from blobbox.h:23,
from blobbox.cpp:21:
../ccutil/platform.h:7:26: error: linux/limits.h: No such file or directory
make[3]: *** [blobbox.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Discussion

  • Logged In: NO

    Autoconf suckage again..

    platform.h is trying for linux style headers #include /usr/include/sys/syslimits.h instead

    >ash@pants.aeria.net

     
  • Logged In: NO

    The platform adaptation cutil and ccutils libraries aren't properly autoconfed but the os x changes are all headers.
    you'll also see:
    root@devi.local:cutil}make {root@/dev/ttyp9
    source='listio.cpp' object='listio.o' libtool=no \ depfile='.deps/listio.Po' tmpdepfile='.deps/listio.TPo' \ depmode=gcc3 /bin/sh ../config/depcomp \ g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../ccutil -I/sw/include -DNDEBUG -O3 -Wall -c -o listio.o `test -f 'listio.cpp' || echo './'`listio.cpp
    listio.cpp:33:20: error: malloc.h: No such file or directory
    make[1]: *** [listio.o] Error 1
    make: *** [all-recursive] Error 1
    Exit 2

    and same in util.cpp and variables.cpp

    //#include <malloc.h>
    #include "/usr/include/sys/malloc.h"

    and it builds, commitergods, hear my header tweaks!

     
  • peter-auk
    peter-auk
    2007-01-19

    Logged In: YES
    user_id=1696672
    Originator: NO

    MacOS 10.4.7 with X-Code 2.1
    ./configure throws fairly elementary errors which can easilly be fixed
    by symlinking up a level both /usr/include/ppc/limits.h (or i86 ;-)
    and /usr/include/malloc/malloc.h

    Why symlink instead of adding includes to the ./configure -?
    Because this method should also have fixed the next slack lunix
    configure script I bump into...

     
  • Logged In: NO

    Trying to compile on MacOS, looking here for info, but can't understand what you all are saying. Can anyone give a step-by-step regarding what needs to be changed (and where) so that it will compile on MacOS?

    thanks.

     
  • Logged In: NO

    I'm pretty clueless when it comes to this stuff but version 1.03 compiled successfully on PPC OS X 10.4.9, without any changes.

    After unpacking tesseract-1.03.tar.gz > tesseract-1.03.tar > tesseract-1.03, which is a folder:
    $ cd /path/to/tesseract-1.03
    $ ./configure
    $ make

    The "tesseract" binary ended up in a subfolder called "ccmain". Note that the "README" file says "The executable must reside in the same directory as the tessdata directory" so move one or the other, or both to meet this requirement.

    Read the README - it has some other important stuff regarding usage.
    The OCR is not bad, but it doesn't seem to like e-mail addresses. The "@" keeps coming up as different things like "i(i", "D", blanks, etc...