You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Changing configure flags for pie build does not result in a full rebuild #93
I'm not sure if my Makefile / configure script is incorrectly written and does not properly handle the build dependencies, but given the fact that pie always runs both phpize and ./configure for each build, it would probably make sense to run the equivalent of git clean -fdx in the build directory to ensure that the build is internally consistent. Even if the build infrastructure is actually faulty, this could otherwise lead to hard-to-debug issues.
Yep this is a reasonable improvement we could make - I do think we should clean first. This would only be observable if you are rebuilding an already downloaded version (e.g. pie build a/a:1.2.3 then pie build a/a:1.2.3 --some-flag); otherwise Composer will rip out the source and replace it anyway.
Hmm, I think I was wrong here about what you're trying to do, @TimWolla...?
I'm trying out PR #130 and noticed it NEVER actually cleans in practice; and with some actual checking, it seems Composer does actually replace the whole ext path, even if installing exactly the same version.
I used the example ext, and made a PHP file test.php with:
<?phpexample_pie_extension_test();
$ bin/pie install asgrim/example-pie-extension:2.0.2 --with-hello-name=Bob
This command may need elevated privileges, and may prompt you for your password.
You are running PHP 8.3.14
Target PHP installation: 8.3.14 nts, on Linux/OSX/etc x86_64 (from /usr/bin/php8.3)
Found package: asgrim/example-pie-extension:2.0.2 which provides ext-example_pie_extension
Extracted asgrim/example-pie-extension:2.0.2 source to: /home/james/.config/pie/php8.3_86548f52c10cb18384419b84cc830960/vendor/asgrim/example-pie-extension
phpize complete.
Configure complete with options: --with-hello-name=Bob
Build complete: /home/james/.config/pie/php8.3_86548f52c10cb18384419b84cc830960/vendor/asgrim/example-pie-extension/modules/example_pie_extension.so
Cannot write to /usr/lib/php/20230831, so using sudo to elevate privileges.
Install complete: /usr/lib/php/20230831/example_pie_extension.so
You must now add "extension=example_pie_extension" to your php.ini
$ php -d extension=/usr/lib/php/20230831/example_pie_extension.so test.php
Hello, Bob!
Subsequently re-installing the same ext with only a changed configure parameter, e.g.:
$ bin/pie install asgrim/example-pie-extension:2.0.2 --with-hello-name=Jim
This command may need elevated privileges, and may prompt you for your password.
You are running PHP 8.3.14
Target PHP installation: 8.3.14 nts, on Linux/OSX/etc x86_64 (from /usr/bin/php8.3)
Found package: asgrim/example-pie-extension:2.0.2 which provides ext-example_pie_extension
Extracted asgrim/example-pie-extension:2.0.2 source to: /home/james/.config/pie/php8.3_86548f52c10cb18384419b84cc830960/vendor/asgrim/example-pie-extension
phpize complete.
Configure complete with options: --with-hello-name=Jim
Build complete: /home/james/.config/pie/php8.3_86548f52c10cb18384419b84cc830960/vendor/asgrim/example-pie-extension/modules/example_pie_extension.so
Cannot write to /usr/lib/php/20230831, so using sudo to elevate privileges.
Install complete: /usr/lib/php/20230831/example_pie_extension.so
You must now add "extension=example_pie_extension" to your php.ini
$ php -d extension=/usr/lib/php/20230831/example_pie_extension.so test.php
Hello, Jim!
Are you still able to reproduce this issue, @TimWolla ? 🤔
Yes. I'm on commit 75dbc22. As mentioned in the initial message: It might be a bug in the configure script / resulting Makefile. In my case it's a flag to the linker that changes, but I believe it should be equally reproducible with any other compiler flag that does not result in a source code change, for example optimization flags.
Log
root@cc14214961ca:/pwd# php bin/pie build -v beberlei/hdrhistogram-php:dev-pie
You are running PHP 8.3.13
Target PHP installation: 8.3.13 nts, on Linux/OSX/etc x86_64 (from /usr/local/bin/php)
Found package: beberlei/hdrhistogram-php:dev-pie which provides ext-hdrhistogram
<warning>No composer.lock file present. Updating dependencies to latest instead of installing from lock file. See https://getcomposer.org/install for more information.</warning>
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals
- Locking beberlei/hdrhistogram-php (dev-pie)
Writing lock file
Installing dependencies from lock file
Package operations: 1 install, 0 updates, 0 removals
- Installing beberlei/hdrhistogram-php (dev-pie): Symlinking from /pwd/hdrhistogram-php
Extracted beberlei/hdrhistogram-php:dev-pie source to: /root/.pie/php8.3_c7fa0700828bf172495f507c302008a7/vendor/beberlei/hdrhistogram-php
Running phpize step using: /usr/local/bin/phpize
Configuring for:
PHP Api Version: 20230831
Zend Module Api No: 20230831
Zend Extension Api No: 420230831
phpize complete.
Running configure step with: ./configure
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether cc accepts -g... yes
checking for cc option to enable C11 features... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20230831
checking for PHP installed headers prefix... /usr/local/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking if to enable the "hdrhistogram" extension... yes, shared
checking whether libhdr_histogram should be linked statically... no
checking for pkg-config... /usr/bin/pkg-config
checking for hdrhistogram from pkg-config... found 0.11.8
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for hdr/hdr_histogram_version.h... yes
checking for struct hdr_histogram.lowest_discernible_value... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 1572864
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
creating libtool
appending configuration tag "CXX" to libtool
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
Configure complete.
Running make step with: make -j12
/bin/bash /pwd/hdrhistogram-php/libtool --tag=CC --mode=compile cc -I. -I/pwd/hdrhistogram-php -I/pwd/hdrhistogram-php/include -I/pwd/hdrhistogram-php/main -I/pwd/hdrhistogram-php -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -DZEND_COMPILE_DL_EXT=1 -c /pwd/hdrhistogram-php/hdrhistogram.c -o hdrhistogram.lo -MMD -MF hdrhistogram.dep -MT hdrhistogram.lo
mkdir .libs
cc -I. -I/pwd/hdrhistogram-php -I/pwd/hdrhistogram-php/include -I/pwd/hdrhistogram-php/main -I/pwd/hdrhistogram-php -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -DZEND_COMPILE_DL_EXT=1 -c /pwd/hdrhistogram-php/hdrhistogram.c -MMD -MF hdrhistogram.dep -MT hdrhistogram.lo -fPIC -DPIC -o .libs/hdrhistogram.o
/bin/bash /pwd/hdrhistogram-php/libtool --tag=CC --mode=link cc -shared -I/pwd/hdrhistogram-php/include -I/pwd/hdrhistogram-php/main -I/pwd/hdrhistogram-php -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -o hdrhistogram.la -export-dynamic -avoid-version -prefer-pic -module -rpath /pwd/hdrhistogram-php/modules hdrhistogram.lo -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lhdr_histogram
cc -shared .libs/hdrhistogram.o -L/usr/local/lib -lhdr_histogram -Wl,-rpath -Wl,/usr/local/lib -Wl,-soname -Wl,hdrhistogram.so -o .libs/hdrhistogram.so
creating hdrhistogram.la
(cd .libs && rm -f hdrhistogram.la && ln -s ../hdrhistogram.la hdrhistogram.la)
/bin/bash /pwd/hdrhistogram-php/libtool --tag=CC --mode=install cp ./hdrhistogram.la /pwd/hdrhistogram-php/modules
cp ./.libs/hdrhistogram.so /pwd/hdrhistogram-php/modules/hdrhistogram.so
cp ./.libs/hdrhistogram.lai /pwd/hdrhistogram-php/modules/hdrhistogram.la
PATH="$PATH:/sbin" ldconfig -n /pwd/hdrhistogram-php/modules
----------------------------------------------------------------------
Libraries have been installed in:
/pwd/hdrhistogram-php/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Build complete.
Don't forget to run 'make test'.
Build complete: /root/.pie/php8.3_c7fa0700828bf172495f507c302008a7/vendor/beberlei/hdrhistogram-php/modules/hdrhistogram.so
Generating autoload files
No security vulnerability advisories found.
root@cc14214961ca:/pwd# ldd /root/.pie/php8.3_c7fa0700828bf172495f507c302008a7/vendor/beberlei/hdrhistogram-php/modules/hdrhistogram.so
linux-vdso.so.1 (0x00007ffe3314c000)
libhdr_histogram.so.6 => /usr/local/lib/libhdr_histogram.so.6 (0x00007f36ecbb2000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f36ec9ce000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f36ec9af000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f36ec8d0000)
/lib64/ld-linux-x86-64.so.2 (0x00007f36ecbcb000)
root@cc14214961ca:/pwd# sha256sum /root/.pie/php8.3_c7fa0700828bf172495f507c302008a7/vendor/beberlei/hdrhistogram-php/modules/hdrhistogram.so
d486dc9991a2f12b2596f06083903c2160f811a393da6feecb0a36caf26e7dce /root/.pie/php8.3_c7fa0700828bf172495f507c302008a7/vendor/beberlei/hdrhistogram-php/modules/hdrhistogram.so
root@cc14214961ca:/pwd# php bin/pie build -v beberlei/hdrhistogram-php:dev-pie --with-hdrhistogram-static
You are running PHP 8.3.13
Target PHP installation: 8.3.13 nts, on Linux/OSX/etc x86_64 (from /usr/local/bin/php)
Found package: beberlei/hdrhistogram-php:dev-pie which provides ext-hdrhistogram
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Writing lock file
Installing dependencies from lock file
Package operations: 1 install, 0 updates, 0 removals
- Installing beberlei/hdrhistogram-php (dev-pie): Source already present
Extracted beberlei/hdrhistogram-php:dev-pie source to: /root/.pie/php8.3_c7fa0700828bf172495f507c302008a7/vendor/beberlei/hdrhistogram-php
Running phpize step using: /usr/local/bin/phpize
Configuring for:
PHP Api Version: 20230831
Zend Module Api No: 20230831
Zend Extension Api No: 420230831
phpize complete.
Running configure step with: ./configure --with-hdrhistogram-static
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether cc accepts -g... yes
checking for cc option to enable C11 features... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20230831
checking for PHP installed headers prefix... /usr/local/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking if to enable the "hdrhistogram" extension... yes, shared
checking whether libhdr_histogram should be linked statically... yes
checking for pkg-config... /usr/bin/pkg-config
checking for hdrhistogram files in default path... found in /usr/local
checking for library containing hdr_init... -lhdr_histogram_static
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for hdr/hdr_histogram_version.h... yes
checking for struct hdr_histogram.lowest_discernible_value... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 1572864
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
creating libtool
appending configuration tag "CXX" to libtool
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
config.status: config.h is unchanged
Configure complete with options: --with-hdrhistogram-static
Running make step with: make -j12
Build complete.
Don't forget to run 'make test'.
Build complete: /root/.pie/php8.3_c7fa0700828bf172495f507c302008a7/vendor/beberlei/hdrhistogram-php/modules/hdrhistogram.so
Generating autoload files
No security vulnerability advisories found.
root@cc14214961ca:/pwd# ldd /root/.pie/php8.3_c7fa0700828bf172495f507c302008a7/vendor/beberlei/hdrhistogram-php/modules/hdrhistogram.so
linux-vdso.so.1 (0x00007ffeea190000)
libhdr_histogram.so.6 => /usr/local/lib/libhdr_histogram.so.6 (0x00007f71f806a000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f71f7e86000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f71f7e67000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f71f7d88000)
/lib64/ld-linux-x86-64.so.2 (0x00007f71f8083000)
root@cc14214961ca:/pwd# sha256sum /root/.pie/php8.3_c7fa0700828bf172495f507c302008a7/vendor/beberlei/hdrhistogram-php/modules/hdrhistogram.so
d486dc9991a2f12b2596f06083903c2160f811a393da6feecb0a36caf26e7dce /root/.pie/php8.3_c7fa0700828bf172495f507c302008a7/vendor/beberlei/hdrhistogram-php/modules/hdrhistogram.so
root@cc14214961ca:/pwd# cd -
/root/.pie/php8.3_c7fa0700828bf172495f507c302008a7
root@cc14214961ca:~/.pie/php8.3_c7fa0700828bf172495f507c302008a7# cd vendor/
autoload.php beberlei/ composer/
root@cc14214961ca:~/.pie/php8.3_c7fa0700828bf172495f507c302008a7# cd vendor/beberlei/hdrhistogram-php/
root@cc14214961ca:~/.pie/php8.3_c7fa0700828bf172495f507c302008a7/vendor/beberlei/hdrhistogram-php# make clean
find . -name \*.gcno -o -name \*.gcda | xargs rm -f
find . -name \*.lo -o -name \*.o -o -name \*.dep | xargs rm -f
find . -name \*.la -o -name \*.a | xargs rm -f
find . -name \*.so | xargs rm -f
find . -name .libs -a -type d|xargs rm -rf
rm -f libphp.la modules/* libs/*
rm -f ext/opcache/jit/zend_jit_x86.c
rm -f ext/opcache/jit/zend_jit_arm64.c
rm -f ext/opcache/minilua
root@cc14214961ca:~/.pie/php8.3_c7fa0700828bf172495f507c302008a7/vendor/beberlei/hdrhistogram-php# cd /pwd
root@cc14214961ca:/pwd# php bin/pie build -v beberlei/hdrhistogram-php:dev-pie --with-hdrhistogram-static
You are running PHP 8.3.13
Target PHP installation: 8.3.13 nts, on Linux/OSX/etc x86_64 (from /usr/local/bin/php)
Found package: beberlei/hdrhistogram-php:dev-pie which provides ext-hdrhistogram
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Writing lock file
Installing dependencies from lock file
Package operations: 1 install, 0 updates, 0 removals
- Installing beberlei/hdrhistogram-php (dev-pie): Source already present
Extracted beberlei/hdrhistogram-php:dev-pie source to: /root/.pie/php8.3_c7fa0700828bf172495f507c302008a7/vendor/beberlei/hdrhistogram-php
Running phpize step using: /usr/local/bin/phpize
Configuring for:
PHP Api Version: 20230831
Zend Module Api No: 20230831
Zend Extension Api No: 420230831
phpize complete.
Running configure step with: ./configure --with-hdrhistogram-static
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether cc accepts -g... yes
checking for cc option to enable C11 features... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20230831
checking for PHP installed headers prefix... /usr/local/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking if to enable the "hdrhistogram" extension... yes, shared
checking whether libhdr_histogram should be linked statically... yes
checking for pkg-config... /usr/bin/pkg-config
checking for hdrhistogram files in default path... found in /usr/local
checking for library containing hdr_init... -lhdr_histogram_static
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for hdr/hdr_histogram_version.h... yes
checking for struct hdr_histogram.lowest_discernible_value... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 1572864
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
creating libtool
appending configuration tag "CXX" to libtool
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
config.status: config.h is unchanged
Configure complete with options: --with-hdrhistogram-static
Running make step with: make -j12
/bin/bash /pwd/hdrhistogram-php/libtool --tag=CC --mode=compile cc -I. -I/pwd/hdrhistogram-php -I/pwd/hdrhistogram-php/include -I/pwd/hdrhistogram-php/main -I/pwd/hdrhistogram-php -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -DZEND_COMPILE_DL_EXT=1 -c /pwd/hdrhistogram-php/hdrhistogram.c -o hdrhistogram.lo -MMD -MF hdrhistogram.dep -MT hdrhistogram.lo
mkdir .libs
cc -I. -I/pwd/hdrhistogram-php -I/pwd/hdrhistogram-php/include -I/pwd/hdrhistogram-php/main -I/pwd/hdrhistogram-php -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -DZEND_COMPILE_DL_EXT=1 -c /pwd/hdrhistogram-php/hdrhistogram.c -MMD -MF hdrhistogram.dep -MT hdrhistogram.lo -fPIC -DPIC -o .libs/hdrhistogram.o
/bin/bash /pwd/hdrhistogram-php/libtool --tag=CC --mode=link cc -shared -I/pwd/hdrhistogram-php/include -I/pwd/hdrhistogram-php/main -I/pwd/hdrhistogram-php -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -o hdrhistogram.la -export-dynamic -avoid-version -prefer-pic -module -rpath /pwd/hdrhistogram-php/modules hdrhistogram.lo -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lhdr_histogram_static
cc -shared .libs/hdrhistogram.o -L/usr/local/lib -lhdr_histogram_static -Wl,-rpath -Wl,/usr/local/lib -Wl,-soname -Wl,hdrhistogram.so -o .libs/hdrhistogram.so
creating hdrhistogram.la
(cd .libs && rm -f hdrhistogram.la && ln -s ../hdrhistogram.la hdrhistogram.la)
/bin/bash /pwd/hdrhistogram-php/libtool --tag=CC --mode=install cp ./hdrhistogram.la /pwd/hdrhistogram-php/modules
cp ./.libs/hdrhistogram.so /pwd/hdrhistogram-php/modules/hdrhistogram.so
cp ./.libs/hdrhistogram.lai /pwd/hdrhistogram-php/modules/hdrhistogram.la
PATH="$PATH:/sbin" ldconfig -n /pwd/hdrhistogram-php/modules
----------------------------------------------------------------------
Libraries have been installed in:
/pwd/hdrhistogram-php/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Build complete.
Don't forget to run 'make test'.
Build complete: /root/.pie/php8.3_c7fa0700828bf172495f507c302008a7/vendor/beberlei/hdrhistogram-php/modules/hdrhistogram.so
Generating autoload files
No security vulnerability advisories found.
root@cc14214961ca:/pwd# ldd /root/.pie/php8.3_c7fa0700828bf172495f507c302008a7/vendor/beberlei/hdrhistogram-php/modules/hdrhistogram.so
linux-vdso.so.1 (0x00007ffd28527000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fcd4cbb8000)
/lib64/ld-linux-x86-64.so.2 (0x00007fcd4cdb0000)
root@cc14214961ca:/pwd# sha256sum /root/.pie/php8.3_c7fa0700828bf172495f507c302008a7/vendor/beberlei/hdrhistogram-php/modules/hdrhistogram.so
6097c9c95a2bbae925ec4bb6366e13a15c17297b814c2f94e920e0c46a0a1a0d /root/.pie/php8.3_c7fa0700828bf172495f507c302008a7/vendor/beberlei/hdrhistogram-php/modules/hdrhistogram.so
Thanks @TimWolla - I can reproduce now; this is definitely an edge case, I can only manifest it when using a local path repo (as we discussed in #79 - will continue the fix, thank you!
Activity
asgrim commentedon Nov 15, 2024
Yep this is a reasonable improvement we could make - I do think we should clean first. This would only be observable if you are rebuilding an already downloaded version (e.g.
pie build a/a:1.2.3thenpie build a/a:1.2.3 --some-flag); otherwise Composer will rip out the source and replace it anyway.asgrim commentedon Nov 26, 2024
Hmm, I think I was wrong here about what you're trying to do, @TimWolla...?
I'm trying out PR #130 and noticed it NEVER actually cleans in practice; and with some actual checking, it seems Composer does actually replace the whole ext path, even if installing exactly the same version.
I used the example ext, and made a PHP file
test.phpwith:Subsequently re-installing the same ext with only a changed configure parameter, e.g.:
Are you still able to reproduce this issue, @TimWolla ? 🤔
TimWolla commentedon Nov 26, 2024
Yes. I'm on commit 75dbc22. As mentioned in the initial message: It might be a bug in the configure script / resulting Makefile. In my case it's a flag to the linker that changes, but I believe it should be equally reproducible with any other compiler flag that does not result in a source code change, for example optimization flags.
Log
asgrim commentedon Nov 26, 2024
Thanks @TimWolla - I can reproduce now; this is definitely an edge case, I can only manifest it when using a local
pathrepo (as we discussed in #79 - will continue the fix, thank you!asgrim commentedon Nov 26, 2024
@TimWolla this should be fixed in latest merge from 3abe8f5 (eventually will be 0.3.0 release)