Boost.Thread [1.35.0] building problems.

Hey folks, I know there is an ongoing thread about build failure with Windows XP and cygwin, but I believe the problem goes beyond that platform. I'm building on several different platforms and have run into a similar problem with the <threadapi> parameter. I build on FreeBSD 6.2, Ubuntu 7 (Intel), Ubuntu 6 (PPC) and lastly, Win32. I have NOT tested this out on a win32 platform yet. Using FreeBSD with gcc 3.4.2 and Linux with gcc 4.2 you can reproduce the problem very quickly from the current trunk. In your boost directory, simply enter the following: *bjam --with-wave*. You'll have something like the following: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: No best alternative for libs/thread/build/thread_sources next alternative: required properties: <threadapi>win32 <threading>multi not matched next alternative: required properties: <threadapi>pthread <threading>multi not matched /root/boost/tools/build/v2/build/generators.jam:859: in try-one-generator-really *** argument error * rule object(gcc-linking-generator)@33.run ( project name ? : property-set : sources + ) * called with: ( object(project-target)@388 boost_thread : object(property-set)@411 : ) * missing argument sources /root/boost/tools/build/v2/tools/gcc.jam:405:see definition of rule 'run' being called /root/boost/tools/build/v2/build/generators.jam:920: in try-one-generator /root/boost/tools/build/v2/build/generators.jam:1131: in construct-really /root/boost/tools/build/v2/build/generators.jam:1204: in generators.construct /root/boost/tools/build/v2/tools/builtin.jam:502: in object(lib-generator)@5.run /root/boost/tools/build/v2/build/generators.jam:859: in try-one-generator-really /root/boost/tools/build/v2/build/generators.jam:920: in try-one-generator /root/boost/tools/build/v2/build/generators.jam:1131: in construct-really /root/boost/tools/build/v2/build/generators.jam:1204: in generators.construct /root/boost/tools/build/v2/build/targets.jam:1368: in construct /root/boost/tools/build/v2/build/targets.jam:1206: in object(typed-target)@404.generate /root/boost/tools/build/v2/build/targets.jam:742: in generate-really /root/boost/tools/build/v2/build/targets.jam:715: in object(main-target)@406.generate /root/boost/tools/build/v2/build/targets.jam:858: in targets.generate-from-reference /root/boost/tools/build/v2/build/targets.jam:1129: in generate-dependencies /root/boost/tools/build/v2/build/targets.jam:1179: in object(typed-target)@134.generate /root/boost/tools/build/v2/build/targets.jam:742: in generate-really /root/boost/tools/build/v2/build/targets.jam:715: in object(main-target)@206.generate /root/boost/tools/build/v2/build/targets.jam:254: in object(project-target)@130.generate /root/boost/tools/build/v2/build/targets.jam:858: in targets.generate-from-reference /root/boost/tools/build/v2/build/targets.jam:1129: in generate-dependencies /root/boost/tools/build/v2/build/targets.jam:1179: in object(alias-target-class)@128.generate /root/boost/tools/build/v2/build/targets.jam:742: in generate-really /root/boost/tools/build/v2/build/targets.jam:715: in object(main-target)@196.generate /root/boost/tools/build/v2/build/targets.jam:254: in object(project-target)@84.generate /root/boost/tools/build/v2/build-system.jam:663: in load /root/boost/tools/build/v2/kernel/modules.jam:267: in import /root/boost/tools/build/v2/kernel/bootstrap.jam:134: in boost-build /root/boost/boost-build.jam:11: in module scope ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Using the suggestions from the mail list thread titled: /[boost] [1.35.0] Threads - build failure using gcc on Win XP,/ I tried the following: *bjam --with-wave threadapi=pthread * You will then have something as follows: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /root/boost/tools/build/v2/build/property.jam:285: in validate1 from module property error: Invalid property '<threadapi>pthread': unknown feature 'threadapi'. /root/boost/tools/build/v2/build/property.jam:294: in property.validate from module property /root/boost/tools/build/v2/build/build-request.jam:193: in convert-command-line-element from module build-request /root/boost/tools/build/v2/build/build-request.jam:148: in build-request.from-command-line from module build-request /root/boost/tools/build/v2/build-system.jam:559: in load from module build-system /root/boost/tools/build/v2/kernel/modules.jam:267: in import from module modules /root/boost/tools/build/v2/kernel/bootstrap.jam:134: in boost-build from module /root/boost/boost-build.jam:11: in module scope from module ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Most of my projects are multi-threaded in nature, and thus can not use the Boost 1.35.0 release since this problem doesn't allow me to build. Interesting enough, the Boost.Thread examples do build without a problem. I'm not a bjam Jamfile expert, so I don't even know where to begin trying to fix the Boost.Thread Jamfile.

