Skip to content
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

Unable to install on Ubuntu 14.04 & Apache 2.4 #14

Open
sujith-apivista opened this issue Nov 15, 2018 · 11 comments
Open

Unable to install on Ubuntu 14.04 & Apache 2.4 #14

sujith-apivista opened this issue Nov 15, 2018 · 11 comments

Comments

@sujith-apivista
Copy link

sujith-apivista commented Nov 15, 2018

I have been trying to install this module on Apache 2.4 in Ubuntu 14.04. Here are the steps I followed.

$ sudo apt-get update && apt-get install -y apache2-dev memcached libmemcached-dev autoconf

$ autoconf -f
$ ./configure --with-apxs=/usr/bin/apxs --with-libmemcached=/usr/local
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for libmemcached library... found!
checking for Apache apxs script... found!
configure: creating ./config.status
config.status: creating Makefile
$ make
/usr/bin/apxs -lmemcached -L/usr/local/lib -I/usr/local/include -c mod_auth_memcookie.c
/usr/share/apr-1.0/build/libtool --silent --mode=compile --tag=disable-static x86_64-linux-gnu-gcc -std=gnu99 -prefer-pic -pipe -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security  -D_FORTIFY_SOURCE=2   -DLINUX -D_REENTRANT -D_GNU_SOURCE  -pthread  -I/usr/include/apache2  -I/usr/include/apr-1.0   -I/usr/include/apr-1.0 -I/usr/include -I/usr/local/include  -c -o mod_auth_memcookie.lo mod_auth_memcookie.c && touch mod_auth_memcookie.slo
/usr/share/apr-1.0/build/libtool --silent --mode=link --tag=disable-static x86_64-linux-gnu-gcc -std=gnu99 -Wl,--as-needed -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now    -o mod_auth_memcookie.la  -L/usr/local/lib -lmemcached -rpath /usr/lib/apache2/modules -module -avoid-version    mod_auth_memcookie.lo
$ make install
/usr/bin/apxs -i -n mod_auth_memcookie mod_auth_memcookie.la
/usr/share/apache2/build/instdso.sh SH_LIBTOOL='/usr/share/apr-1.0/build/libtool' mod_auth_memcookie.la /usr/lib/apache2/modules
/usr/share/apr-1.0/build/libtool --mode=install install mod_auth_memcookie.la /usr/lib/apache2/modules/
libtool: install: install .libs/mod_auth_memcookie.so /usr/lib/apache2/modules/mod_auth_memcookie.so
libtool: install: install .libs/mod_auth_memcookie.lai /usr/lib/apache2/modules/mod_auth_memcookie.la
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /usr/lib/apache2/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/lib/apache2/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
chmod 644 /usr/lib/apache2/modules/mod_auth_memcookie.so
Enabling module auth_memcookie.
To activate the new configuration, you need to run:
  service apache2 restart
$ apache2ctl configtest
apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 2 of /etc/apache2/mods-enabled/auth_memcookie.load: Cannot load /usr/lib/apache2/modules/mod_auth_memcookie.so into server: /usr/lib/apache2/modules/mod_auth_memcookie.so: undefined symbol: memcached_destroy_sasl_auth_data
Action 'configtest' failed.
The Apache error log may have more information.

Any suggestions?

P.S. I was able to follow the same steps as above and get it working on Ubuntu 16.04.

@mcarbonneaux
Copy link
Member

mcarbonneaux commented Nov 15, 2018

i think you use libmemcached to old, that not support sasl... beceause abscense of memcached_destroy_sasl_auth_data ...
witch version of libmemcached you have on ubuntu 14 and 16 ?

@mcarbonneaux
Copy link
Member

the sasl support addition does not check sasl support in libmemcached library....

i need to add sasl support in configure.ac autoconf script like in other project using libmemcached and sasl... like php_memcached to do that.

@sujith-apivista
Copy link
Author

I think you may have a point there.

Ubuntu 14.04 -> libmemcached10 (1.0.8-1ubuntu2)
Ubuntu 16.04 -> libmemcached11 (1.0.18-4.1)

I guess my only option is to manually install the newer version of llibmemcached in 14.04 and try again.

@mcarbonneaux
Copy link
Member

mcarbonneaux commented Nov 15, 2018

or clone the last commit before sasl support addition : fbd4add

@sujith-apivista
Copy link
Author

OK, Using the older commit worked. Thank you for your help!

@mcarbonneaux
Copy link
Member

mcarbonneaux commented Nov 15, 2018

why you use --with-libmemcached=/usr/local and not --with-libmemcached=/usr ?
you have compiled libmemcached in /usr/local ?

beceause i've added automatique build + sasl buildcheck on ubuntu 14 without problem...

@mcarbonneaux
Copy link
Member

@sujith-apivista
Copy link
Author

Yes, when libmemcached10 did not work I tried to install the newer version in /usr/local.

