POV-Ray : Newsgroups : povray.unix : Boost library requirements : Re: Boost library requirements Server Time
17 May 2024 03:25:25 EDT (-0400)
  Re: Boost library requirements  
From: Jonathan
Date: 22 Jun 2013 08:15:01
Message: <web.51c594519688c3d522b734b40@news.povray.org>
"Cousin Ricky" <rickysttATyahooDOTcom> wrote:
> Le_Forgeron <jgr### [at] freefr> wrote:
> > Le 23/01/2012 21:05, Cousin Ricky nous fit lire :
> > >    checking for the pthreads library -lpthreads... no
> >
> > Issue: boost::Thread is a trump for the system library, on linux it is
> > pthread (or it will try harder with proprietary threading... do not go
> > that way on linux).
> >
> >  You must install libpthread !
>
> Merci beaucoup!  I would never have figured that out.
>
> The only problem is finding it!  <snip>

I have the same problem as did Ricky, compiling 3.7RC7.  This is on a Kubuntu
13.04 64bit machine; I had previously installed 3.7RC6 on Kubuntu 12.10 and the
same hardware without significant difficulty.  Now, it seems that the pthread
library is not found, and consequently boost cannot be linked.

Unlike Ricky, I *do* seem to have the pthread library installed, though.

Here's what happens (steps 1-8 omitted, they're the download and support library
installations)
9. Build and install
  ! source page says: Note: Some users on 64-bit platforms have reported that
adding --with-boost-thread=boost_thread-mt to ./configure is needed to get a
successful compilation.

  jonathan@Odin:/usr/local/downloads/povray-3.7.0.RC7$ ./configure
COMPILED_BY="Jonathan Richards<jon### [at] orlopdecknet>"
--with-boost-thread=boost_thread-mt

  [extract of configure output to console:]
  ...
  Libraries
  ---------
  checking whether to link with cygwin DLL... no
  checking whether to enable static linking... no
  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 for boostlib >= 1.37... yes
  checking whether the Boost::Thread library is available... yes
  checking for exit in -lboost_thread-mt... yes
  checking whether the boost thread library is usable... no
  configure: error: in `/usr/local/downloads/povray-3.7.0.RC7':
  configure: error: cannot link with the boost thread library
  See `config.log' for more details

  [from config.log]
  configure:6955: checking for the pthreads library -lpthreads
  configure:6988: gcc -o conftest     conftest.c -lpthreads  >&5
  /usr/bin/ld: cannot find -lpthreads
  collect2: error: ld returned 1 exit status
  configure:6988: $? = 1
  configure: failed program was:
  | /* confdefs.h */
  | #define PACKAGE_NAME "POV-Ray"
  | #define PACKAGE_TARNAME "povray"
  | #define PACKAGE_VERSION "3.7.0.RC7"
  | #define PACKAGE_STRING "POV-Ray 3.7.0.RC7"
  | #define PACKAGE_BUGREPORT "uni### [at] povrayorg"
  | #define PACKAGE_URL ""
  | #define VERSION_BASE "3.7"
  | #define DISTRIBUTION_MESSAGE_2 " Jonathan Richards<jonathan@orlopdeck.net>"
  | #define PACKAGE "povray"
  | #define VERSION "3.7.0.RC7"
  | #define STDC_HEADERS 1
  | #define HAVE_SYS_TYPES_H 1
  | #define HAVE_SYS_STAT_H 1
  | #define HAVE_STDLIB_H 1
  | #define HAVE_STRING_H 1
  | #define HAVE_MEMORY_H 1
  | #define HAVE_STRINGS_H 1
  | #define HAVE_INTTYPES_H 1
  | #define HAVE_STDINT_H 1
  | #define HAVE_UNISTD_H 1
  | #define HAVE_STDLIB_H 1
  | #define BUILD_ARCH "x86_64-unknown-linux-gnu"
  | #define COMPILER_VENDOR "gnu"
  | #define COMPILER_VERSION "g++ 4.7"
  | #define COMPILER_VER " (g++ 4.7 @ x86_64-unknown-linux-gnu)"
  | /* end confdefs.h.  */
  | #include <pthread.h>
  | int
  | main ()
  | {
  | pthread_t th; pthread_join(th, 0);
  |                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
  |                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
  |   ;
  |   return 0;
  | }
  configure:6997: result: no

# check for pthreads
  jonathan@Odin:~$ find /usr/include -name '*pthread*'
  /usr/include/pthread.h
  /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h
  /usr/include/boost/signals2/detail/lwm_pthreads.hpp
  /usr/include/boost/thread/pthread
  /usr/include/boost/thread/pthread/pthread_mutex_scoped_lock.hpp
  /usr/include/boost/smart_ptr/detail/atomic_count_pthreads.hpp
  /usr/include/boost/smart_ptr/detail/lwm_pthreads.hpp
  /usr/include/boost/interprocess/sync/posix/pthread_helpers.hpp
  ...

  jonathan@Odin:~$ find /usr/lib -name '*pthread*'
  /usr/lib/x86_64-linux-gnu/libpthread_nonshared.a
  /usr/lib/x86_64-linux-gnu/libpthread.so
  /usr/lib/x86_64-linux-gnu/pkgconfig/pthread-stubs.pc
  /usr/lib/x86_64-linux-gnu/libpthread.a
  ...

  jonathan@Odin:~$ ldconfig -p | grep pthread
   libpthread.so.0 (libc6,x86-64, OS ABI: Linux 2.6.24) =>
/lib/x86_64-linux-gnu/libpthread.so.0
   libpthread.so.0 (libc6, OS ABI: Linux 2.6.24) =>
/lib/i386-linux-gnu/libpthread.so.0
   libpthread.so.0 (libc6, OS ABI: Linux 2.6.24) => /lib32/libpthread.so.0

Any help or insight would be gratefully received; a full config.log is available
on request; I can't post attachments, apparently.

Thanks
Jonathan


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.