Page MenuHomeFreeBSD

PHP 7.4
Needs ReviewPublic

Authored by tz on Tue, Aug 20, 11:06 PM.

Details

Reviewers
joneum
ale
tobik
pizzamig
Group Reviewers
portmgr
Summary

This is WIP of introducing PHP 7.4

There are many greater changes:

  • Remove of interbase module
  • Remove of recode module
  • Remove of wddx module
  • Many modules changes the build switches
  • Many modules changes the config format, so patches needed to be recreated
  • SSL / OpenSSL seems to work differently now

Still broken modules: imap, gd, pdo_dblib
Need some rethinking: openssl -> switched from base to ports; this works but does not make me happy

I'm currently hitting a wall so i'm happy about every help i can get.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

tz created this revision.Tue, Aug 20, 11:06 PM
tz added a comment.Tue, Aug 20, 11:07 PM

Before you asked: yes, all is a repo-copy. I used --show-copy-as-ads in order to let you use the review for your own build-tests.

ale added a comment.Thu, Aug 22, 12:17 PM

As you said, this is useful for testing, but a standard diff might be useful, too, to see what actually changed from php 7.2

tz added a comment.Fri, Aug 23, 11:07 PM
In D21349#464775, @ale wrote:

As you said, this is useful for testing, but a standard diff might be useful, too, to see what actually changed from php 7.2

You can find a standard diff of the current WIP here:
http://www.meisterderspiele.de/freebsd/php-7.4.diff

tobik requested changes to this revision.Fri, Aug 30, 7:11 AM
In D21349#465436, @tz wrote:
In D21349#464775, @ale wrote:

As you said, this is useful for testing, but a standard diff might be useful, too, to see what actually changed from php 7.2

You can find a standard diff of the current WIP here:
http://www.meisterderspiele.de/freebsd/php-7.4.diff

It would be more useful to have that diff here on Phabricator for review purposes. It's very hard to review this here otherwise.

lang/php74/Makefile.ext
199

Having a manual dependency on security/openssl instead of going with USES=ssl (i.e., using the SSL implementation users have selected) is a huge red flag. It is obviously not right and will break any system where packages are not built with DEFAULT_VERSIONS+=ssl=openssl. It seems like a regression to what is in lang/php73/Makefile.ext now.

Why is it needed?

This revision now requires changes to proceed.Fri, Aug 30, 7:11 AM
tz updated this revision to Diff 61533.Sun, Sep 1, 6:02 PM

I updated the review to contain the diff only, like requested. Hopefully you can work with this better now.

I reverted the BUILD_DEPENDS to security/openssl.

I introduced it, because it solved the following error:

checking for RAND_egd... yes
checking for openssl >= 1.0.1... no
configure: error: Package requirements (openssl >= 1.0.1) were not met:

Package 'openssl', required by 'virtual:world', not found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables OPENSSL_CFLAGS
and OPENSSL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
===>  Script "configure" failed unexpectedly.
Please report the problem to tz@FreeBSD.org [maintainer] and attach the
"/wrkdirs/usr/ports/security/php74-openssl/work/php-7.4.0beta4/ext/openssl/config.log"
including the output of the failure of your make command. Also, it might be
a good idea to provide an overview of all packages installed on your system
(e.g. a /usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1

Stop.
make: stopped in /usr/ports/security/php74-openssl

I have no idea left, how to solve this.

tobik added inline comments.Sun, Sep 1, 7:02 PM
lang/php74/Makefile.ext
197–204

It builds for me if I replace the entire block with

.if ${PHP_MODNAME} == "openssl"
USES+=			ssl
CONFIGURE_ARGS+=	--with-openssl
CONFIGURE_ENV+=		OPENSSL_CFLAGS="-I${OPENSSLINC}" \
			OPENSSL_LIBS="-L${OPENSSLLIB} -lssl -lcrypto"
.endif
security/php74-openssl/Makefile
11

This needs to go too.

tz marked 2 inline comments as done.Sun, Sep 1, 9:58 PM
tz added inline comments.
lang/php74/Makefile.ext
197–204

This works fine :)

But using this for php74-imap does not work. :/

Also: i tried this way by using the porters handbook. But it wasn't a big help, since i'm not very familiar with the whole build process. Do you have a resource for me to become better at this?

Thanks!

joneum added a comment.Mon, Sep 2, 8:00 AM
This comment was removed by joneum.
tz added a comment.Mon, Sep 2, 8:45 AM

You can find the diff with --copy-as-ads here:
http://www.meisterderspiele.de/freebsd/php-7.4.diff

tz updated this revision to Diff 61722.Fri, Sep 6, 11:00 AM

Update to RC 1.

tz added a comment.Fri, Sep 6, 11:02 AM

@ale Can you please review the changes of php.mk?
I would like to commit the RC1 without the broken modules imap and gd. I do not want to wait until the end and miss the interval to have runtime testing with an RC.

tobik added inline comments.Sat, Sep 7, 8:46 AM
lang/php74/Makefile.ext
150

php74-imap builds if we also set PHP_OPENSSL=yes (only tested with beta4):

.if ${PHP_MODNAME} == "imap"
PHP_MOD_PRIO=	30
OPTIONS_DEFINE=	PANDA
PANDA_DESC=	Uses the forked panda-cclient instead of the original cclient

CONFIGURE_ARGS+=--with-imap=${LOCALBASE} \
		--with-pcre-dir=${LOCALBASE} \
		--with-imap-ssl
