Bug 275795 - devel/php82-readline: make configure fails: Please reinstall readline - I cannot find readline.h
Summary: devel/php82-readline: make configure fails: Please reinstall readline - I can...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Muhammad Moinur Rahman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-16 21:54 UTC by x0r+freebsd
Modified: 2023-12-22 01:26 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (bofh)


Attachments
Poudriere log (17.74 KB, text/plain)
2023-12-16 21:54 UTC, x0r+freebsd
no flags Details
Log generated by ./configure (79.36 KB, text/plain)
2023-12-16 21:55 UTC, x0r+freebsd
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description x0r+freebsd 2023-12-16 21:54:25 UTC
Created attachment 247089 [details]
Poudriere log

I'm trying to build devel/php82-readline through poudriere on FreeBSD 13.2, but the build fails at configure stage with the following error:

configure: error: Please reinstall readline - I cannot find readline.h

However, devel/libedit does get installed appropriately when building the jail. No files seem to be missing either, and pkgconf is able to retrieve the correct CFLAGS and such for libedit.

I understand that the port’s goal is to prefer linking against the libedit.so provided by devel/libedit instead of GNU readline's libreadline.so. However, the easiest way to make the error go away is to install devel/readline in the jail… which then causes the extension to be linked against GNU readline.

I'm attaching the log from Poudriere.
Comment 1 x0r+freebsd 2023-12-16 21:55:49 UTC
Created attachment 247090 [details]
Log generated by ./configure

Also attaching the config.log file as suggested by the contents of the Poudriere log.
Comment 2 x0r+freebsd 2023-12-16 22:04:00 UTC
I tried disabling ccache, but that did not help at all.
Comment 3 Tatsuki Makino 2023-12-17 03:57:22 UTC
This is a bug on devel/readline side.

install-headers target on readline-8.2/Makefile.in remains to install headers in $(includedir)/readline directory.
But it seems that readline-8.2/readline.pc.in file has been changed to no longer be in ${includedir}/readline directory.
If make patch is run with -D PATCH_DEBUG, that's where fuzz is.

===>  Applying FreeBSD patch-readline.pc.in
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- readline.pc.in.orig        2018-04-23 15:45:38 UTC
|+++ readline.pc.in
--------------------------
Patching file readline.pc.in using Plan A...
Hunk #1 succeeded at 7 with fuzz 1.
done
Comment 4 x0r+freebsd 2023-12-17 20:15:28 UTC
Hi Tatsuki,

I understand that there might be a bug in devel/readline, installing headers in the wrong location.

However, it seems that the latest version of devel/php82 no longer depends on devel/readline, switching to devel/libedit according to a recent commit [1]. Any bugs in the devel/readline port are no longer relevant.

This bug also affects devel/php81-readline because of a similar change in that port too.

[1]: https://cgit.freebsd.org/ports/commit/lang/php82/Makefile?id=cea1194ae5f2bfa34526d25e6908fcd9d1698c0c
Comment 5 x0r+freebsd 2023-12-17 20:28:39 UTC
After some more investigation, I have found our culprit.

It seems that files/patch-config.m4 is interfering with the ./configure script in such a way that it breaks. Deleting this patch from the files directory in my local ports tree fixes the build, and I get a php82-readline that is linked against libedit, as intended.
Comment 6 commit-hook freebsd_committer freebsd_triage 2023-12-22 01:25:04 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=66f32c9dd235dbabda1fbe032194f159aa00d7a7

commit 66f32c9dd235dbabda1fbe032194f159aa00d7a7
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-12-22 00:58:50 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-12-22 01:24:36 +0000

    lang/php81: Update version 8.1.26=>8.1.27

    - Remove unnecesary patches from devel/php82-readline [1]

    Changelog: https://www.php.net/ChangeLog-8.php#8.1.27

    PR:             275795 [1]
    Reported by:    x0r+freebsd@x0r.fr [1]

 devel/php81-readline/files/patch-config.m4 (gone)  | 33 -------------------
 .../files/patch-readline_cli.c (gone)              | 13 --------
 lang/php81/Makefile                                |  4 +--
 lang/php81/distinfo                                |  6 ++--
 sysutils/php81-posix/files/patch-posix.c (gone)    | 38 ----------------------
 www/php81-opcache/files/patch-config.m4 (gone)     | 20 ------------
 6 files changed, 5 insertions(+), 109 deletions(-)
Comment 7 commit-hook freebsd_committer freebsd_triage 2023-12-22 01:25:07 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e216badd22213c1654b46954576b85887a0a92b7

commit e216badd22213c1654b46954576b85887a0a92b7
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-12-22 00:33:13 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-12-22 01:24:36 +0000

    lang/php82: Update version 8.2.13=>8.2.14

    - php modules while build with system pcre fails to run when using
      apache httpd and mod_php. So OPTIONIZE and add as a non-DEFAULT
      option. However to my knowledge and experience I haven't faced this
      with nginx and php-fpm yet. [1]
    - There is another corner case with apache httpd and mod_php when run
      on 13.2-RELEASE or newer specially on versions where ASLR is by default
      turned on. All modules specialy opcache crashes httpd. So add a
      warning message to advise users to move into php-fpm. [2]
    - Remove unnecesary patches from devel/php82-readline [3]

    Changelog: https://www.php.net/ChangeLog-8.php#8.2.14

    PR: 275522 [1], 268318 [2], 275795 [3]
    Reported by: majo-bugs.freebsd.org@cerny.sk [1], zarychtam@plan-b.pwste.edu.pl [2], x0r+freebsd@x0r.fr [3]

 devel/php82-readline/files/patch-config.m4 (gone)  | 33 -------------------
 .../files/patch-readline_cli.c (gone)              | 13 --------
 lang/php82/Makefile                                | 16 +++++----
 lang/php82/distinfo                                |  6 ++--
 lang/php82/files/patch-TSRM_TSRM.c                 |  4 +--
 lang/php82/files/patch-configure.ac                | 10 +++---
 lang/php82/pkg-message.mod                         | 15 ++++++---
 lang/php82/pkg-plist                               |  7 ++++
 sysutils/php82-posix/files/patch-posix.c (gone)    | 38 ----------------------
 www/php82-opcache/files/patch-config.m4 (gone)     | 20 ------------
 10 files changed, 37 insertions(+), 125 deletions(-)