Rich Freeman on 10 Oct 2011 06:53:03 -0700 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [PLUG] php module size, build vs rpm |
On Mon, Oct 10, 2011 at 9:02 AM, sean finney <seanius@seanius.net> wrote: > On Sat, Oct 08, 2011 at 09:46:41PM -0400, Neill R wrote: >> 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 > > Without being involved in the headware-based distros, my guess is that > the packages likely strip the binaries in question before stuffing them > into the rpm files[1]. Is there a difference if you run file(1) on the > so files in question? Stripping is definitely a possibility here. Another is compile options - all those --with-xyz options add code, and if centos doesnt' enable all of that it would impact their binary size. Also, your compiler options can make a difference. If the one is built with -Os and the other is built with -fdont-use-movesb-or-loop you could see a size impact. (Ok, that is a fake option, but things like -O3+ can be pretty aggressive with unrolling loops. In fact, I usually use -Os since not swapping or having cache misses matters far more than skipping 100 JNZs.) Rich ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug