473,543 Members | 1,916 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

distributing a app frozen by cx_freeze

Hi,

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
install-dir.
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):
File
"/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

Flávio

May 13 '06 #1
7 3328
Flavio wrote:
Traceback (most recent call last):
File
"/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.

Thanks

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 ?

Thanks

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
source...

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

3
12285
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...
1
1970
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...
14
1863
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...
1
4341
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...
0
1462
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.
0
1088
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...
1
3074
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...
11
3982
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...
6
1533
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,...
0
7354
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7594
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7693
tracyyun
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...
0
5888
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5282
isladogs
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...
0
4898
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...
0
3394
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3394
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
643
bsmnconsultancy
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...

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.