php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79170 blown up cli binaries with 7.4/8.0
Submitted: 2020-01-26 00:03 UTC Modified: -
From: bugreports at gmail dot com Assigned:
Status: Open Package: *Compile Issues
PHP Version: 7.4Git-2020-01-25 (Git) OS: Linux
Private report: No CVE-ID: None
 [2020-01-26 00:03 UTC] bugreports at gmail dot com
Description:
------------
something blows up the cli-binary in 7.4/8.0 HEAD to twice of the expected size

the binarues below are built within a identical Fedora 31 envirnoment, all profile-generate/profle-use and finally strip "--strip-unneeded" and from latest HEAD from https://git.php.net/?p=php-src.git for each vesion

normally there are 0.1 MB difference between cli/apache2 binary

------------------------------------------------------------

PHP 7.2.28-fc31 (cli) (built: Jan 25 2020 23:20:40) ( NTS )
5,1M 2020-01-26 00:26 /scripts/profile-php-binaries/7.2/sapi/cli/php
5,8M 2020-01-26 00:26 /scripts/profile-php-binaries/7.2/libs/libphp7.so

PHP 7.3.15-fc31 (cli) (built: Jan 25 2020 23:26:29) ( NTS )
5,0M 2020-01-26 00:32 /scripts/profile-php-binaries/7.3/sapi/cli/php
5,7M 2020-01-26 00:32 /scripts/profile-php-binaries/7.3/libs/libphp7.so

PHP 7.4.3-fc31 (cli) (built: Jan 25 2020 23:32:32) ( NTS )
11M 2020-01-26 00:38 /scripts/profile-php-binaries/7.4/sapi/cli/php
6,5M 2020-01-26 00:38 /scripts/profile-php-binaries/7.4/libs/libphp7.so

PHP 8.0.0-fc31 (cli) (built: Jan 25 2020 23:38:13) ( NTS )
11M 2020-01-26 00:46 /scripts/profile-php-binaries/8.0/sapi/cli/php
6,4M 2020-01-26 00:46 /scripts/profile-php-binaries/8.0/libs/libphp.so

