473,398 Members | 2,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Simple question about freeze

I'm working with the freeze utility, and I'm trying to learn the
basics. For the most part, I think I understand how it works. I have a
question about modules, though.

I want to make sure that my native executable is entirely standalone.
That is, it should have no dynamic linking. I've read through a number
of posts on the subject, and think I get it. In order to make this
work, I need to do two things:

(1) Recompile libpythonXXX.a so that the required modules are indeed
compiled into the archive.
(2) Modify the freeze-generated Makefile to force gcc to use static
linking and to use my custom-built libpythonXXX.a in linking together
the native executable.

My question is: is it sufficient to carry out the above steps? Freeze
is designed to use the version of python installed on the host system,
*not* a custom build in a different directory. If freeze looks to the
system's default installation, but I've modified the makefile to use my
custom-built libpython.a, will that cause problems? My sense is that it
will not, but I want to make sure I think things through. Any thoughts?

Thanks,
--Steve (mr************@hotmail.com)

Feb 17 '06 #1
2 1401
mrstephengross wrote:
I want to make sure that my native executable is entirely standalone.
That is, it should have no dynamic linking. I've read through a number
of posts on the subject, and think I get it. In order to make this
work, I need to do two things:

(1) Recompile libpythonXXX.a so that the required modules are indeed
compiled into the archive.
(2) Modify the freeze-generated Makefile to force gcc to use static
linking and to use my custom-built libpythonXXX.a in linking together
the native executable.

My question is: is it sufficient to carry out the above steps?
No. You also need to provide static versions of all system libraries.
E.g. if you include _tkinter in your binary, you need static Tcl
libraries, plus, on Unix, static X11 libraries, plus a static C
library; if you include a bsddb module, you need a static bsddb library,
and so on.
Freeze
is designed to use the version of python installed on the host system,
*not* a custom build in a different directory. If freeze looks to the
system's default installation, but I've modified the makefile to use my
custom-built libpython.a, will that cause problems? My sense is that it
will not, but I want to make sure I think things through. Any thoughts?


I don't see a problem with that.

Regards,
Martin
Feb 17 '06 #2
Martin v. Löwis enlightened us with:
No. You also need to provide static versions of all system
libraries.


You can also ship the required .so files along with the program, and
set LD_LIBRARY_PATH to include the directory in which you stored those
files. This can be easily done by a shell script that sets up the
environment variable and then runs the real program.

Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
Frank Zappa
Feb 18 '06 #3

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

Similar topics

39
by: Marco Aschwanden | last post by:
Hi I don't have to talk about the beauty of Python and its clear and readable syntax... but there are a few things that striked me while learning Python. I have collected those thoughts. I am...
2
by: aww91 | last post by:
Company is planning a Sybase to UDB migration that is projected to take 1 year. During that long period of time any Code Freeze put into place would impact our users (we normally release code...
11
by: Timothy Shih | last post by:
Hi, I am having a freezing issue with my application. My application serves several remotable objects, all of which must be initialized before their use. Furthermore, some of them depend on each...
0
by: mrstephengross | last post by:
Is there a user manual for freeze.py? --Steve (mrstephengross@hotmail.com)
6
by: | last post by:
Why is my progress bar displayed only after it's reached 100%? <html> <style type="text/css"> #bar{ width: 10px; height: 14px; color: white; font-size: 12px; overflow: hidden;
2
by: paraidy | last post by:
Hi all, i would to know how is possible to freeze another process from my application and unfreeze it, can someone help me? thx all.
1
by: Cameron Laird | last post by:
How is Freeze--freeze.py <URL: http://wiki.python.org/moin/Freeze >--packaged for Debian? *Is* it packaged for Debian?
4
by: ToxSox | last post by:
Hello. This is my first post here and i have a big problem with my script! One page (child.htm), was delivered not by me and i can't change it. This page calls a methode in a object of my page....
2
by: Gabriel Rossetti | last post by:
Hello everyone, I'm trying to use python's freeze utility but I'm running into problems. I called it like this : python /usr/share/doc/python2.5/examples/Tools/freeze/freeze.py...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...
0
jinu1996
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...
0
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...
0
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,...

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.