Skip to content

Instantly share code, notes, and snippets.

@zeitounator
Last active January 5, 2021 15:53
Show Gist options
  • Save zeitounator/30c84ba7c4f477fec7e885738dd921c1 to your computer and use it in GitHub Desktop.
Save zeitounator/30c84ba7c4f477fec7e885738dd921c1 to your computer and use it in GitHub Desktop.
$ docker run -it --rm php:7.4.2-apache-buster bash -c "apt update && apt install -y libxslt1-dev && docker-php-ext-install xsl"
Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:2 http://deb.debian.org/debian buster InRelease [121 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
Get:4 http://security.debian.org/debian-security buster/updates/main amd64 Packages [260 kB]
Get:5 http://deb.debian.org/debian buster/main amd64 Packages [7907 kB]
Get:6 http://deb.debian.org/debian buster-updates/main amd64 Packages [7860 B]
Fetched 8414 kB in 2s (4695 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
37 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
sensible-utils
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
icu-devtools libicu-dev libicu63 libxml2 libxml2-dev libxslt1.1
Suggested packages:
icu-doc
The following NEW packages will be installed:
icu-devtools libicu-dev libxml2-dev libxslt1-dev libxslt1.1
The following packages will be upgraded:
libicu63 libxml2
2 upgraded, 5 newly installed, 0 to remove and 35 not upgraded.
Need to get 19.9 MB of archives.
After this operation, 50.0 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian buster/main amd64 libicu63 amd64 63.1-6+deb10u1 [8300 kB]
Get:2 http://deb.debian.org/debian buster/main amd64 icu-devtools amd64 63.1-6+deb10u1 [189 kB]
Get:3 http://deb.debian.org/debian buster/main amd64 libicu-dev amd64 63.1-6+deb10u1 [9186 kB]
Get:4 http://deb.debian.org/debian buster/main amd64 libxml2 amd64 2.9.4+dfsg1-7+deb10u1 [689 kB]
Get:5 http://deb.debian.org/debian buster/main amd64 libxml2-dev amd64 2.9.4+dfsg1-7+deb10u1 [784 kB]
Get:6 http://deb.debian.org/debian buster/main amd64 libxslt1.1 amd64 1.1.32-2.2~deb10u1 [237 kB]
Get:7 http://deb.debian.org/debian buster/main amd64 libxslt1-dev amd64 1.1.32-2.2~deb10u1 [519 kB]
Fetched 19.9 MB in 1s (21.3 MB/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 13536 files and directories currently installed.)
Preparing to unpack .../0-libicu63_63.1-6+deb10u1_amd64.deb ...
Unpacking libicu63:amd64 (63.1-6+deb10u1) over (63.1-6) ...
Selecting previously unselected package icu-devtools.
Preparing to unpack .../1-icu-devtools_63.1-6+deb10u1_amd64.deb ...
Unpacking icu-devtools (63.1-6+deb10u1) ...
Selecting previously unselected package libicu-dev:amd64.
Preparing to unpack .../2-libicu-dev_63.1-6+deb10u1_amd64.deb ...
Unpacking libicu-dev:amd64 (63.1-6+deb10u1) ...
Preparing to unpack .../3-libxml2_2.9.4+dfsg1-7+deb10u1_amd64.deb ...
Unpacking libxml2:amd64 (2.9.4+dfsg1-7+deb10u1) over (2.9.4+dfsg1-7+b3) ...
Selecting previously unselected package libxml2-dev:amd64.
Preparing to unpack .../4-libxml2-dev_2.9.4+dfsg1-7+deb10u1_amd64.deb ...
Unpacking libxml2-dev:amd64 (2.9.4+dfsg1-7+deb10u1) ...
Selecting previously unselected package libxslt1.1:amd64.
Preparing to unpack .../5-libxslt1.1_1.1.32-2.2~deb10u1_amd64.deb ...
Unpacking libxslt1.1:amd64 (1.1.32-2.2~deb10u1) ...
Selecting previously unselected package libxslt1-dev:amd64.
Preparing to unpack .../6-libxslt1-dev_1.1.32-2.2~deb10u1_amd64.deb ...
Unpacking libxslt1-dev:amd64 (1.1.32-2.2~deb10u1) ...
Setting up libicu63:amd64 (63.1-6+deb10u1) ...
Setting up icu-devtools (63.1-6+deb10u1) ...
Setting up libicu-dev:amd64 (63.1-6+deb10u1) ...
Setting up libxml2:amd64 (2.9.4+dfsg1-7+deb10u1) ...
Setting up libxml2-dev:amd64 (2.9.4+dfsg1-7+deb10u1) ...
Setting up libxslt1.1:amd64 (1.1.32-2.2~deb10u1) ...
Setting up libxslt1-dev:amd64 (1.1.32-2.2~deb10u1) ...
Processing triggers for libc-bin (2.28-10) ...
Configuring for:
PHP Api Version: 20190902
Zend Module Api No: 20190902
Zend Extension Api No: 320190902
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /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 we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... 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 -R... no
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-20190902
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 whether to build with XSL support... yes, shared
checking for libxslt >= 1.1.0... yes
checking for libexslt... yes
checking for a sed that does not truncate output... /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 ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
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
/bin/bash /usr/src/php/ext/xsl/libtool --mode=compile cc -I. -I/usr/src/php/ext/xsl -DPHP_ATOM_INC -I/usr/src/php/ext/xsl/include -I/usr/src/php/ext/xsl/main -I/usr/src/php/ext/xsl -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/include/libxml2 -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c /usr/src/php/ext/xsl/php_xsl.c -o php_xsl.lo
mkdir .libs
cc -I. -I/usr/src/php/ext/xsl -DPHP_ATOM_INC -I/usr/src/php/ext/xsl/include -I/usr/src/php/ext/xsl/main -I/usr/src/php/ext/xsl -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/include/libxml2 -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c /usr/src/php/ext/xsl/php_xsl.c -fPIC -DPIC -o .libs/php_xsl.o
/bin/bash /usr/src/php/ext/xsl/libtool --mode=compile cc -I. -I/usr/src/php/ext/xsl -DPHP_ATOM_INC -I/usr/src/php/ext/xsl/include -I/usr/src/php/ext/xsl/main -I/usr/src/php/ext/xsl -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/include/libxml2 -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c /usr/src/php/ext/xsl/xsltprocessor.c -o xsltprocessor.lo
cc -I. -I/usr/src/php/ext/xsl -DPHP_ATOM_INC -I/usr/src/php/ext/xsl/include -I/usr/src/php/ext/xsl/main -I/usr/src/php/ext/xsl -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/include/libxml2 -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c /usr/src/php/ext/xsl/xsltprocessor.c -fPIC -DPIC -o .libs/xsltprocessor.o
/bin/bash /usr/src/php/ext/xsl/libtool --mode=link cc -DPHP_ATOM_INC -I/usr/src/php/ext/xsl/include -I/usr/src/php/ext/xsl/main -I/usr/src/php/ext/xsl -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/include/libxml2 -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wl,-O1 -Wl,--hash-style=both -pie -o xsl.la -export-dynamic -avoid-version -prefer-pic -module -rpath /usr/src/php/ext/xsl/modules php_xsl.lo xsltprocessor.lo -lxslt -lxml2 -lexslt -lxslt -lxml2
cc -shared .libs/php_xsl.o .libs/xsltprocessor.o -lexslt -lxslt -lxml2 -Wl,-O1 -Wl,--hash-style=both -Wl,-soname -Wl,xsl.so -o .libs/xsl.so
creating xsl.la
(cd .libs && rm -f xsl.la && ln -s ../xsl.la xsl.la)
/bin/bash /usr/src/php/ext/xsl/libtool --mode=install cp ./xsl.la /usr/src/php/ext/xsl/modules
cp ./.libs/xsl.so /usr/src/php/ext/xsl/modules/xsl.so
cp ./.libs/xsl.lai /usr/src/php/ext/xsl/modules/xsl.la
PATH="$PATH:/sbin" ldconfig -n /usr/src/php/ext/xsl/modules
----------------------------------------------------------------------
Libraries have been installed in:
/usr/src/php/ext/xsl/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'.
Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20190902/
find . -name \*.gcno -o -name \*.gcda | xargs rm -f
find . -name \*.lo -o -name \*.o | 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/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment