Building pygame on Fedora 21 fails

Issue #240 resolved
virtuald NA
created an issue

When building pygame on Fedora 21 via pip+hg, I get the following error message:

/usr/bin/ld: cannot find -lporttime

The common solution found on the internet (which worked for me) is creating a symlink from libportmidi.so to libporttime.so:

cd /usr/lib64
sudo ln -s libportmidi.so.0.217 libporttime.so

However, it'd be nice if pygame was able to detect the dependency properly and link to the correct library. Thanks for your work!

Comments (19)

  1. Thomas Kluyver

    In Fedora, I guess they compile into one shared library - there is still a separate porttime.h header file. I can't work out exactly where that difference comes from, but Fedora has a newer SVN snapshot of portmidi (217 rather than 184), so maybe it's something that portmidi changed. I don't know how best to check for that.

  2. Thomas Kluyver

    Not that I can think of. We can probably detect Fedora vs Ubuntu, but that feels clumsy. The real distinction, I think, is the version of portmidi they have packaged, and I don't know of any general cross-distro way to check for that.

  3. René Dudfield
    • changed status to open

    Damn. I meant to push to a new branch I'd made. But hg commit --amend for some reason changes back to default branch.

    See commit f463b140c832

    If there is no PORTMIDI_INC_PORTTIME environment variable it also checks for a /etc/redhat-release file and uses portmidi as porttime in that case.

    Seem ok?

  4. Thomas Kluyver

    I have confirmed that /etc/redhat-release exists on my Fedora machine and not on my Ubuntu one. However, there's a problem with how you check the environment variable (I made a comment on the commit). I think that having a reliable way to override it is more important than autodetection.

  5. Log in to comment