LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 02:10 PM   #1
MisterBark
Member
 
Registered: Jul 2012
Location: Republic of Krakozhia
Distribution: Slackware & Zenwalk core + compile
Posts: 104

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, 03: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 03:40 PM.
 
Old 07-12-2012, 03:49 PM   #3
MisterBark
Member
 
Registered: Jul 2012
Location: Republic of Krakozhia
Distribution: Slackware & Zenwalk core + compile
Posts: 104

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 04:04 PM.
 
Old 07-12-2012, 04:26 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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 04:32 PM.
 
Old 07-12-2012, 06:43 PM   #5
MisterBark
Member
 
Registered: Jul 2012
Location: Republic of Krakozhia
Distribution: Slackware & Zenwalk core + compile
Posts: 104

Original Poster
Rep: Reputation: 6
that was a nice idea! but 1.6MB -> 1.5MB
 
Old 07-12-2012, 07:13 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,360

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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, 09:46 PM   #7
MisterBark
Member
 
Registered: Jul 2012
Location: Republic of Krakozhia
Distribution: Slackware & Zenwalk core + compile
Posts: 104

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, 12: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



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-04-2012 11:22 PM
[SOLVED] Cross Compiling in OpenWRT. Cannot Execute binary file. Ideas? aztroboy Programming 4 02-15-2011 12:36 AM
Looking for a lightweight distro with huge binary repo lostinpurdy Linux - Distributions 4 02-15-2010 09:19 AM
LXer: Compiling Perl Into Binary Code On Linux And Unix. Cool, But... LXer Syndicated Linux News 0 04-14-2009 03:00 PM
Huge binary file dimah Programming 14 03-22-2007 10:19 AM

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

All times are GMT -5. The time now is 04:49 PM.

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
Open Source Consulting | Domain Registration