[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Missing "libSDL_gfx.so.4"



On Fri, Jul 24, 2009 at 3:56 PM, Marcus von Appen <mva@xxxxxxxxxxxx> wrote:
On, Fri Jul 24, 2009, Evan Kroske wrote:

> I recently tried to install the current version of sdl_gfx from source for
> pygame2. After some problems, I installed it successfully and tested it with
> its own test suite. However, after reinstalling pygame2 with SDL_gfx
> installed, I get an error if I try to import pygame.sdlgfx.primitives:
>
> Traceback (most recent call last):
> >   File "sdlgfxtest.py", line 6, in <module>
> >     import pygame2.sdlgfx.primitives as gfx
> >   File "/usr/lib/python2.5/site-packages/pygame2/sdlgfx/__init__.py", line
> > 1, in <module>
> >     from pygame2.sdlgfx.base import *
> > ImportError: libSDL_gfx.so.4: cannot open shared object file: No such file
> > or directory
> >
[...]

The situation you ran into is a typical "shared library version bump"
issue. What does that mean? You have a library around that's named
foo.so.1. Now you install a new version of it that indicates it is ABI
incompatible to previous versions (thus it has a different version
suffix, e.g. foo.so.3).

What can you do about that? Rebuild pygame2, so it links against the new
version, or install the old version of SDL_gfx again (you even can do
that in in parallel, using a different prefix and let ld know about the
new library directory).

> If you can tell me where the source of pygame2.sdlgfx.base is, I might be
> able to figure it out.

Though this is not a source code issue (as we do not manually dlopen()
any library within pygame2), you can find the sdlgfx.base module source
code in pygame2/src/sdlgfx/gfxmod.c.

Regards
Marcus

How do I rebuild pygame to link against the new versions? Do I have to alter a file? When I try to run make install, I get a long list of warnings starting with this:

In file included from src/sdlgfx/fpsmanager.c:23:
src/sdlgfx/pggfx.h:24:27: error: SDL_framerate.h: No such file or directory

I'm not going to try to downgrade to the last version of sdl_gfx because it wasn't a new enough version to work with pygame2. Thanks for the help.

--
Evan Kroske
http://welcome2obscurity.blogspot.com/
The code, comments, and challenges of a novice
software developer desperate for attention.