-
Notifications
You must be signed in to change notification settings - Fork 7.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix readline integration #13184
base: master
Are you sure you want to change the base?
Fix readline integration #13184
Conversation
If you want to remove readline support, we then no longer need their unit tests wdyt ? |
Yes. The readline library specific tests can be then removed here. |
Waiting for this, see PR #15194 |
PHP_READLINE, PHP_LIBEDIT, and PHP_READLINE_LIBS variables are not available in sapi before the extensions arguments get processed by the configure script. But the Autoconf raw default variables with_readline and with_libedit are. This checks if readline support can be enabled in phpdbg This is partial fix towards the more proper phpGH-13184 or similar in the future to make phpdbg readline integration easier to use. Previous check silently enabled the phpdbg readline integration when readline is built as shared and failed on the make step: undefined reference to 'readline' undefined reference to 'add_history' These cases enable it: ./configure --enable-phpdbg-readline --with-libedit ./configure --enable-phpdbg-readline --with-readline These cases don't enable it: ./configure --enable-phpdbg-readline ./configure --enable-phpdbg-readline --with-libedit=shared ./configure --enable-phpdbg-readline --with-readline=shared
1b7e3cb
to
5b671b6
Compare
I'm wondering if we should just merge this for PHP 8.4 or wait for PHP 9 here. It is non-functional to have some library available for linking and it can't be used for distribution etc. |
6e5944a
to
308d4a1
Compare
This removes the GNU Readline library integration and relies on the libedit library if present. Issue is that there are several ext/readline libraries and GNU Readline license (GNU GPL 3) is not compatible with the PHP license. There was a similar attempt to fix this (phpGH-3823) and now fix continues here. Changes: - `--with-libedit` configure option removed (only `--with-readline` stays) - readline extension tests fixed: those required by only readline library removed, added missing skip reasons, some functions are always available, etc. - New PHP_SETUP_EDIT Autoconf macro that finds libedit This also fixes the phpdbg readline integration on *nix systems (using libedit library) for history (up/down keys and similar nice features) to not produce compile errors: ./configure --enable-phpdbg-readline make undefined reference to 'readline' undefined reference to 'add_history'
8e6e98c
to
38c9f89
Compare
This removes the GNU readline library integration on *nix systems and relies on only libedit library. Issue is that there are several ext/readline libraries and GNU Readline library (licenced under the GNU GPL 3) is not compatible with PHP license. In reality this means that as soon as you build PHP with Readline library linked you shouldn't distribute PHP, which makes it unusable. There was a similar attempt to fix this (#3823) and now fix continues here.
Changes:
--with-libedit
configure option removed (only--with-readline
stays)Fixes:
This also fixes the phpdbg readline integration on *nix systems (using libedit library) for history (up/down keys and similar nice features). Previously there was a build error if the --with-readline or --with-libedit option wasn't added:
Other patches pending that further improve the libedit integration in PHP:
Post pull requests fixes and adjustments: