[Slackbuilds-users] ocropus compilation error

B Watson yalhcru at gmail.com
Thu Apr 14 04:23:46 UTC 2011


On 4/13/11, Nikos Skalkotos <skalkoto at gmail.com> wrote:

> I tried to compile ocropus and I get errors like those below.
> ocropus states iulib as it's dependency. It looks like iulib needs an SDL
> library, maybe SDL_image

I have no idea what ocropus is, but:

> dgraphics.cc:(.text+0x1a0): undefined reference to `SDL_Init'
> dgraphics.cc:(.text+0x1bc): undefined reference to `SDL_SetVideoMode'
> /usr/lib/libiulib.a(dgraphics.o): In function `iulib::dclear(int)':
> dgraphics.cc:(.text+0x253): undefined reference to `SDL_MapRGB'
> dgraphics.cc:(.text+0x26b): undefined reference to `SDL_FillRect'
> dgraphics.cc:(.text+0x298): undefined reference to `SDL_UpdateRect'
> /usr/lib/libiulib.a(dgraphics.o): In function `iulib::dwait()':
> dgraphics.cc:(.text+0x2cc): undefined reference to `SDL_WaitEvent'

These are standard SDL functions (part of the SDL package in Slackware),
not in an extra library like SDL_image.

The only obvious thing I see from your compile:

> g++  -O2 -march=i486 -mtune=i686 -Wl,-E -L/usr/lib -L/usr/lib -o ocroscript
> ocroscript.o ocrotoplevel.o -ltiff -lpng -ljpeg ./../ext/lua/liblua.a
> libocroscript.a ./../libocropus.a ./../ext/tolua++/libtolua++.a
> -ltesseract_full -lpthread -liulib -ltiff -ljpeg -lpng -lz

I don't actually see -lSDL in that compile command. Don't know what's
causing it to be missing though. Normally, Makefiles and/or configure
scripts will use either "sdl-config --libs" or "pkg-config --libs sdl"
to get the correct link flags (both of which work fine on my -current
box), maybe this will give you a starting point to diagnose the problem...


More information about the SlackBuilds-users mailing list