It seems that OpenSSL is bugged. While OpenSSL uses this code, it doesn't
export these defines anywhere. Match against the API version instead.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
PHP7 fails to load xmlreader.so (php7-mod-xmlreader) module without
dom.so (php7-mod-dom) module loaded:
-snip-
PHP Warning: PHP Startup: Unable to load dynamic library 'xmlreader.so'
(tried: /usr/lib/php/xmlreader.so (Error relocating /usr/lib/php/xmlreader.so:
dom_node_class_entry: symbol not found), /usr/lib/php/xmlreader.so.so (Error
loading shared library /usr/lib/php/xmlreader.so.so: No such file or
directory)) in Unknown on line 0
^C
-snap-
However, this dependency only exists when during build also php7-mod-dom
is selected.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
While at, add --with-pic to configure arguments. This prevents the following
build errors spotted by the build bots for i386 targets:
-snip-
...
ext/openssl/.libs/openssl.o: direct GOT relocation R_386_GOT32X against
`X509_REQ_free' without base register can not be used when making a shared object
...
-snap-
This parameter seems to make no difference on other targets, nor
improve or make worse the package size.
Run tested for i386 in VirtualBox VM and on Duckbill for mxs platform.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
As worked out, ICU library needs its data archive to be useful.
Explain the situation in help text and add option to declare/prevent
this dependency in package meta-data.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Added bcmath module, which is required for some packages. For example it
is required for zabbix-server frontend
Compile tested: Yes, brcm2708
Run tested: Yes, brcm2708
Signed-off-by: Krystian Kozak <krystian.kozak20@gmail.com>
The following error shows that mysqlnd depends on functions
provided by hash:
root@OpenWrt:/etc/php7# php-cli -m
PHP Warning: PHP Startup: Unable to load dynamic library
'mysqlnd.so' (tried: /usr/lib/php/mysqlnd.so (Error
relocating /usr/lib/php/mysqlnd.so: PHP_SHA256Final: symbol
not found), /usr/lib/php/mysqlnd.so.so (Error loading shared
library /usr/lib/php/mysqlnd.so.so: No such file or
directory)) in Unknown on line 0
So let's model this dep in package metadata.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Having "select PACKAGE_zoneinfo-core" wasn't enough for builds without
php7-cli=y or php7-cgi=y. It didn't result in installing zoneinfo-core
when using "opkg install" (during runtime or when building images with
CONFIG_TARGET_PER_DEVICE_ROOTFS).
Missing zoneinfo results in PHP fatal errors, e.g.:
Fatal error: DateTime::createFromFormat(): Timezone database is corrupt - this should *never* happen!
For years users were told to manually install zoneinfo-core package.
This problem was hidden for some time (including 17.01 release) due to
disabled support for CONFIG_PHP7_SYSTEMTZDATA. It's now back as support
for --with-system-tzdata was enabled again.
The proper solution is to simply make php7 package depend on
zoneinfo-core when PHP7_SYSTEMTZDATA is used.
Fixes: 84e5012e88 ("php7: re-enable system timezone data usage")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
This is in anticipation of the MariaDB upgrade from mariadb 10.1.x to
10.2.x. With the latter the PHP MySQL plugins fail to compile, e.g.:
In file included from /home/equeiroz/src/openwrt-asus/build_dir/target-mipsel_74kc_musl/php-7.2.6/ext/mysqli/php_mysqli_structs.h:63:0,
from /home/equeiroz/src/openwrt-asus/build_dir/target-mipsel_74kc_musl/php-7.2.6/ext/mysqli/mysqli.c:34:
/home/equeiroz/src/openwrt-asus/staging_dir/target-mipsel_74kc_musl/usr/include/mysql/my_global.h:3:2: warning: #warning This file should not be included by clients, include only <mysql.h> [-Wcpp]
#warning This file should not be included by clients, include only <mysql.h>
^~~~~~~
In file included from /home/equeiroz/src/openwrt-asus/build_dir/target-mipsel_74kc_musl/php-7.2.6/ext/mysqli/php_mysqli_structs.h:79:0,
from /home/equeiroz/src/openwrt-asus/build_dir/target-mipsel_74kc_musl/php-7.2.6/ext/mysqli/mysqli.c:34:
/home/equeiroz/src/openwrt-asus/staging_dir/target-mipsel_74kc_musl/usr/include/mysql/my_sys.h:3:2: warning: #warning This file should not be included by clients, include only <mysql.h> [-Wcpp]
#warning This file should not be included by clients, include only <mysql.h>
^~~~~~~
In file included from /home/equeiroz/src/openwrt-asus/build_dir/target-mipsel_74kc_musl/php-7.2.6/ext/mysqli/mysqli.c:34:0:
/home/equeiroz/src/openwrt-asus/build_dir/target-mipsel_74kc_musl/php-7.2.6/ext/mysqli/php_mysqli_structs.h:82:10: fatal error: my_list.h: No such file or directory
#include <my_list.h>
Upstream seems unlikely to fix this, see
https://bugs.php.net/bug.php?id=75612. In the bug report it is suggested
to not use libmysqlclient/libmariadbclient and instead utilize mysqlnd
(MySQL Native Driver) provided by PHP. This is the default anyway.
So add the mysqlnd module and remove the libmariadbclient depends.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
PHP comes with a bundled version of libpcre which is then statically
linked. However, we already depend on the packaged library, so we
can reduce the footprint when linking to it dynamically.
This saves around 200-300 kB (this depends on other configuration).
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Upstream was a little premature on asking for a change and not
vetting it. Here is the currently proposed fix.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Depending on which version of libiconv you're using, php_iconv_string()
doesn't always null out *out as part of its initialization. This
patch makes that behavior invariant.
Submitted upstream as https://github.com/php/php-src/pull/3037 where
it's approved and waiting a merge.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Remove a patch which was included upstream.
While at, also add openssl configuration parameters when modules are selected
which depend on openssl (reported by Philip Prindeville).
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
The check to enable/disable this new feature of PHP 7.2 works
incorrectly when cross-compiling because it detects the host headers
only and there is no way to pass in a dedicated directory.
The wish to change this was reported upstream at:
https://bugs.php.net/bug.php?id=75722
For the meantime, use a self-cooked patch.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Also drop mcrypt module as it's deprecated.
Dropped patches have been accepted upstream or something homologous.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
When libpam is selected, then mod_imap pulls in a dep to libpam,
and there seems no way to disable it via configure arguments.
So add this dep here conditionally.
Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Detection of U8T_DECOMPOSE seems to be broken when cross-compiling,
so needs to be preseeded.
-snip-
checking for utf8_mime2text signature... new
checking for U8T_DECOMPOSE...
configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL
is missing. This should not happen. Check config.log for additional information.
-snap-
This requires also a patch for PHP to make the preseeding working.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Add Freetype 2 support to php7-mod-gd. Introduce a configuration
parameter to disable Freetype 2 support if the increased package
size is a concern.
Signed-off-by: Val Kulkov <val.kulkov@gmail.com>
This part of the Makefile was commented out during update from
PHP 5.x to 7.x and not re-enabled in the meanswhile, so fix this finally.
Reported-by: Val Kulkov <val.kulkov@gmail.com>
Signed-off-by: Michael Heimpold <mhei@heimpold.de>