Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Python compiled modules are too big in size (even after strip)

Reply
Thread Tools

Python compiled modules are too big in size (even after strip)

 
 
King
Guest
Posts: n/a
 
      04-27-2010
Hi,

I have just compiled python 2.6.5 from sources on ubuntu "hardy" 8.04.
I have used a simple script to do everything in one go:

../configure --enable-shared
make
make install

Python is compiled and installed successfully. However the
modules(_socket.so, _random.so etc) are two big in terms of file size.
They are around 4.5-5.0 mb each. I have used "strip strip-all *.so",
but still size is around 1.5 mb each. This is still too big compare to
size of modules on ubuntu karmic's pre installed python 2.6.5.

Am I missing something here? Do I have to re-configure or re-compile
the python again from sources?

Regards

Prashant
 
Reply With Quote
 
 
 
 
Jon Clements
Guest
Posts: n/a
 
      04-27-2010
On 27 Apr, 10:43, King <(E-Mail Removed)> wrote:
> Hi,
>
> I have just compiled python 2.6.5 from sources on ubuntu "hardy" 8.04.
> I have used a simple script to do everything in one go:
>
> ./configure --enable-shared
> make
> make install
>
> Python is compiled and installed successfully. However the
> modules(_socket.so, _random.so etc) are two big in terms of file size.
> They are around 4.5-5.0 mb each. I have used "strip strip-all *.so",
> but still size is around 1.5 mb each. This is still too big compare to
> size of modules on ubuntu karmic's pre installed python 2.6.5.
>
> Am I missing something here? Do I have to re-configure or re-compile
> the python again from sources?
>
> Regards
>
> Prashant


Err, the common install on "karmic" is 2.6.4...

IIRC (and probably not) the default was 2.6.2 on "hardy"

Obviously doesn't help where you're finding large sized shared libs,
but anyway...

Jon.


 
Reply With Quote
 
 
 
 
King
Guest
Posts: n/a
 
      04-27-2010
Hi Jon,

I do have a limited skill sets in c/c++ and also new on linux. I think
I am missing some flags or anything when I am compiling python from
sources.

Still hoping that some one point me out the missing link.

Cheers

Prashant
 
Reply With Quote
 
Antoine Pitrou
Guest
Posts: n/a
 
      04-27-2010
Le Tue, 27 Apr 2010 02:43:19 -0700, King a √©crit¬*:
>
> Python is compiled and installed successfully. However the
> modules(_socket.so, _random.so etc) are two big in terms of file size.
> They are around 4.5-5.0 mb each. I have used "strip strip-all *.so", but
> still size is around 1.5 mb each.


This is way more than it should be. Even if debug mode, most extension
modules should be around 100kB or smaller.

> Am I missing something here? Do I have to re-configure or re-compile the
> python again from sources?


I would suggest to check the compile options gcc gets (look at "make"
output), and try changing them.


 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GIDS 2009 .Net:: Save Big, Win Big, Learn Big: Act Before Dec 29 2008 Shaguf ASP .Net 0 12-26-2008 09:29 AM
GIDS 2009 .Net:: Save Big, Win Big, Learn Big: Act Before Dec 29 2008 Shaguf ASP .Net Web Controls 0 12-26-2008 06:11 AM
GIDS 2009 Java:: Save Big, Win Big, Learn Big: Act Before Dec 29 2008 Shaguf Python 0 12-24-2008 07:35 AM
GIDS 2009 Java:: Save Big, Win Big, Learn Big: Act Before Dec 29 2008 Shaguf Ruby 0 12-24-2008 05:07 AM



Advertisments