473,698 Members | 2,615 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

distributing a app frozen by cx_freeze


After a good deal of tunig I managed to freeze my application.

I ended up with an executable, and a Bunch of .so files in the
It runs fine in the original machine.

I copied the install folder to another machine but the executable wont
run. Here's the traceback:

Traceback (most recent call last):
"/home/fccoelho/Downloads/cx_Freeze-3.0.2/initscripts/Console.py", line
26, in ?
File "epigrass.p y", line 4, in ?
ImportError: /home/flavio/freeze/qt.so: undefined symbol:
_ZNK9QSGIStyle9 classNameEv
It is looking for the Original cx_freeze installation!! Do I have to
distribute cxFreeze with my app? I don't think so. But in that case,
how do I remove this dependency?

any help is appreciated


May 13 '06 #1
7 3335
Flavio wrote:
Traceback (most recent call last):
"/home/fccoelho/Downloads/cx_Freeze-3.0.2/initscripts/Console.py", line
26, in ?
File "epigrass.p y", line 4, in ?
ImportError: /home/flavio/freeze/qt.so: undefined symbol:
_ZNK9QSGIStyle9 classNameEv

It is looking for the Original cx_freeze installation!!

I doubt it is.

Do you have the QT installed on the second system? If you do, is it
the same version as on the original system? Are you sure you copied
all the files over? It looks like qt.so is trying to access a C++
symbol in another library (libqt.so perhaps?), but that other library
isn't installed.

cx_freeze probably only packages the Python module binding to the QT
library; not the library itself. If so, you'll need to install QT on
the other system, or get cx_freeze to bundle up the QT shared library
(if the license allows it, of course), or rebuild the qt.so with the
static QT libraries.
Carl Banks

May 13 '06 #2
Thanks for the hint. I'll try to get cx_freeze to bundle up other
shared libraries it may not be bundling such as qtcanvas, qtext, qtui,
etc. and see if it works.

I'll post back the results to help other poor souls like me.


May 13 '06 #3
Well I managed to get rid of the undefined symbol message by copying
all qt libs to the freeze directory, the problem is that now the
package is huge (83MB)!

So my question is: is there a way to find out exactly which lib is
missing ?


May 13 '06 #4

Flavio wrote:
Well I managed to get rid of the undefined symbol message by copying
all qt libs to the freeze directory, the problem is that now the
package is huge (83MB)!

So my question is: is there a way to find out exactly which lib is
missing ?

You know, if you're doing this on Linux, it's not all that unreasonable
to require QT to be installed on the target system. Any reasonable
distribution has it nicely packaged.

But, if you must, "ldd qt.so" will list library dependencies of qt.so.
Carl Banks

May 13 '06 #5
I know, but the whole point of cx_freeze is to generate standalone
executables, so asking for an installation of an specific version of Qt
is just a little better than asking the end user to install from

May 13 '06 #6
Flavio wrote:
ImportError: /home/flavio/freeze/qt.so: undefined symbol:
_ZNK9QSGIStyle9 classNameEv So my question is: is there a way to find out exactly which lib is
missing ?

yes - find the one with that symbol. wash, rinse, repeat. ;)

Edward Elliott
UC Berkeley School of Law (Boalt Hall)
complangpython at eddeye dot net
May 13 '06 #7
Flavio wrote:
Well I managed to get rid of the undefined symbol message by copying
all qt libs to the freeze directory, the problem is that now the
package is huge (83MB)!

So my question is: is there a way to find out exactly which lib is
missing ?

I haven't done that myself, but I've had an idea of discovering
dependances for dynamic languages: run your test suite and register
which files are loaded (byte code, dlls, datafiles), then remove from
the list all files your know they were used only for testing, that's
it, now you know all the files that you need to run your application.

On linux you can find you which .so files are loaded by looking at file
/proc/self/maps at the end of running your test suite. To find out
which python bytecode files were loaded you can use -v option of
python, it will print all files that were loaded to stderr, to separate
its output from other stderr stuff, you can redirect sys.stderr to some
other file.

After you've done all that work, I'm not sure if you need cx_freeze.
You just need to write little startup script that will set
LD_LIBRARY_PATH , PYTHONPATH and start your main script.

May 14 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Paul | last post by:
Hi I'm trying to build a standalone COM exe server using Python 2.2 + Mark Hammond's windows extensions + Py2Exe. I've built the example linked on the Py2Exe homepage and get this error when running the exe: I:\Program Files\Python22\dist\comtest>comtest --register Traceback (most recent call last): File "<string>", line 37, in ? File "win32com\server\register.pyc", line 468, in UseCommandLine
by: Chris | last post by:
I would like to be able to "package-up" a Python application on my development platform (Linux) so that it can be easily distributed and installed on Windows and UNIX e.g. HP-UX, AIX etc. I'd rather not use Python's disutils. I've looked at cx_Freeze but this requires a "base executable" to be available for each target platform i.e. I'd need to compile this base executable on the target platforms but I don't have access to them all. I've...
by: Phillip Mills | last post by:
I've learned enough of the Python language to be mildly dangerous and have used it in a few personal projects. All my development of commercial (or production) products over the past dozen years have been done with C++ or Java. For a program I'm planning -- to begin during the summer -- having an interpreter as part of the application would be very desirable to allow sophisticated users to provide their own extensions. Java would be...
by: Kevin Walzer | last post by:
I am trying to build a simple "hello.py" script with cx_freeze, but am not having any luck. Every time I run the FreezePython utility I get this error message: Traceback (most recent call last): File "/Users/kevin/Desktop/cx_Freeze-3.0.2/initscripts/ConsoleKeepPath.py", line 15, in ? exec code in m.__dict__ File "FreezePython.py", line 1, in ?
by: diffuser78 | last post by:
Has anybody written a file for cx_freeze. I am running Ubuntu Linux and downloaded version for Python2.4. When I run it I get an error saying that I dont have GLIBC_2.4. I searched around but couldn't find a .deb for Ubuntu, I couldnt find this in Synaptic too. Any clues or pointers as to how to get cx_freeze up and running.
by: BM | last post by:
Hi. Does somebody used cx_Freeze, especially on Mac? I have a trouble to make *standalone* program. If I use dynamically compiled Python as it done by default, I always have an "hardcoded" URL inside the Python binary something like /usr/local/Python2.5/lib/libpython.... so after I freeze stuff and put to another machine, it fails with exactly the error: Library /usr/local/Python2.5/blah-blah/... is missing. Means, not a standalone App so...
by: mathieu | last post by:
Hello, I am currently investigating how to distribute a python based application on a targeted linux system (debian) and so far I only found two options: - Freeze (shipped with python dist) - cx_Freeze (*) As far as I understand those two options are very close. According to the cx_Freeze README cx_Freeze is simply easier to use (no dependencie
by: Tina I | last post by:
Hi list, Is there a preferred way to distribute programs that depends on third party modules like PyQt, Beautifulsoup etc? I have used setuptools and just having the setup script check for the existence of the required modules. If they're not found I have it exit with a message that it need this or that installed. But this is not very convenient for the end user and I have got a few complaints about it. Am I missing something in...
by: Funpolice | last post by:
Hello, I have written a program that requires some modules from pyxml to run. It will run fine on my pc but if I try to run it on another pc with python but without the pyxml modules, I will get import errors. What is the best way to run my program on other pc's without having to install dependent modules on them? I have tried cx_freeze, freeze.py and am having issues with those. Is there any other alternatives? I am using python 2.5 and...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.