LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-08-2011, 08:59 PM   #1
sopiaz57
Member
 
Registered: Apr 2003
Distribution: RH 8
Posts: 246

Rep: Reputation: 30
php module size, build vs rpm


Hi All,
I have been messing around with building PHP5.3 on aoache2 RHEL/CentOS
5.x x86_64 and was curious if anyone else ever noticed the size
difference between RPM based PHP 5.3 installs vs build from source.

Specifically in /etc/httpd/modules (linked to
/usr/lib64/httpd/modules), when building from source using a configure
as show below, 26 MB.

-rwxr-xr-x 1 root root 26731429 Oct 8 21:38 libphp5.so

./configure --prefix=/opt/build-php-5.3.8 --with-apxs2=/usr/sbin/apxs
--with-mysqli=mysqlnd --with-config-file-path=/etc/php
--with-config-file-scan-dir=/etc/php.d --enable-zip --with-bz2
--with-zlib --enable-mbstring --with-mcrypt --with-curl

When I look at another system where RPM's were installed from centos
testing, the same .so is: 3.4 MB

-rwxr-xr-x 1 root root 3.4M Nov 13 2009 libphp5.so

Plus, all the other php modules in /usr/lib64/php only add up to 3.2
MB. ( includes dbase.so json.so mysqli.so pdo.so
uploadprogress.so xsl.so
dom.so mbstring.so mysql.so pdo_sqlite.so xmlreader.so
zip.so gd.so mcrypt.so pdo_mysql.so phpcups.so
xmlwriter.so)

What am I missing here? Seems like a performance/memory problem
waiting to happen if I go live on such a bloated libphp5.so

Thanks all!
 
Old 10-08-2011, 09:19 PM   #2
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
Maybe
Code:
man strip
will help?
 
Old 10-08-2011, 10:22 PM   #3
sopiaz57
Member
 
Registered: Apr 2003
Distribution: RH 8
Posts: 246

Original Poster
Rep: Reputation: 30
Hi there, that definately made a difference, 26 to 9MB, I know im new to this , but why do you guys think there was no mention of strip in php.net build/install instructions or the INSTALL/README files that came w/ source.
 
Old 10-09-2011, 08:24 AM   #4
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
Stripping a binary is such a standard procedure that they may not mention it. Stripping reduces the size of the binary- but will make it more difficult to debug- so normally stripping should be done only on the binaries from which you do not need any debugging symbols- meaning release versions.
 
  


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
self build rpm fails with missing dependencies on build host zhjim Linux - Software 1 09-24-2009 08:47 AM
Coding Dilemma: Build application with PHP framework or build all myself? socceroos Programming 2 05-10-2009 06:04 PM
no kernel module build environment" Error message during RPM install gotmonkey Linux - Hardware 7 12-07-2007 02:08 AM
How can I generate / build and RPM from *.src.rpm file sreekumartg Red Hat 3 02-23-2007 05:23 PM
cannot build source rpm/ rpm questions kpachopoulos Fedora 3 07-24-2005 09:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:06 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