hi, I find log4cpp's configure not support --with-pthreads on my computer(centos 6.2).
[root@zcy log4cpp]# ./configure --with-pthreads
configure: WARNING: unrecognized options: --with-pthreads
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/usr/local/src/log4cpp/config/missing: Unknown --run' option
Try
/usr/local/src/log4cpp/config/missing --help' for more information
.....
.....
checking for gethostbyname in -lnsl... yes
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking whether the compiler implements namespaces... yes
.....
.....
config.status: executing depfiles commands
config.status: executing libtool commands
configure: WARNING: unrecognized options: --with-pthreads
creating include/log4cpp/config.h - prefix LOG4CPP for include/config.h defines
dirname: extra operand /boot'
Try
dirname --help' for more information.
/
[root@zcy log4cpp]#
And the compile info is(with -pthread flag):
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../include -I../include -pthread -Wall -Wno-unused -pedantic -MT AppendersFactory.lo -MD -MP -MF .deps/AppendersFactory.Tpo -c AppendersFactory.cpp -o AppendersFactory.o >/dev/null 2>&1
But the liblog4cpp.so without libpthread.so link:
[root@zcy log4cpp]# ldd src/.libs/liblog4cpp.so
linux-vdso.so.1 => (0x00007fff305c0000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f95ea7fd000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f95ea4f7000)
libm.so.6 => /lib64/libm.so.6 (0x00007f95ea272000)
libc.so.6 => /lib64/libc.so.6 (0x00007f95e9ed1000)
is log4cpp's configure support centos 6.2? or what's wrong with it?
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f95e9cbb000) /lib64/ld-linux-x86-64.so.2 (0x0000003537600000)
Running
has to be some legacy stuff.
Do not worry about unrecognized option therefore.
Please checkout link https://sourceforge.net/p/log4cpp/feature-requests/33/
where this question was already answered.
BTW, running
gives:
liblog4cpp.so is ready to be linked as a part of multithreaded application as soon as you link the target application with libpthread.so
And it must be built ok on centos 6.2.