Andreas Haberstroh <andreas@ibusy.com> writes:
In your boost directory, simply enter the following: *bjam --with-wave*.
You'll have something like the following: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: No best alternative for libs/thread/build/thread_sources next alternative: required properties: <threadapi>win32 <threading>multi not matched next alternative: required properties: <threadapi>pthread <threading>multi not matched
bjam --with-wave --with-thread should work. Anthony -- Anthony Williams | Just Software Solutions Ltd Custom Software Development | http://www.justsoftwaresolutions.co.uk Registered in England, Company Number 5478976. Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL

Anthony Williams wrote:
bjam --with-wave --with-thread
should work.
Hmm, this is interesting. This would indicate a missing dependency in the wave Jamfile. -- _________________________________________ _ _ | Roland Schwarz |_)(_ | aka. speedsnail | \__) | mailto:roland.schwarz@chello.at ________| http://www.blackspace.at

Roland Schwarz wrote:
Hmm, this is interesting. This would indicate a missing dependency in the wave Jamfile.
No, the dependency is there. Does it help if you specify: bjam --with-thread threading=multi ? -- _________________________________________ _ _ | Roland Schwarz |_)(_ | aka. speedsnail | \__) | mailto:roland.schwarz@chello.at ________| http://www.blackspace.at

Roland Schwarz <roland.schwarz@chello.at> writes:
Roland Schwarz wrote:
Hmm, this is interesting. This would indicate a missing dependency in the wave Jamfile.
No, the dependency is there.
Does it help if you specify:
bjam --with-thread threading=multi ?
No. On my linux system, bjam --with-wave --with-thread compiles fine, but if you omit the --with-thread then you get an error. Even if you specify bjam --with-wave threading=multi threadapi=pthread it doesn't work. This time you get "unknown feature threadapi" though. It does appear that it is not reading the thread Jamfile in the same way when it is implicitly picked up from --with-wave vs when it is explicitly requested with --with-thread. Anthony -- Anthony Williams | Just Software Solutions Ltd Custom Software Development | http://www.justsoftwaresolutions.co.uk Registered in England, Company Number 5478976. Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL

The problem I have is pretty simple, which is what grabbed my attention to this problem in the first place. I have projects where I specify the thread library in my Jamfile: <library>$(BOOST_ROOT)/libs/thread/build//boost_thread <threading>multi <link>static In 1.34.1, bjam picks up the dependency and builds just fine. This has worked for a few revs back without a hitch. I was able to upgade Boost without any problems. Now, in 1.35.0, the builds break. Removing build//boost_thread line certainly works in in 1.34.1 and 1.35.0, however, it is still irksome in that things changed, and in this case, were not documented. The <threadapi> and <thread-os> aren't mentioned and caused a little bit of some confusion trying to compile my projects. Anthony Williams wrote:
Roland Schwarz <roland.schwarz@chello.at> writes:
Roland Schwarz wrote:
Hmm, this is interesting. This would indicate a missing dependency in the wave Jamfile.
No, the dependency is there.
Does it help if you specify:
bjam --with-thread threading=multi ?
No. On my linux system,
bjam --with-wave --with-thread
compiles fine, but if you omit the --with-thread then you get an error. Even if you specify
bjam --with-wave threading=multi threadapi=pthread
it doesn't work. This time you get "unknown feature threadapi" though.
It does appear that it is not reading the thread Jamfile in the same way when it is implicitly picked up from --with-wave vs when it is explicitly requested with --with-thread.
Anthony

Anthony Williams wrote:
It does appear that it is not reading the thread Jamfile in the same way when it is implicitly picked up from --with-wave vs when it is explicitly requested with --with-thread.
I already found where the problem is, but have not found how to properly fix it. The problem is in boost's Jamroot in the use-project rule, which would need to be called for dependent projects to pull in the thread Jamfile early enough. As a quick fix please use the suggestion from Anthony, I am working on a solution. -- _________________________________________ _ _ | Roland Schwarz |_)(_ | aka. speedsnail | \__) | mailto:roland.schwarz@chello.at ________| http://www.blackspace.at
participants (3)
-
Andreas Haberstroh
-
Anthony Williams
-
Roland Schwarz