POV-Ray : Newsgroups : povray.unix : Boost library requirements Server Time
2 May 2024 11:50:01 EDT (-0400)
  Boost library requirements (Message 11 to 16 of 16)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Le Forgeron
Subject: Re: Boost library requirements
Date: 23 Jan 2012 18:08:14
Message: <4f1de85e$1@news.povray.org>
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 !

(on windows, it routes to the window system library, not pthread...)


Post a reply to this message

From: Cousin Ricky
Subject: Re: Boost library requirements
Date: 24 Jan 2012 20:10:01
Message: <web.4f1f55419688c3d585de7b680@news.povray.org>
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!  A Web search revealed no repository for this
library, and a plethora of people looking for it.  There are hints that it's
part of glibc, but I've had little luck tracking down this library as well.  It
is said that it should already be part of my system, but I could not tell
whether they meant a developer's or a runtime setup.

However, during my search, I discovered that I needed updates to my system.
This may have been my timing; I happened to download a major release of openSUSE
before they got all the bugs cleaned out.

After installing the updates (which took something like an hour), Boost /still/
didn't compile cleanly, but POV-Ray did.  :-)

However, config.log did not report any differently for the pthread checks; in
particular, it still reported:

   checking for the pthreads library -lpthreads... no

Is this a cause for concern?  POV-Ray seems to be working fine.


Post a reply to this message

From: Jonathan
Subject: Re: Boost library requirements
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

From: Le Forgeron
Subject: Re: Boost library requirements
Date: 22 Jun 2013 10:28:48
Message: <51c5b4a0$1@news.povray.org>
Le 22/06/2013 14:11, Jonathan nous fit lire :
> 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
> 

Did you try without the --with-boost-thread=boost_thread-mt ?

Did you install the libboost-thread1.49-dev package ?


>   [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

Looks, -pthread is ok. (whereas -lpthreads is not :-), be happy of the
gnu compiler )

>   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
...
>   |   return 0;
>   | }
>   configure:6997: result: no
> 

Well, that portion of config.log is irrelevant, it checked -lpthreads
and we know the result.


> # check for pthreads

pthread was checked as ok, the issue is with the boost-thread library.

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

Yep, attachment are not allowed in this group.
IIRC, you might need LIBS="-lboost_system" on the configure line to have
the boost_thread-mt usable.
Do not ask why.


Post a reply to this message

From: Jonathan
Subject: Re: Boost library requirements
Date: 24 Jun 2013 08:55:01
Message: <web.51c840229688c3d522b734b40@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:
> Le 22/06/2013 14:11, Jonathan nous fit lire :
> > I have the same problem as did Ricky, compiling 3.7RC7.
<snip>
>
> Did you try without the --with-boost-thread=boost_thread-mt ?

Yes, I did that first!
>
> Did you install the libboost-thread1.49-dev package ?

That's where the problem was.  Apparently I had libboost-thread1.50-dev and a
bunch of other ~~1.50 stuff installed, which isn't what POV-Ray is looking for.
I just let apt-get do its thing and hoped I didn't clobber my system:

  9.2 Fix libboost dev libraries

  jonathan@Odin:~$ sudo apt-get install libboost-thread1.49-dev
  jonathan@Odin:~$ sudo apt-get autoremove

  This is a before and after diff between 'dpkg -l | grep boost' results:
     0a1
    > ii  libboost-date-time1.49-dev
    2,3c3
    < ii  libboost-date-time1.50-dev
    < ii  libboost-date-time1.50.0
    ---
    > rc  libboost-date-time1.50.0
    6,7c6,8
    < ii  libboost-serialization1.50-dev
    < ii  libboost-serialization1.50.0
    ---
    > ii  libboost-serialization1.49-dev
    > ii  libboost-serialization1.49.0
    > rc  libboost-serialization1.50.0
    8a10
    > ii  libboost-thread1.49-dev
    10,12c12,13
    < ii  libboost-thread1.50-dev
    < ii  libboost-thread1.50.0
    < ii  libboost1.50-dev
    ---
    > rc  libboost-thread1.50.0
    > ii  libboost1.49-dev
Now ./configure runs fine with only the COMPILED_BY parameter, and compilation
is successful:
 jonathan@Odin:~/Downloads/povray-3.7.0.RC7$ time make -j4
real    3m39.489s
user    10m22.008s
sys     0m33.412s

make check checks out too, so everything seems good now, thank you.

> IIRC, you might need LIBS="-lboost_system" on the configure line to have
> the boost_thread-mt usable.
Nope, didn't need to use that...
> Do not ask why.
.....no danger of that :)  Merci!

Jonathan


Post a reply to this message

From: clipka
Subject: Re: Boost library requirements
Date: 15 Jul 2013 19:45:22
Message: <51e48992$1@news.povray.org>
Am 24.06.2013 14:50, schrieb Jonathan:

>> Did you install the libboost-thread1.49-dev package ?
>
> That's where the problem was.  Apparently I had libboost-thread1.50-dev and a
> bunch of other ~~1.50 stuff installed, which isn't what POV-Ray is looking for.
> I just let apt-get do its thing and hoped I didn't clobber my system:

...

>> IIRC, you might need LIBS="-lboost_system" on the configure line to have
>> the boost_thread-mt usable.
> Nope, didn't need to use that...
>> Do not ask why.

In theory and an ideal world, things should work fine with the 1.50 
package just as it does with 1.49; POV-Ray doesn't ask for any 
particular boost version by default, and it shouldn't matter which of 
the two boost versions you have installed.

Unfortunately our world is not ideal; it appears that the boost 
developers have made a breaking change in the boost_thread library, to 
the effect that it no longer works without also linking in the 
boost_system library - which the POV-Ray makefile doesn't yet do by itself.

So, in theory and a non-ideal world, LIBS="-lboost_system" might indeed 
get the thing working with boost 1.50 as well. Not sure what happens in 
practice though :-P


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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