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
php: fix php-config header file paths #24648
Conversation
Concerning the point about php-embed, there was a comment in the derivation code that said that uWSGI needed php to contain the configure paths. I have built uwsgi with php using my patch, and am running it without any problems, so perhaps it is no longer the case that uWSGI needs the configure info. |
postFixup = '' | ||
mkdir -p $dev/bin $dev/share/man/man1 | ||
mv $out/bin/phpize $out/bin/php-config $dev/bin/ | ||
mv $out/share/man/man1/phpize.1.gz \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Building php71 on NixOs master, for me there is no $out/share/man/man1/phpize.1.gz but a $out/php/man/man1/phpize.1 likewise for php-config
edit: nevermind -- it is allright
Though extension are building fine with this patch, i dislike the fact somehow that the binaries php-config and phpize will not show up in $PATH like that. |
Concerning the $PATH, in what environment is it that
|
Of course you are right. I was referring to the $PATH of my login-shell. |
That comment was mine - I tried your PR and I get these compile errors (again):
I remember that I tracked the issue of the missing |
Curse, could have sworn it was working ... I shall take another look! |
@schneefux, so it seems I am still able to run uWSGI+PHP from my PR branch. I am using nix-shell as follows:
Can you share the way that you are running uWSGI? Maybe I have not done this correctly for some configuration ... |
@calbrecht, I see what you mean now. I think this is actually an issue in NixOS. When I do the |
I had a typo and merged the wrong PR actually 😅 Sorry for the confusion. |
Split outputs mean that the "include" folder from PHP gets placed into a "dev" derivation. However php-config is not aware of this, which means that compiling extensions with phpize fails with an error about being unable to find header files (see #24357, #24420). This fixes that by: 1. passing the `--includedir` flag to `configure` so that `php-config` gives the correct paths. 2. moving the `phpize` and `php-config` scripts and man pages to the dev derivation, to prevent cylic references. 3. ensuring that the `configure` script arguments are stripped from all binaries, including `php-embed`, to prevent cyclic references.
@calbrecht, I think I have solved this now. I've added a |
Motivation for this change
Split outputs mean that the "include" folder from PHP gets placed into a
"dev" derivation. However php-config is not aware of this, which means
that compiling extensions with phpize fails with an error about being
unable to find header files (see #24357, #24420). This fixes that by:
passing the
--includedir
flag toconfigure
so thatphp-config
gives the correct paths.
moving the
phpize
andphp-config
scripts and man pages to thedev derivation, to prevent cylic references.
ensuring that the
configure
script arguments are stripped fromall binaries, including
php-embed
, to prevent cyclic references.Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)