1 (edited by krsc 2010-09-29 15:09:39)

Topic: PHP 5.3 CLI executable size

Hi Remi!
I'm new to the forum, and i've registered because i need some help with compiling latest php (5.3.3) on centos5.5 and i thought that you could help. smile
Everything is working, but i've got an issue with the php cli size (the issue is also with the apache module, but i'm testing with the cli executable because it takes less time to compile, run it, etc)
If i start with a basic configure like: ./configure --disable-all --prefix=/usr/src --without-pear --disable-cgi i get an executable of about 8MB, while i saw that the executable you built has a size of about 3MB.
I also looked at the configure command you used, but i couldn't figure out what could make the difference.
I'm testing on centos 5.5, with gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)

Can you give me some hints or point me in the right direction to solve my problem?
Thank you very much,

Francesco

Re: PHP 5.3 CLI executable size

...compiling latest php (5.3.3) on centos5.5

Why don't you use the binary RPM available in my repository ?

i couldn't figure out what could make the difference.

strip ?


PHP build is quite complex. The better solution I think, is to build RPM, starting from an existing .src.rpm.

+

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: PHP 5.3 CLI executable size

Thanks Remi!
Strip was exactly what i was missing. It reduced the size of my compiled files a lot.

Now, regarding your questions, i am compiling php (as well as apache and mysql) because we're setting up a clean new system and we prefer to have as much control as we can on the lamp stack. Anyway everything seems to work fine and i must say that the your repository and your compiled packages have helped me as a term of comparison with what i was doing.

Best,
Francesco