I will test with your latest changes on Ubuntu 14 and see how it goes. Thanks.

@sujith-apivista
Copy link
Author

Bad news. I tried with your latest changes and it did not work.

>>> autoconf -f
>>> ./configure  --with-apxs=/usr/bin/apxs --with-libmemcached=/usr
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for libmemcached library... found!
checking for libmemcached sasl... found!
checking for Apache apxs script... found!
configure: creating ./config.status
config.status: creating Makefile
config.status: creating mod_auth_memcookie.h
>>> make
/usr/bin/apxs -lmemcached -L/usr/lib -I/usr/include -c mod_auth_memcookie.c
/usr/share/apr-1.0/build/libtool --silent --mode=compile --tag=disable-static x86_64-linux-gnu-gcc -std=gnu99 -prefer-pic -pipe -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security  -D_FORTIFY_SOURCE=2   -DLINUX -D_REENTRANT -D_GNU_SOURCE  -pthread  -I/usr/include/apache2  -I/usr/include/apr-1.0   -I/usr/include/apr-1.0 -I/usr/include -I/usr/include  -c -o mod_auth_memcookie.lo mod_auth_memcookie.c && touch mod_auth_memcookie.slo
/usr/share/apr-1.0/build/libtool --silent --mode=link --tag=disable-static x86_64-linux-gnu-gcc -std=gnu99 -Wl,--as-needed -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now    -o mod_auth_memcookie.la  -L/usr/lib -lmemcached -rpath /usr/lib/apache2/modules -module -avoid-version    mod_auth_memcookie.lo
>>> make install
/usr/bin/apxs -i -n mod_auth_memcookie mod_auth_memcookie.la
/usr/share/apache2/build/instdso.sh SH_LIBTOOL='/usr/share/apr-1.0/build/libtool' mod_auth_memcookie.la /usr/lib/apache2/modules
/usr/share/apr-1.0/build/libtool --mode=install install mod_auth_memcookie.la /usr/lib/apache2/modules/
libtool: install: install .libs/mod_auth_memcookie.so /usr/lib/apache2/modules/mod_auth_memcookie.so
libtool: install: install .libs/mod_auth_memcookie.lai /usr/lib/apache2/modules/mod_auth_memcookie.la
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /usr/lib/apache2/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/lib/apache2/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
chmod 644 /usr/lib/apache2/modules/mod_auth_memcookie.so
Enabling module auth_memcookie.
To activate the new configuration, you need to run:
  service apache2 restart
>>> apache2ctl configtest
apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/auth_memcookie.load: Cannot load /usr/lib/apache2/modules/mod_auth_memcookie.so into server: /usr/lib/apache2/modules/mod_auth_memcookie.so: undefined symbol: memcached_destroy_sasl_auth_data
Action 'configtest' failed.
The Apache error log may have more information.

@mcarbonneaux
Copy link
Member

can you get me the reponse of this command :

# ldd /usr/lib/apache2/modules/mod_auth_memcookie.so

can you get the response of this command also :

# dpkg -s libmemcached-dev

@sujith-apivista
Copy link
Author

Sure, here you go.

>>> ldd /usr/lib/apache2/modules/mod_auth_memcookie.so
	linux-vdso.so.1 =>  (0x00007fff7bba8000)
	libmemcached.so.10 => /usr/lib/x86_64-linux-gnu/libmemcached.so.10 (0x00007fb5c0c3f000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb5c0876000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fb5c0572000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb5c026c000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fb5c0056000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fb5c107a000)
>>> dpkg -s libmemcached-dev
Package: libmemcached-dev
Status: install ok installed
Priority: optional
Section: libdevel
Installed-Size: 970
Maintainer: Ubuntu Developers <[email protected]>
Architecture: amd64
Source: libmemcached
Version: 1.0.8-1ubuntu2
Depends: libhashkit-dev (= 1.0.8-1ubuntu2), libmemcached10 (= 1.0.8-1ubuntu2), libmemcachedprotocol0 (= 1.0.8-1ubuntu2), libmemcachedutil2 (= 1.0.8-1ubuntu2), libsasl2-dev
Description: C and C++ client library to the memcached server (development files)
 libmemcached is a C and C++ client library to the memcached server
 (http://memcached.org/). It has been designed to be light on memory
 usage, thread safe, and provide full access to server side methods.
 .
 A few notes on its design:
 .
   * Synchronous and Asynchronous support.
   * Access to large object support.
   * Local replication.
   * TCP and Unix Socket protocols.
   * A half dozen or so different tuneable hash algorithms.
   * Implementations of the new cas, replace, and append operators.
   * Man pages written up on entire API.
   * Implements both modulo and consistent hashing solutions.
   * Tools to Manage your Memcached networks.
 .
 This package provides the development files.
Homepage: http://libmemcached.org/libMemcached.html
Original-Maintainer: Michael Fladischer <[email protected]>

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

No branches or pull requests

2 participants