Bug 251252 - www/mod_php80: wrong libphp name
Summary: www/mod_php80: wrong libphp name
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: Torsten Zuehlsdorff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-19 10:13 UTC by Jonas Palm
Modified: 2022-01-25 09:26 UTC (History)
5 users (show)

See Also:


Attachments
Something like this might do it? (749 bytes, patch)
2021-12-01 08:32 UTC, mark burdett
ale: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonas Palm 2020-11-19 10:13:55 UTC
The libphp library is just called libphp.so with www/mod_php80:
root@webserver:/ # pkg list mod_php80
/usr/local/libexec/apache24/libphp.so

But Mk/Uses/php.mk expects the following (line 281):
RUN_DEPENDS+=   ${PHPBASE}/${APACHEMODDIR}/libphp${PHP_VER:C/.$//}.so:${MOD_PHP_PORT}

This causes ports with
USES += php:mod
to fail.

Poudriere error:
webserver-meta depends on file: /usr/local/libexec/apache24/libphp8.so - not found
Comment 1 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2021-01-04 12:36:15 UTC
Hi Jonas,

after your issue there came up a duplicate. But in the duplicate, i added a patch which should fix the issue. Can you please have a look at #251411 and check the patch there?

Thank you!
Torsten
Comment 2 Jonas Palm 2021-01-13 10:55:22 UTC
Hi Torsten,

Unfortunately this patch doesn't fix the problem as Mk/Uses/php.mk still expects the major version number in the libphpX.so library.

Best regards,
Jonas
Comment 3 Jonas Palm 2021-03-08 10:45:16 UTC
For clarification, I can build www/mod_php80 and lang/php80 just fine right now. The problem is that any port having 

USES += php:mod

set will fail. As explained in the bug report.
Comment 4 mark burdett 2021-12-01 08:32:13 UTC
Created attachment 229827 [details]
Something like this might do it?
Comment 5 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2022-01-11 05:44:10 UTC
(In reply to mark burdett from comment #4)
Can you quickly point me to one or two ports that have such behavior. Looks like I have marked some ports to IGNORE_WITH_PHP=80 for this reason. I will do a recheck on it.
Comment 6 mark burdett 2022-01-11 05:57:38 UTC
(In reply to Muhammad Moinur Rahman from comment #5)
I noticed it with www/nextcloud - error message is nextcloud-php80-23.0.0 depends on file: /usr/local/libexec/apache24/libphp8.so - not found
Comment 7 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2022-01-11 06:33:34 UTC
(In reply to mark burdett from comment #6)
Thanks. Hopefully I haven't marked those to IGNORE already. I have started a build for the PHP ports with 80 as default and will check the issue.
Comment 8 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2022-01-11 07:03:10 UTC
(In reply to mark burdett from comment #6)
Noops. It builds perfectly fine.
http://pdr.bofh.network/data/130-php80/2022-01-11_00h03m31s/logs/nextcloud-php80-23.0.0.log
Comment 10 mark burdett 2022-01-11 07:45:19 UTC
(In reply to Muhammad Moinur Rahman from comment #8)

Well, I can think of two reasons things might be perfectly fine re: www/nextcloud despite this bug: 

1) You are just building www/nextcloud, without installing it.  This is a bug re: RUN_DEPENDS so you have to install it to reproduce the bug.

2) You have php FPM or CGI.  In this case, USES=php:web skips over the logic of adding the nonexistent libphp8.so to RUN_REPENDS.
Comment 11 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2022-01-11 16:36:46 UTC
(In reply to mark burdett from comment #10)
I will commit this after php80 lands on the tree as default. Committing right now might break exp-run which will delay the landing.
Comment 12 commit-hook freebsd_committer freebsd_triage 2022-01-25 09:22:08 UTC
A commit in branch main references this bug:

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

commit ed26168a5c8380b2bc81ff3cd460f7ff44458ebf
Author:     Mark Burdett <mfburdett@gmail.com>
AuthorDate: 2022-01-25 09:17:22 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2022-01-25 09:21:38 +0000

    Fix libphp name in php.mk

    - From php80 and onwards libphp name is libphp.so without the major
      version number. Add a check to fix the RUN_DEPENDS.

    PR:             251252
    Reported by:    jonaspalm@posteo.de
    Approved by:    ale (maintainer)
    Sponsored by:   Bounce Experts

 Mk/Uses/php.mk | 4 ++++
 1 file changed, 4 insertions(+)