yunhuizhu / memcached

Automatically exported from code.google.com/p/memcached
0 stars 0 forks source link

1.4.13 reopening: Configure fails on OS X with libevent path specified : Can't enable thread without POSIX thread library #276

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1.  buildout CMMI is a python build/configuration system that makes isolated 
packages.  it is configuring memcached by setting environment variables:

Installing memcached.
memcached: Unpacking and configuring
memcached: Updating environment: 
LDFLAGS=-L/Users/crucial/Sites/nsbuildout/parts/libevent/lib
memcached: Updating environment: 
CFLAGS=-I/Users/crucial/Sites/nsbuildout/parts/libevent/include

that libevent install is correct and working fine.

it then does ./configure

checking build system type... i386-apple-darwin10.8.0
checking host system type... i386-apple-darwin10.8.0
checking target system type... i386-apple-darwin10.8.0
checking for a BSD-compatible install... /usr/bin/install -c

etc

What is the expected output? What do you see instead?

fails with:

checking for library containing pthread_create... no
configure: error: Can't enable threads without the POSIX thread library.

What version of the product are you using? On what operating system?

1.

http://memcached.googlecode.com/files/memcached-1.4.13.tar.gz
https://github.com/downloads/libevent/libevent/libevent-2.0.19-stable.tar.gz

OS X 10.6.8

Please provide any additional information below.

I have seen this closed issue:

http://code.google.com/p/memcached/issues/detail?id=218

Possibly the bug has something to do with the fact that I am specifying a path 
for libevent.

I tried installing libevent manually on my machine.  but making memcached with 
those environment vars set still failed.  I then just built memcached manually 
(separate download) without using buildout, no environment vars set and it 
built just fine.

I have built on an Ubuntu server using this exact combo using buildout: 
environment vars, libevent, memcached and it worked fine.

memcached: Updating environment: 
LDFLAGS=-L/Users/crucial/Sites/nsbuildout/parts/libevent/lib
memcached: Updating environment: 
CFLAGS=-I/Users/crucial/Sites/nsbuildout/parts/libevent/include
checking build system type... i386-apple-darwin10.8.0
checking host system type... i386-apple-darwin10.8.0
checking target system type... i386-apple-darwin10.8.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
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 for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for icc in use... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether __SUNPRO_C is declared... no
checking for gcc option to accept ISO C99... -std=gnu99
checking whether gcc -std=gnu99 and cc understand -c and -o together... yes
checking sasl/sasl.h usability... yes
checking sasl/sasl.h presence... yes
checking for sasl/sasl.h... yes
checking for gcov... /usr/bin/gcov
checking for main in -lgcov... yes
checking for library containing clock_gettime... no
checking for library containing socket... none required
checking for library containing gethostbyname... none required
checking for libevent directory... 
/Users/crucial/Sites/nsbuildout/parts/libevent
checking for library containing umem_cache_create... no
checking for library containing gethugepagesizes... no
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for inttypes.h... (cached) yes
checking for sasl_callback_ft... no
checking for print macros for integers (C99 section 7.8.1)... yes
checking for an ANSI C-conforming const... yes
checking for socklen_t... yes
checking for endianness... little
checking for htonll... no
checking for library containing pthread_create... no
configure: error: Can't enable threads without the POSIX thread library.

thanks for memcached and all your hard work !

Original issue reported on code.google.com by crucialf...@gmail.com on 19 Jun 2012 at 11:52

GoogleCodeExporter commented 9 years ago
just to confirm: 1.4.5 compiles fine

this is the full buildout:

[libevent]
recipe = zc.recipe.cmmi
url = 
https://github.com/downloads/libevent/libevent/libevent-2.0.19-stable.tar.gz

[memcached]
recipe = zc.recipe.cmmi
url = http://memcached.googlecode.com/files/memcached-1.4.13.tar.gz
extra_options = --with-libevent=${libevent:location} 
--bindir=${buildout:directory}/bin
environment =
    CFLAGS=-I${libevent:location}/include
    LDFLAGS=-L${libevent:location}/lib

Original comment by crucialf...@gmail.com on 19 Jun 2012 at 11:57

GoogleCodeExporter commented 9 years ago
I can't reproduce this on my 10.6 box...

CFLAGS=-I../libevent-2.0.19-stable/include 
LDFLAGS=-L../libevent-2.0.19-stable/.libs ./configure && make
^ works just fine.

I have to say -L../libevent-2.0.19-stable/.libs instead of /lib (since there's 
no lib/ for me).

I can upgrade to 10.7, but won't be moving my own machine to 10.8 anytime soon.

Does anyone know if this is related to a change in 10.7 or 10.8? I need help 
reproducing so it can be fixed :(

Original comment by dorma...@rydia.net on 30 Jul 2012 at 12:25

GoogleCodeExporter commented 9 years ago
the buildout should replicate it.  it has to with using enipvironment variables 
CDFLAGS and LDFLAGS that point to an arbitrary separate copy of libevent.  
Setting the command line flags is different.

its not an enormously important bug IMO

Original comment by crucialf...@gmail.com on 30 Jul 2012 at 7:41

GoogleCodeExporter commented 9 years ago
Setting them the way I did is also setting the environment flags?

We'll fix it, but I need to be able to reproduce it :P So having the exact 
commands that were run in whatever order would help. From the best I can tell I 
did exactly what your build script does.

Original comment by dorma...@rydia.net on 30 Jul 2012 at 7:44

GoogleCodeExporter commented 9 years ago
I was never able to reproduce this :( closing, sorry...

Original comment by dorma...@rydia.net on 13 Jan 2013 at 7:22