CONFIGURE_ENV+=		OPENSSL_CFLAGS="-I${OPENSSLINC}" \
			OPENSSL_LIBS="-L${OPENSSLLIB} -lssl -lcrypto" \
			PHP_OPENSSL=yes
USES+=  ssl
.endif
tz updated this revision to Diff 61796.Sat, Sep 7, 9:22 PM

@tobik Thank you, this works with RC 1 too! :)

So now only graphics/php74-gd is left and broken. The error is:

/bin/sh /wrkdirs/usr/ports/graphics/php74-gd/work/php-7.4.0RC1/ext/gd/libtool --mode=compile cc -I/wrkdirs/usr/ports/graphics/php74-gd/work/php-7.4.0RC1/ext/gd/libgd -I. -I/wrkdirs/usr/ports/graphics/php74-gd/work/php-7.4.0RC1/ext/gd -DPHP_ATOM_INC -I/wrkdirs/usr/ports/graphics/php74-gd/work/php-7.4.0RC1/ext/gd/include -I/wrkdirs/usr/ports/graphics/php74-gd/work/php-7.4.0RC1/ext/gd/main -I/wrkdirs/usr/ports/graphics/php74-gd/work/php-7.4.0RC1/ext/gd -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/libpng16 -I/usr/local/include -I/usr/local/include/freetype2  -DHAVE_CONFIG_H  -O2 -pipe -fstack-protector-strong -fno-strict-aliasing   -c /wrkdirs/usr/ports/graphics/php74-gd/work/php-7.4.0RC1/ext/gd/gd.c -o gd.lo
mkdir .libs
 cc -I/wrkdirs/usr/ports/graphics/php74-gd/work/php-7.4.0RC1/ext/gd/libgd -I. -I/wrkdirs/usr/ports/graphics/php74-gd/work/php-7.4.0RC1/ext/gd -DPHP_ATOM_INC -I/wrkdirs/usr/ports/graphics/php74-gd/work/php-7.4.0RC1/ext/gd/include -I/wrkdirs/usr/ports/graphics/php74-gd/work/php-7.4.0RC1/ext/gd/main -I/wrkdirs/usr/ports/graphics/php74-gd/work/php-7.4.0RC1/ext/gd -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/libpng16 -I/usr/local/include -I/usr/local/include/freetype2 -DHAVE_CONFIG_H -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -c /wrkdirs/usr/ports/graphics/php74-gd/work/php-7.4.0RC1/ext/gd/gd.c  -fPIC -DPIC -o .libs/gd.o
/wrkdirs/usr/ports/graphics/php74-gd/work/php-7.4.0RC1/ext/gd/gd.c:1097:2: warning: implicit declaration of function 'gdFontCacheMutexSetup' is invalid in C99 [-Wimplicit-function-declaration]
        gdFontCacheMutexSetup();
        ^
/wrkdirs/usr/ports/graphics/php74-gd/work/php-7.4.0RC1/ext/gd/gd.c:1236:2: warning: implicit declaration of function 'gdFontCacheMutexShutdown' is invalid in C99 [-Wimplicit-function-declaration]
        gdFontCacheMutexShutdown();
        ^
/wrkdirs/usr/ports/graphics/php74-gd/work/php-7.4.0RC1/ext/gd/gd.c:1303:50: warning: implicit declaration of function 'gdJpegGetVersionString' is invalid in C99 [-Wimplicit-function-declaration]
                php_info_print_table_row(2, "libJPEG Version", gdJpegGetVersionString());
                                                               ^
/wrkdirs/usr/ports/graphics/php74-gd/work/php-7.4.0RC1/ext/gd/gd.c:1311:48: warning: implicit declaration of function 'gdPngGetVersionString' is invalid in C99 [-Wimplicit-function-declaration]
        php_info_print_table_row(2, "libPNG Version", gdPngGetVersionString());
                                                      ^
4 warnings generated.
make: don't know how to make /wrkdirs/usr/ports/graphics/php74-gd/work/php-7.4.0RC1/ext/gd/libgd/gd.c. Stop
tobik added inline comments.Sat, Sep 7, 9:54 PM
lang/php74/Makefile.ext
105

graphics/php74-gd (beta4 again) builds fine if I add --with-external-gd here.

--with-freetype and --with-jpeg can be dropped since they only make sense if using the bundled libgd which we do not do.

tz updated this revision to Diff 61816.Sun, Sep 8, 8:32 PM

Thank you @tobik , this works! And it was the last piece. So everything is compiling and running now! :)

I will do some additional runtime tests, but up until now it looks fine. So i'm waiting for @ale to approve the needed changes of bsd.mk.

Thank you all!

tz updated this revision to Diff 61818.Mon, Sep 9, 7:33 AM

Found and fix plist-issue for FPM

tz updated this revision to Diff 61873.Tue, Sep 10, 8:19 AM

Fix another plist issue with the php-fpm config

tz updated this revision to Diff 61903.Tue, Sep 10, 7:05 PM

Add new module devel/php74-ffi and fix net-mgmt Makefile.

I now have done all build tests on 11.2, 11.3 and 12.

I have also done runtime tests with various modules and i already have RC 1 running one of my projects.

Everything looks fine to me. So when @ale will approve the changes of php.mk, i'm going to commit it. :)

Thank you all for your help!

tz updated this revision to Diff 61904.Tue, Sep 10, 7:07 PM