LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-12-2012, 03:10 PM   #1
MisterBark
Member
 
Registered: Jul 2012
Location: Republic of Krakozhia
Distribution: Slackware & Zenwalk core + compile
Posts: 96

Rep: Reputation: 6
Question huge perl binary file after compiling 5.16.0


Hi!

A few years ago, I compiled perl 5.10.0 on my old server. The binary file was 16KB
I'm installing a new server with perl 5.16.0 and the resulting perl binary is 1.5MB ...

I run tones of perl scripts on the server, there is no way that I load a huge binary without reason.
My compile options and optimizations have nothing really special or stupid.

Anyone has experienced this or may have suggestions?
THANKS!
 
Old 07-12-2012, 04:34 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
[ revising post: I misunderstood the original question! ]

Just FYI, recently compiled my own, too:

Code:
$ ./perl -v

This is perl 5, version 14, subversion 2 (v5.14.2) built for x86_64-linux
Code:
$ du -h perl
1.4M    perl
I'd point out that more and more modules keep getting included in the "core" perl. I am not planning to go through this myself at the moment, but this may be illuminating: perldoc - History/Changes.

I really don't know, but one hypothesis is that the Unicode support changes added a lot of size. Feel free to investigate further.

Last edited by anomie; 07-12-2012 at 04:40 PM.
 
Old 07-12-2012, 04:49 PM   #3
MisterBark
Member
 
Registered: Jul 2012
Location: Republic of Krakozhia
Distribution: Slackware & Zenwalk core + compile
Posts: 96

Original Poster
Rep: Reputation: 6
I just tried something I've never tried before :
To compile my old 5.10.0 on my new machine.

And the binary is now 1.2MB instead of 16KB ...
So it apparently does not come from the version, but from my configurations...
I have no idea what to check!

I wonder how I managed to make a 16KB binary but I also wonder how a perl binary can be almost the size of my kernel... that's ridiculous!

Last edited by MisterBark; 07-12-2012 at 05:04 PM.
 
Old 07-12-2012, 05:26 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.4 + 50+ other Linux OS, for test only.
Posts: 16,743

Rep: Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319
Example-1 perl 5.10.0 : The binary /usr/bin/perl5 is 4.7 kB !
Example-2 perl 5.14.2 ( Fedora 17 ) : /usr/bin/perl is 5.8 kB.

May be you should strip the binary : 'strip perl'



.

Last edited by knudfl; 07-12-2012 at 05:32 PM.
 
Old 07-12-2012, 07:43 PM   #5
MisterBark
Member
 
Registered: Jul 2012
Location: Republic of Krakozhia
Distribution: Slackware & Zenwalk core + compile
Posts: 96

Original Poster
Rep: Reputation: 6
that was a nice idea! but 1.6MB -> 1.5MB
 
Old 07-12-2012, 08:13 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,412

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
It might be worth moving this to the Programming forum, but (for me) for a 'deep Perl' qn like this, I'd ask over at perlmonks.org; its where the Perl community hangs out, inc those that actually create Perl itself..
 
Old 07-12-2012, 10:46 PM   #7
MisterBark
Member
 
Registered: Jul 2012
Location: Republic of Krakozhia
Distribution: Slackware & Zenwalk core + compile
Posts: 96

Original Poster
Rep: Reputation: 6
Quote:
Originally Posted by chrism01 View Post
It might be worth moving this to the Programming forum, but (for me) for a 'deep Perl' qn like this, I'd ask over at perlmonks.org; its where the Perl community hangs out, inc those that actually create Perl itself..
Right.
http://www.perlmonks.org/?node_id=981539
 
1 members found this post helpful.
Old 07-13-2012, 01:35 AM   #8
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Duh, I had a strange feeling I was missing something obvious. A quick query with the file(1) command could have told us whether we're dealing with dynamically- or statically-linked perl. Thanks for posting the followup from perlmonks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Problem compiling binary file for Tecplot juaneco2710 Programming 1 07-05-2012 12:22 AM
[SOLVED] Cross Compiling in OpenWRT. Cannot Execute binary file. Ideas? aztroboy Programming 4 02-15-2011 01:36 AM
Looking for a lightweight distro with huge binary repo lostinpurdy Linux - Distributions 4 02-15-2010 10:19 AM
LXer: Compiling Perl Into Binary Code On Linux And Unix. Cool, But... LXer Syndicated Linux News 0 04-14-2009 04:00 PM
Huge binary file dimah Programming 14 03-22-2007 11:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration