LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Creating python + pygame binaries on Slackware 13.37 problem. (https://www.linuxquestions.org/questions/slackware-14/creating-python-pygame-binaries-on-slackware-13-37-problem-923413/)

Braqoon 01-12-2012 04:25 AM

Creating python + pygame binaries on Slackware 13.37 problem.
 
Hi All,

I was a happy Slackware user for past 10 years. Until yesterday that is.
I have created a small game with python and pygame which works fine from sources.

Problem starts when i wanted to create a binary. Using cx_freeze or pyinstaller i got no errors while compiling and standalone build. Works ok on slackware.

I got users which reported problems on Debian and possibly others:

File "/usr/lib/python2.6/site-packages/cx_Freeze/initscripts/Console.py", line 27, in <module>
File "DarkGates.py", line 30, in <module>
File "DarkGates.py", line 16, in main
pygame.error: File is not a Windows BMP file"

This is due libpng is not loaded properly (got segfaults as well when build with pyinstaller), which is bundled with binary.

Now, i did a binary form same source under Linux Mint, and binary worked fine on Debian nad Fedora (different enough ?). It works on Slackware bo has some minor problems.

Kind of pulling may hair out why build on Slackware not working elsewhere. All testing done under 32-bit env.

Any help will be appreciated.

knudfl 01-12-2012 10:28 AM

The default libpng ( libpng.so ) is version 1.4.5 in Slackware (13.37)
and thus incompatible with Debian, Ubuntu, Fedora, CentOS, etc.,
which all use version 1.2.4x.
( Slackware has a "libpng12.so.0.44.0" included too.)


A workaround could be : cd /usr/lib/ && mv libpng.so libpng.so-back
&& ln -s libpng12.so.0.44.0 libpng.so
..... Then all build of software will use the compatible libpng12.so.0.44.0
( At least compatible with the latest versions of Debian, Ubuntu, Fedora.
but probably not with all older versions : Ubuntu 10.10 libpng 1.2.44,
Debian Squeeze libpng 1.2.44, Fedora 14 libpng 1.2.44 or later.)

.

Braqoon 01-12-2012 05:03 PM

Thanks knudfl this will explain a lot but one thing is still unclear. So why Slackware is not happy with binary package which has been build with older version of libpng ? Newer libpng in Slackware should have no problem, right ? yet it have.

Braqoon 01-12-2012 05:48 PM

hmm, digging into it more. Checked what pyinstaller compressed into binary , and it shows :

(6865187, 69667, 145260, 1, 'b', 'libpng12.so.0'),

So libpng is there. So if i got libpng already in, why this problem even occur ?

Thanks for any ideas.


All times are GMT -5. The time now is 06:58 PM.