On Mon, Jul 19, 2010 at 8:37 AM, Almar Klein <almar.kl...@gmail.com> wrote:
> Thanks Anthony,

You're welcome.

>> > I want to distribute an application written in python 3.1 that uses the
>> > PyQt4 widget toolkit. I'd like to make the app available to as many
>> > people
>> > as possible (in binary form). I've gotten it to freeze on both windows
>> > and
>> > linux (I don't own a mac). In my experience the windows-frozen apps
>> > always
>> > work on windows machines, but I've no clue how well this works in Linux.
>> > Will the binaries work on *any* Linux distribution? Or only on Debian
>> > derived Linuxes (I'm running Linux Mint myself)?
>>
>> On Linux the main issue is glibc which you need to make sure is "as
>> old as possible" in order to cover most of the distributions out
>> there. Glibc is backwards compatible but not forwards compatible so
>> you need to act accordingly. I generally use CentOS 5.x as that is
>> fairly old and covers most of the distributions in the past few years.
>
> So you mean I'd best build the binaries on an old OS? And does this depend
> on how much "exotic low level stuff" I use in my application, or only how
> new the version is that is on my system?

The main issue is glibc. Whatever version you are using everyone else
who will use your package needs to use that version of glibc or a more
recent one. Everything links to that library so everything stands or
falls on what version you happen to have installed. Since that package
is regularly being improved new distributions generally include newer
versions of glibc, too.

> And would that be a common problem, or only for 2% of people who use old
> OS's?

I wouldn't know the number of people who use an older OS. I guess it
depends on who you are targeting. If you are targeting server use then
I would expect that CentOS 5.x would be rather common. On the other
hand, if you are targeting only desktop use, then anything older than
a few years is probably quite rare. The only way to find out for sure
is to ask for feedback if you only support a recent OS.

> It's just that I found installing Qt4 with Qscintilla for Python3.1 on Linux
> quite a project itself, and I feel reluctant to having to do that again on a
> distribution that I do not know. I'm rather new to Linux you see...

Sure. Building on Linux is fairly straightforward so you could
probably manage it. :-) I would suggest using a virtual machine with
something like Oracle Virtual Box if you're going to try it. It allows
you to maintain an older environment without having to use it yourself
on a daily basis. :-) If that is too much work you could also ask
someone who uses your application already and is willing to build your
application for you to package it and provide you the binary for
redistribution.

>> Generally, you need to run ldd on the executable and see what turns up
>> and make sure that either the shared library is "standard" and
>> available on all distributions, your documentation includes a
>> reference to this library as something that needs to be installed on
>> the system (not normally installed but available from standard
>> repositories) or is included in your package. cx_Freeze automatically
>> performs ldd on the executable and all Python extensions but will
>> ignore anything found in /lib and /usr/lib as "standard".
>
> Does this mean that if it needs a library that is not standard, but which I
> installed at some point, will not be included in the application?

Anything in /lib and /usr/lib will be ignored. What is "standard"
depends on which distribution you are using. There are some "real"
standards which all distributions follow but without actually looking
at each distribution you're going to have a hard time there. I guess
the best thing to do is ask for feedback if the binaries don't work.
Or document what you have installed that is beyond the base system.

> Here's an idea: what if I installed say CentOS and test the binaries there.
> If they'd work, would I be (relatively) save?

Probably. I can't say for certain, of course, but you should be
relatively safe. ;-)

Anthony

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
cx-freeze-users mailing list
cx-freeze-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cx-freeze-users

Reply via email to