ClaireTan0216 / memcached

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

reopening: Configure fails on AIX 6.1 with libevent path specified : Can't enable thread without POSIX thread library #312

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
./configure --prefix=/usr/local/memcached-1.4.15 
--with-libevent=/usr/local/libevent-1.4.14b

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?
libevent-1.4.14b
memcached-1.4.15
AIX 6.1

Please provide any additional information below.

libpthread has already been installed on the OS.
run "lslpp -l | grep libpthread" in console, the output is:

bos.rte.libpthreads        6.1.8.0  COMMITTED  libpthreads Library

Original issue reported on code.google.com by Franklin...@gmail.com on 6 Mar 2013 at 7:03

GoogleCodeExporter commented 9 years ago
I have the same problem.
- AIX 7.1,
- libevent-1.4.14b,
- memcached-1.4.13.

Is there any solution or workaround?

Original comment by lukasz.baranowski@gmail.com on 6 Jun 2013 at 12:58

GoogleCodeExporter commented 9 years ago
Look in config.log to see why the detection is failing.  If you can't figure it 
out, attach it here.

Original comment by ingen...@gmail.com on 8 Jun 2013 at 4:14

GoogleCodeExporter commented 9 years ago
When using gcc it seems the -pthread options are passed to ld. From config.log:

configure:5976: checking for library containing pthread_create
configure:6007: /lppdir/src/memcached/memcached/compile gcc -std=gnu99 -o 
conftest -DSYSV -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_AIX52 -D_AIX53 
-D_AIX61
        -D_ALL_SOURCE -DFUNCPROTO=15 -O -I/opt/freeware/include -maix64 -pthread -pthread -I/usr/local/include  -L/usr/local/lib -L/opt/freeware/lib64 -L/opt/f
reeware/lib -Wl,-rpath,/usr/local/lib conftest.c -levent  >&5
ld: 0706-012 The -p flag is not recognized.
ld: 0706-012 The -a flag is not recognized.
ld: 0706-012 The -t flag is not recognized.
ld: 0706-012 The -h flag is not recognized.
collect2: error: ld returned 255 exit status
configure:6007: $? = 1

When using IBM xlC 12.1 configure runs fine but compiling fails with this error:

"memcached.h", line 519.6: 1506-343 (S) Redeclaration of thread_init differs 
from previous declaration on line 1063 of "/usr/include/sys/thread.h".
"memcached.h", line 519.6: 1506-377 (I) The type "int" of parameter 1 differs 
from the previous type "unsigned long long".

It seems thread_init from memcached is conflicting with the AIX version. I 
managed to compile and run memcached by applying the attached patch.

Original comment by gwach...@gmail.com on 15 Jan 2014 at 2:19

Attachments:

GoogleCodeExporter commented 9 years ago
applied to 'next' branch.

Original comment by dorma...@rydia.net on 15 Dec 2014 at 3:50