Skip to content

Fail in ./configure when no opcache shm backends exist #5615

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

Closed

Conversation

TysonAndre
Copy link
Contributor

@TysonAndre TysonAndre commented May 22, 2020

This can be seen when the ./configure step fails to detect HAVE_SHM_*,
e.g. due to missing a necessary dependency to compile the test scripts.
(Run ./configure, run make, then run yum install libtool-ltdl-devel for missing dependencies,
then run make)

Prevent creating builds of php where running with opcache results in unknown.
Searching for opcache "Fatal Error Unable to allocate shared memory segment of" "unknown: No such file or directory" reveals issues such as
termux/termux-packages#2234

@nikic
Copy link
Member

nikic commented May 24, 2020

I think it would be more useful to detect this directly in config.m4 and error if none of the configure checks passed.

This can be seen when the `./configure` step fails to detect `HAVE_SHM_*`,
e.g. due to missing a necessary dependency to compile the test scripts.
(Run `./configure`, run `yum install libtool-ltdl-devel` for missing dependencies,
then run `make`, and php can end up built with 0 shared memory opcache caches)

Give a clearer error message than `unknown`
Searching for `opcache "Fatal Error Unable to allocate shared memory segment of"
"unknown: No such file or directory"` reveals issues such as
termux/termux-packages#2234
@TysonAndre TysonAndre force-pushed the shared-memory-handler-implementation branch from 16da244 to 14d6453 Compare May 24, 2020 20:30
@TysonAndre TysonAndre changed the title Improve error message for misconfigured opcache builds Fail in ./configure when no opcache shm backends exist May 24, 2020
@TysonAndre
Copy link
Contributor Author

I think it would be more useful to detect this directly in config.m4 and error if none of the configure checks passed.

Done, wasn't sure if this was deliberately allowed for a minority of systems without shared memory support (e.g. file_cache_only can work around it)

@TysonAndre
Copy link
Contributor Author

E: Could not create temporary file for /var/cache/apt/srcpkgcache.bin - mkstemp (28: No space left on device)
E: The package lists or status file could not be parsed or opened.
apt-get.diagnostics
apt-get install failed
The command "sudo -E apt-get -yq --no-install-suggests --no-install-recommends $(travis_apt_get_options) install locales language-pack-de re2c ccache mysql-server libaspell-dev libbz2-dev libcurl4-gnutls-dev libenchant-dev libfreetype6-dev libgmp-dev libicu-dev libjpeg-dev libkrb5-dev libonig-dev libpng-dev libpq-dev libpspell-dev libsasl2-dev libsqlite3-dev libsodium-dev libtidy-dev libwebp-dev libxml2-dev libxpm-dev libxslt1-dev libzip-dev" failed and exited with 100 during .

The travis build failure seems unrelated, windows builds(appveyor) would be unaffected

@php-pulls php-pulls closed this in f3efb9e May 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants