What version / build of libevent are you using? Given ppc isn’t a supported platform currently, you’ll likely need to manually build libevent - the flags we normally build with can be seen at:
Thanks for your reply @drigby!
I have installed libevent directly using “apt-get install” as its supported on ppc64le, hence I have not build it from source.
The version I have is libevent-2.0-5 and I see the libevent_pthread libraries also listed under the path: /usr/lib/powerpc64le-linux-gnu,
I am not sure if there are more files expected to be present here. If you still think that building manually with those flags should help then I will give it a try.
Thanks,
Meghali
Hi @drigby,
As per your suggestion, I have installed libevent 2.18 and tried the build again. However I am still getting the same error.
I installed libevent 2.18 from source and followed below steps:
Hi @drigby
I tried re-building the libevent with an additional flag -D EVENT__DISABLE_THREAD_SUPPORT=OFF
It generated the libevent_pthreads.so and all relevant files still the error is observed.
Also I tried to see more detailed logs with verbose output for the specific component make command, which gives below logs:
$ make -ddd
No need to remake target ‘/usr/lib/powerpc64le-linux-gnu/libssl.so’.
Considering target file ‘/usr/lib/powerpc64le-linux-gnu/libcrypto.so’.
Looking for an implicit rule for ‘/usr/lib/powerpc64le-linux-gnu/libcrypto.so’.
Trying pattern rule with stem ‘libcrypto.so’.
Trying implicit prerequisite ‘/usr/lib/powerpc64le-linux-gnu/libcrypto.so,v’.
Trying pattern rule with stem ‘libcrypto.so’.
…
Trying implicit prerequisite ‘/usr/lib/powerpc64le-linux-gnu/SCCS/s.libcrypto.so’.
No implicit rule found for ‘/usr/lib/powerpc64le-linux-gnu/libcrypto.so’.
Finished prerequisites of target file ‘/usr/lib/powerpc64le-linux-gnu/libcrypto.so’.
No need to remake target ‘/usr/lib/powerpc64le-linux-gnu/libcrypto.so’.
Finished prerequisites of target file ‘kv_engine/memcached’.
Must remake target ‘kv_engine/memcached’.
Putting child 0x10000b5ac80 (kv_engine/memcached) PID 8304 on the chain.
Live child 0x10000b5ac80 (kv_engine/memcached) PID 8304
[ 94%] Linking CXX executable …/memcached
Reaping winning child 0x10000b5ac80 PID 8304
Live child 0x10000b5ac80 (kv_engine/memcached) PID 8306
…/libmemcached_daemon.a(libevent_locking.cc.o): In function setup_libevent_locking()': /root/meghali/couchbase/kv_engine/daemon/libevent_locking.cc:28: undefined reference to evthread_use_pthreads’
Looking at the logs I am unable to figure out what is missing. Any pointers around this would be helpful.
From that it still sounds like the evthread_use_pthreads symbol is missing from your build of pthreads. If you examine the list of symbols in your libevent shared libraries using nm -D does that symbol appear? e.g.
Note you don’t have libevent_pthreads included in the set of libraries you are linking against - you only have core and extra:
You probably want to look at the contents of tlm/cmake/Modules/FindCouchbaseLibevent.cmake and the matching CMake log output - you likely have some configuration issue where the build system isn’t including libevent_pthread in LIBEVENT_LIBRARIES.
Thanks @drigby, that was a perfect catch! My code doesn’t have the library added for libevent_pthreads. Your pointers helped me understand the issue.
I had added the paths at tlm/cmake/Modules/FindCouchbaseLibevent.cmake for “find_library (LIBEVENT_THREAD_LIB” however I figured out that the code is not entering the conditional statement “if(NOT _supported_platform)” where the library paths are set for pthread libraries.
I am now going through the code and trying to understand more as to why this conditional doesn’t include architecture “_arch” check and which un-supported platforms this part of code might have been written for.