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

Failed to build due to checking for libmemcached location... configure: error: Unable to find memcached.h #140

Closed
weizhu-us opened this Issue Jun 13, 2014 · 6 comments

Comments

Projects
None yet
6 participants
@weizhu-us

weizhu-us commented Jun 13, 2014

I was trying to build php-memcached,
./configure --with-libmemcached-dir=/u/weiz/libmemcached-1.0.16

got the following error
checking for libmemcached location... configure: error: Unable to find memcached.h under /u/weiz/libmemcached-1.0.16

by looking at the
https://github.com/php-memcached-dev/php-memcached/blob/master/config.m4#L277

It's looking for
if test ! -f "$PHP_LIBMEMCACHED_DIR/include/libmemcached/memcached.h";

I have downloaded libmemcached-1.0.16 and built it.

find ./ -name memcached.h
./libmemcached-1.0.16/libtest/memcached.h
./libmemcached-1.0.16/libmemcached-1.0/memcached.h
./libmemcached-1.0.16/libmemcached-1.0/struct/memcached.h
./libmemcached-1.0.16/libmemcached/memcached.h

None of them are under /include/ directory. Did I miss anything obvious?

@intellix

This comment has been minimized.

Show comment
Hide comment
@intellix

intellix Jun 22, 2014

I was just attempting to do the same on CentOS: ./configure --with-libmemcached-dir=/usr/include/libmemcached/

Which errors with: checking for libmemcached location... configure: error: Unable to find memcached.h under /usr/include/libmemcached/

It's definitely in there. That memcached.h is referencing libmemcached-1.0/ and if I point it there, same story.

Actually.... now I remove the --with-libmemcached-dir option it suddenly works

intellix commented Jun 22, 2014

I was just attempting to do the same on CentOS: ./configure --with-libmemcached-dir=/usr/include/libmemcached/

Which errors with: checking for libmemcached location... configure: error: Unable to find memcached.h under /usr/include/libmemcached/

It's definitely in there. That memcached.h is referencing libmemcached-1.0/ and if I point it there, same story.

Actually.... now I remove the --with-libmemcached-dir option it suddenly works

@mkoppanen

This comment has been minimized.

Show comment
Hide comment
@mkoppanen

mkoppanen Jun 27, 2014

Member

The test checks for if test ! -f "$PHP_LIBMEMCACHED_DIR/include/libmemcached/memcached.h"
hence your --with-libmemcached-dir should be /usr

Member

mkoppanen commented Jun 27, 2014

The test checks for if test ! -f "$PHP_LIBMEMCACHED_DIR/include/libmemcached/memcached.h"
hence your --with-libmemcached-dir should be /usr

@mkoppanen

This comment has been minimized.

Show comment
Hide comment
@mkoppanen

mkoppanen Oct 9, 2014

Member

No feedback. Please reopen if the issue persists.

Member

mkoppanen commented Oct 9, 2014

No feedback. Please reopen if the issue persists.

@mkoppanen mkoppanen closed this Oct 9, 2014

@szupervigyor

This comment has been minimized.

Show comment
Hide comment
@szupervigyor

szupervigyor Oct 29, 2014

If you compile a module from source, you have to installed all required headers, in this case you have to install "libmemcached-dev" package which contains the required headers.
If you know which files are missing you can search for it with:
'apt-file search "libmemcached/memcached.h"'

szupervigyor commented Oct 29, 2014

If you compile a module from source, you have to installed all required headers, in this case you have to install "libmemcached-dev" package which contains the required headers.
If you know which files are missing you can search for it with:
'apt-file search "libmemcached/memcached.h"'

@winos

This comment has been minimized.

Show comment
Hide comment
@winos

winos Aug 26, 2015

this worked for me.

you should put the absolute path of your libmemcached. E.g:

 --with-libmemcached-dir=/usr/local/libmemcached/ --disable-memcached-sasl

The script config (when you perfom ./config ) contain this line:

 if test ! -f "$PHP_LIBMEMCACHED_DIR/include/libmemcached/memcached.h"; then
  278:       AC_MSG_ERROR(Unable to find memcached.h under $PHP_LIBMEMCACHED_DIR)

winos commented Aug 26, 2015

this worked for me.

you should put the absolute path of your libmemcached. E.g:

 --with-libmemcached-dir=/usr/local/libmemcached/ --disable-memcached-sasl

The script config (when you perfom ./config ) contain this line:

 if test ! -f "$PHP_LIBMEMCACHED_DIR/include/libmemcached/memcached.h"; then
  278:       AC_MSG_ERROR(Unable to find memcached.h under $PHP_LIBMEMCACHED_DIR)

@mariusz-buk

This comment has been minimized.

Show comment
Hide comment
@mariusz-buk

mariusz-buk Nov 17, 2017

First install libmemcached eg. sudo yum install libmemcached-devel

I have memcached.h located in /usr/include/libmemcached.

So I executed ./configure --with-libmemcached-dir=/usr --disable-memcached-sasl

I hope this helps anyone.

mariusz-buk commented Nov 17, 2017

First install libmemcached eg. sudo yum install libmemcached-devel

I have memcached.h located in /usr/include/libmemcached.

So I executed ./configure --with-libmemcached-dir=/usr --disable-memcached-sasl

I hope this helps anyone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment