Bug #81614 [Opn]: PHP 8.0.12 build failed with PGO

From: Date: Fri, 12 Nov 2021 10:22:50 +0000
Subject: Bug #81614 [Opn]: PHP 8.0.12 build failed with PGO
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-237712@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81614&edit=1

 ID:                 81614
 Updated by:         nikic@php.net
 Reported by:        lin dot a dot yang at intel dot com
 Summary:            PHP 8.0.12 build failed with PGO
 Status:             Open
 Type:               Bug
 Package:            *Compile Issues
 PHP Version:        8.0.12
 Block user comment: N
 Private report:     N

 New Comment:

Dropping --silent from the libtool call:

/bin/bash /home/nikic/php/php-src-fast/libtool --preserve-dup-deps --tag CC --mode=compile cc
-Iext/standard/ -I/home/nikic/php/php-src-fast/ext/standard/ -I/home/nikic/php/php-src-fast/include
-I/home/nikic/php/php-src-fast/main -I/home/nikic/php/php-src-fast -I/usr/include/valgrind
-I/home/nikic/php/php-src-fast/ext/date/lib -I/usr/include/libxml2 -I/usr/include/x86_64-linux-gnu
-I/home/nikic/php/php-src-fast/ext/mbstring/libmbfl
-I/home/nikic/php/php-src-fast/ext/mbstring/libmbfl/mbfl -I/home/nikic/php/php-src-fast/TSRM
-I/home/nikic/php/php-src-fast/Zend    -fno-common -Wformat-truncation -Wlogical-op
-Wduplicated-cond -Wno-clobbered -Wall -Wextra -Wno-strict-aliasing -Wno-unused-parameter
-Wno-sign-compare -g -O2 -fvisibility=hidden -Wimplicit-fallthrough=1 -DZEND_SIGNALS -fprofile-use 
-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /home/nikic/php/php-src-fast/ext/standard/string.c -o
ext/standard/string.lo  -MMD -MF ext/standard/string.dep -MT ext/standard/string.lo
 cc -Iext/standard/ -I/home/nikic/php/php-src-fast/ext/standard/
-I/home/nikic/php/php-src-fast/include -I/home/nikic/php/php-src-fast/main
-I/home/nikic/php/php-src-fast -I/usr/include/valgrind -I/home/nikic/php/php-src-fast/ext/date/lib
-I/usr/include/libxml2 -I/usr/include/x86_64-linux-gnu
-I/home/nikic/php/php-src-fast/ext/mbstring/libmbfl
-I/home/nikic/php/php-src-fast/ext/mbstring/libmbfl/mbfl -I/home/nikic/php/php-src-fast/TSRM
-I/home/nikic/php/php-src-fast/Zend -fno-common -Wformat-truncation -Wlogical-op -Wduplicated-cond
-Wno-clobbered -Wall -Wextra -Wno-strict-aliasing -Wno-unused-parameter -Wno-sign-compare -g -O2
-fvisibility=hidden -Wimplicit-fallthrough=1 -DZEND_SIGNALS -fprofile-use
-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /home/nikic/php/php-src-fast/ext/standard/string.c -MMD -MF
ext/standard/string.dep -MT ext/standard/string.lo  -fPIC -DPIC -o ext/standard/.libs/string.o
/home/nikic/php/php-src-fast/ext/standard/string.c: In function ‘zif_utf8_decode’:
/home/nikic/php/php-src-fast/ext/standard/string.c:6196:1: warning:
‘/home/nikic/php/php-src-fast/ext/standard/.libs/string.gcda’ profile count data file not
found [-Wmissing-profile]
 6196 | }
      | ^
 cc -Iext/standard/ -I/home/nikic/php/php-src-fast/ext/standard/
-I/home/nikic/php/php-src-fast/include -I/home/nikic/php/php-src-fast/main
-I/home/nikic/php/php-src-fast -I/usr/include/valgrind -I/home/nikic/php/php-src-fast/ext/date/lib
-I/usr/include/libxml2 -I/usr/include/x86_64-linux-gnu
-I/home/nikic/php/php-src-fast/ext/mbstring/libmbfl
-I/home/nikic/php/php-src-fast/ext/mbstring/libmbfl/mbfl -I/home/nikic/php/php-src-fast/TSRM
-I/home/nikic/php/php-src-fast/Zend -fno-common -Wformat-truncation -Wlogical-op -Wduplicated-cond
-Wno-clobbered -Wall -Wextra -Wno-strict-aliasing -Wno-unused-parameter -Wno-sign-compare -g -O2
-fvisibility=hidden -Wimplicit-fallthrough=1 -DZEND_SIGNALS -fprofile-use
-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /home/nikic/php/php-src-fast/ext/standard/string.c -MMD -MF
ext/standard/string.dep -MT ext/standard/string.lo -o ext/standard/string.o >/dev/null
2>&1

Looks like it runs cc twice, and the first time it will rewrite the output location to .libs, which
is where it will also look for .gcda files.


Previous Comments:
------------------------------------------------------------------------
[2021-11-12 06:48:23] lin dot a dot yang at intel dot com

Description:
------------
I tried to build php-fpm 8.0.12 with gcc 9.3.0 to enable PGO optimization. 

$ gcc --version
gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0

The commands I used show as below.

$ make prof-gen -j
# run workload
$ make prof-clean
$ make prof-use -j

However, "make prof-use -j" complain a lot of warning about cannot found profile count
data file .gcda file on the expected location.

/opt/pkb/git/hhvm-perf/php-src/Zend/zend_extensions.c: In function
'zend_extensions_op_array_persist':
/opt/pkb/git/hhvm-perf/php-src/Zend/zend_extensions.c:338:1: warning:
'/home/build/php-src/Zend/.libs/zend_extensions.gcda' profile count data file not found
[-Wmissing-profile]

Above example shows that it search gcda file in php-src/Zend/.libs/zend_extensions.gcda. But I only
found this corresponding file in php-src/Zend/zend_extensions.gcda, not in .libs directory.

$ ls /home/build/php-src/Zend/.libs/zend_extensions.gcda
ls: cannot access '/home/build/php-src/Zend/.libs/zend_extensions.gcda': No such file or
directory
$ ls /home/build/php-src/Zend/zend_extensions.gcda
/home/build/php-src/Zend/zend_extensions.gcda

If manually move gcda file to the .libs directory, it will give another kind of warning about not
found the profile counter inside those gcda files. The php build process can be completed if ignore
those warnings, but php and php-fpm binary generated will fail to run any script.

Really appreiate any suggestion aobut how to fix this issue.





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



--
Edit this bug report at https://bugs.php.net/bug.php?id=81614&edit=1


Thread (8 messages)

« previous php.bugs (#237712) next »