LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-12-2012, 04:25 AM   #1
Braqoon
LQ Newbie
 
Registered: Oct 2006
Location: UK
Distribution: Slackware
Posts: 20

Rep: Reputation: 1
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.
 
Old 01-12-2012, 10:28 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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.)

.
 
Old 01-12-2012, 05:03 PM   #3
Braqoon
LQ Newbie
 
Registered: Oct 2006
Location: UK
Distribution: Slackware
Posts: 20

Original Poster
Rep: Reputation: 1
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.
 
Old 01-12-2012, 05:48 PM   #4
Braqoon
LQ Newbie
 
Registered: Oct 2006
Location: UK
Distribution: Slackware
Posts: 20

Original Poster
Rep: Reputation: 1
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] installing Pygame for Python on Mint8 ldmn Linux Mint 3 06-10-2010 03:38 AM
pygame: example of creating a Sound from an object eantoranz Programming 1 10-26-2009 10:12 AM
KDE 4.2.2 Binaries for Slackware 12.2 schmoopie Slackware 5 04-23-2009 05:41 PM
Python + Pygame: Making a typing game, is it difficult? sonicbhoc Programming 2 11-26-2006 06:55 AM
while creating binaries iam getting elf error cybercop12us Programming 2 03-25-2003 07:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration