Closed grikdotnet closed 6 years ago
I have the same problem, this config was ok
ENV MEMCACHED_VERSION=3.0.3
# compile memcached extension
ENV MEMCACHED_DEPS zlib-dev libmemcached-dev cyrus-sasl-dev
RUN set -xe \
&& apk add --no-cache libmemcached-libs zlib \
&& apk add --no-cache --virtual .memcached-deps $MEMCACHED_DEPS \
&& curl -fsSL http://pecl.php.net/get/memcached-${MEMCACHED_VERSION}.tgz -o memcached.tar.gz \
&& mkdir -p /tmp/memcached \
&& tar -xf memcached.tar.gz -C /tmp/memcached --strip-components=1 \
&& rm memcached.tar.gz \
&& docker-php-ext-configure /tmp/memcached --enable-memcached \
&& docker-php-ext-install /tmp/memcached \
&& rm -r /tmp/memcached
This is not a bug/issue with the php-memached extension itself. Regardless of --disable-memcached-sasl
being set, it's for toggling behaviour in the PHP extension, and has no effect on the headers provided by libmemached-dev
.
You're going to need to satisfy the dependency to build, even if you opt-out of the functionality in the extension itself.
apk add cyrus-sasl-dev
Got it. So, the bug is a missing check for sasl.h in a configure script.
@grikdotnet No, sorry I realise I could have worded it better. There is no bug,
The provided libmemcached header that contains all of the function definitions to link against the libmemcached library has a hard dependency on sasl.h.
The compiler needs to know what is in that file (it could be anything!), even if you don't use what is in that file, it needs to know what is in it just in case.
This is not a bug, it is a missing build dependency on your side.
One of a configure script goals is to check dependencies. Whether you accept that this missing dependency check is a bug or not, does not matter. It is missing.
Error compiling memcached extension even having sasl disabled in configure.
For some reason there is an unconditional #include <libmemcached-1.0/struct/sasl.h> in memcached.h
OS: Alpine linux 3.4.6