configuring copy_file_range: linking check instead of compiling - #22943
configuring copy_file_range: linking check instead of compiling#22943fda77 wants to merge 1 commit into
Conversation
|
Thanks for the PR. This is really weird. Usually, it's the other way around. Compilation works, but link step fails. 🤔 I'll check. Does @devnexen perhaps know, why this happens? |
|
@fda77 can you also please mention on which Linux distribution, this happens. Thanks. From what I understand is, you mean, that the PHP build "works" with the linking test, which fails at the configure step. That would make more sense to me then. |
|
for reference I had a look into the uclibc-ng repository. so copy_file_range is not guarded declaration-wise however the implementation is guarded by its syscall id presence. |
|
it seems it misses a proper condition here. But we do need a workaround one way or another. |
|
PHP is used in https://github.com/Freetz-NG/freetz-ng/ , a firmware modification for Fritz!Box routers. It adds programs like PHP to the firmware. Kernel versions are 2.6 - 5, uclib 0.9 - latest uclibg-ng, gcc v4 - v13. These depend on what the device firmware uses. There are closed source kernelmodules and daemons, so kernel version etc could not changed. I've run here a github action to test compile php on all devices, before that i deleted again the make/pkgs/php/patches/8.5/200-copy_file_range-check.patch which was the same like this PR: https://github.com/fda77/freetz-ng/actions/runs/30579727267 Problems only with some: arm + aarch64 + intel x86,
There is a newer action run with configure visible soon: https://github.com/fda77/freetz-ng/actions/runs/30581522530 |
|
ah that reframes everything, I mistakenly looked at master but in your versions copy_file_range implementation did not exist yet..The split we see is not really arm versus mips but kernel headers ? Your PR them seems the right thing to do, wdyt @petk ? |
|
Yes, on my fork i remove the path / this pr again to get the error messages. |
petk
left a comment
There was a problem hiding this comment.
To not delay this PR for too long, then let's do this.
I'll recheck everything after it. Because, why I'm asking this... What I'm suspecting here is something else - that uclibc-ng is linked differently and that's why this issue. At the compile step (AC_COMPILE_IFELSE) the issue isn't present - header is available but the linking step isn't yet performed. And, from my current understanding is that there are more related issues then to this where Autoconf does only AC_COMPILE_IFELSE checks and similar without doing the linking step.
Nothing to worry for now. I'll get to this at some point once I set up this environment in my virtual machine or something. And I might have also misunderstood the issue in the first place and there are no other issues related to this.
When merging, let's merge this to PHP-8.4 and up then.
|
In Freetz-NG the user could select the desired PHP version: 5.6, 8.2, 8.3 8.4 or 8.5 |
For me compiling works but later linking not