------------------------------------------------------------

Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.44Bc97
+ umask 022
+ cd /home/builduser/rpmbuild/BUILD
+ cd /home/builduser/rpmbuild/BUILD
+ rm -rf php-7.2.0
+ /usr/bin/xz -dc /home/builduser/rpmbuild/SOURCES/php-7.2.0.tar.xz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd php-7.2.0
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ echo 'Patch #1 (php-72-realpath-cache-openbasedir.patch):'
Patch #1 (php-72-realpath-cache-openbasedir.patch):
+ /usr/bin/patch --no-backup-if-mismatch -p1 -b --suffix .realpath-72 --fuzz=0
patching file main/main.c
Hunk #1 succeeded at 1667 (offset 21 lines).
Hunk #2 succeeded at 2275 (offset 39 lines).
+ tar xzf /home/builduser/rpmbuild/SOURCES/apcu-5.1.18.tgz
+ mv apcu-5.1.18 ./ext/apcu
+ rm -f TSRM/tsrm_win32.h TSRM/tsrm_config.w32.h Zend/zend_config.w32.h ext/mysqlnd/config-win.h ext/standard/winver.h main/win32_internal_function_disabled.h main/win95nt.h
+ find . -name '*.[ch]' -exec chmod 644 '{}' ';'
+ xargs rm -rf
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.c9DM58
+ umask 022
+ cd /home/builduser/rpmbuild/BUILD
+ cd php-7.2.0
++ aclocal --print-ac-dir
++ aclocal --print-ac-dir
++ aclocal --print-ac-dir
++ aclocal --print-ac-dir
++ aclocal --print-ac-dir
+ cat /usr/share/aclocal/libtool.m4 /usr/share/aclocal/ltoptions.m4 /usr/share/aclocal/ltsugar.m4 /usr/share/aclocal/ltversion.m4 /usr/share/aclocal/lt~obsolete.m4
+ libtoolize --force --copy --quiet
++ aclocal --print-ac-dir
++ aclocal --print-ac-dir
++ aclocal --print-ac-dir
++ aclocal --print-ac-dir
++ aclocal --print-ac-dir
+ cat /usr/share/aclocal/libtool.m4 /usr/share/aclocal/ltoptions.m4 /usr/share/aclocal/ltsugar.m4 /usr/share/aclocal/ltversion.m4 /usr/share/aclocal/lt~obsolete.m4
+ touch configure.ac
+ ./buildconf --force
Forcing buildconf
Removing configure caches
buildconf: checking installation...
buildconf: autoconf version 2.69 (ok)
rebuilding aclocal.m4
rebuilding configure
rebuilding main/php_config.h.in
+ export 'CFLAGS=-pipe -m64 -O3 -march=sandybridge -mtune=sandybridge -mfpmath=sse -msse2avx -g0 -D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=8 -falign-functions -falign-jumps -falign-loops -falign-labels -flimit-function-alignment -fdce -fdse -fexpensive-optimizations -fgraphite-identity -fipa-cp-clone -floop-unroll-and-jam -fmove-loop-invariants -fomit-frame-pointer -foptimize-strlen -fpeel-loops -fsemantic-interposition -fsplit-loops -fsplit-paths -fstrict-aliasing -ftree-ch -ftree-dce -ftree-dse -ftree-loop-distribution -ftree-loop-if-convert -ftree-loop-if-convert-stores -ftree-loop-im -ftree-loop-ivcanon -ftree-pre -ftree-partial-pre -ftree-vectorize -ftree-loop-vectorize -ftree-slp-vectorize -funroll-loops -funswitch-loops -fvariable-expansion-in-unroller -fsimd-cost-model=unlimited -fvect-cost-model=unlimited -fwrapv -fno-exceptions -fno-gcse -fno-math-errno -fno-stack-clash-protection -fcf-protection=none -fsemantic-interposition -fno-opt-info -w -Wformat -Werror=format-security -Wstrict-aliasing -Wa,--noexecstack'
+ CFLAGS='-pipe -m64 -O3 -march=sandybridge -mtune=sandybridge -mfpmath=sse -msse2avx -g0 -D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=8 -falign-functions -falign-jumps -falign-loops -falign-labels -flimit-function-alignment -fdce -fdse -fexpensive-optimizations -fgraphite-identity -fipa-cp-clone -floop-unroll-and-jam -fmove-loop-invariants -fomit-frame-pointer -foptimize-strlen -fpeel-loops -fsemantic-interposition -fsplit-loops -fsplit-paths -fstrict-aliasing -ftree-ch -ftree-dce -ftree-dse -ftree-loop-distribution -ftree-loop-if-convert -ftree-loop-if-convert-stores -ftree-loop-im -ftree-loop-ivcanon -ftree-pre -ftree-partial-pre -ftree-vectorize -ftree-loop-vectorize -ftree-slp-vectorize -funroll-loops -funswitch-loops -fvariable-expansion-in-unroller -fsimd-cost-model=unlimited -fvect-cost-model=unlimited -fwrapv -fno-exceptions -fno-gcse -fno-math-errno -fno-stack-clash-protection -fcf-protection=none -fsemantic-interposition -fno-opt-info -w -Wformat -Werror=format-security -Wstrict-aliasing -Wa,--noexecstack'
+ export 'LDFLAGS=-Wl,--as-needed -Wl,-z,now -Wl,-z,relro -Wl,-z,noexecstack -Wl,-z,nodump'
+ LDFLAGS='-Wl,--as-needed -Wl,-z,now -Wl,-z,relro -Wl,-z,noexecstack -Wl,-z,nodump'
+ export CC=gcc
+ CC=gcc
+ export CXX=gcc
+ CXX=gcc
+ export EXTENSION_DIR=/usr/lib64/php/modules
+ EXTENSION_DIR=/usr/lib64/php/modules
+ export LIBPHP_BINARY=libphp7
+ LIBPHP_BINARY=libphp7
+ export CCACHE_DISABLE=1
+ CCACHE_DISABLE=1
+ export LANG=C.UTF-8
+ LANG=C.UTF-8
++ date +%s
+ export SOURCE_DATE_EPOCH=1579994440
+ SOURCE_DATE_EPOCH=1579994440
+ ./configure --quiet --libdir=/usr/lib64/php --prefix=/usr --disable-all --disable-static --enable-shared --enable-apcu --enable-bcmath --enable-calendar=shared --enable-cli --enable-ctype=shared --enable-dom=shared --enable-exif=shared --enable-fileinfo=shared --enable-filter --enable-gcc-global-regs --enable-gd=shared --enable-hash --enable-huge-code-pages --enable-inline-optimization --enable-intl=shared --enable-json=shared --enable-libxml --enable-mbregex --enable-mbstring=shared --enable-mysqlnd --enable-opcache --enable-pcntl=shared --enable-pdo=shared --enable-phar=shared --enable-posix=shared --enable-re2c-cgoto --enable-rtld-now --enable-session=shared --enable-simplexml=shared --enable-soap=shared --enable-sockets=shared --enable-tokenizer=shared --enable-xml=shared --enable-xmlreader=shared --enable-xmlwriter=shared --enable-zip=shared --with-apxs2=/usr/bin/apxs --with-bz2=shared,/usr --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.lounge.d --with-curl=shared,/usr --with-freetype --with-freetype-dir=/usr --with-gd=shared --with-gnu-ld --with-iconv=shared --with-imap=shared,/usr --with-jpeg --with-jpeg-dir=/usr --with-layout=GNU --with-libdir=lib64 --with-libedit --with-libxml --with-libxml-dir=/usr --with-libzip=/usr --with-mysql-sock=/var/lib/mysql/mysql.sock --with-mysqli=mysqlnd --with-openssl=/usr --with-pcre-jit --with-pcre-regex --with-pdo-mysql=shared,mysqlnd --with-pic --with-png-dir=/usr --with-system-ciphers --with-tidy=shared,/usr --with-xsl=shared --with-zip=shared --with-zlib-dir=/usr --with-zlib=shared --without-ffi --without-kerberos --without-sodium --without-webp --without-webp-dir --without-xpm --disable-cgi --disable-dmalloc --disable-dtrace --disable-fuzzer --disable-gcov --disable-gd-jis-conv --disable-mysqlnd-compression-support --disable-phpdbg --disable-rpath --disable-short-tags --disable-zts --disable-debug --without-valgrind
configure: WARNING: unrecognized options: --enable-gd, --enable-rtld-now, --with-freetype, --with-jpeg, --with-libxml, --with-zip, --without-ffi, --without-webp, --without-xpm, --disable-fuzzer, --disable-zts
Updated main/php_version.h
This is the test message -- creating main/internal_functions.c
creating main/internal_functions_cli.c

------------------------------------------------------------



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-01-27 14:25 UTC] bugreports at gmail dot com
add these configure params back which where removed due a cleanup of the specfile solves the porblem 7.4/8.0 and *only* 7.4/8.0 result in a double sized cli-binary while libphp.so keeps it's size

 --host=x86_64-redhat-linux \
 --build=x86_64-redhat-linux \
 --target=x86_64-redhat-linux \
 --program-prefix= \
 [2020-01-27 14:36 UTC] bugreports at gmail dot com
and the documentation is wrong too because it pretends "--host" inherits "BUILD" and "--target" inherits "HOST"

--------------------

System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
  --target=TARGET   configure for building compilers for TARGET [HOST]

--------------------

bloatet:

 --build=x86_64-redhat-linux \
 --program-prefix= \
--------------------

not bloatet:

 --host=x86_64-redhat-linux \
 --build=x86_64-redhat-linux \
 --target=x86_64-redhat-linux \
 --program-prefix= \
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 12:01:29 2024 UTC