Boost C++ Libraries: Ticket #77: config needed for AIX - gcc https://svn.boost.org/trac10/ticket/77 <pre class="wiki">It looks like Boost.Threads is not configured for the platform / compiler combination AIX / gcc. I'm trying to compile Boost.Threads on a RS/6000 box running AIX 4.3 under gcc 2.95.3. On my first attempt to compile condition.cpp, I got the following error message: (27_0/libs/thread/src)$ g++ -g -Wall -W -c -I../../.. condition.cpp In file included from ../../../boost/limits.hpp:15, from condition.cpp:16: ../../../boost/detail/limits.hpp:55: #error The file boost/detail/limits.hpp needs to be set up for your CPU type. (27_0/libs/thread/src)$ Above the #error is a #ifndef that tests for the definition of several macros. Under g++ __powerpc__ is not defined, but _POWER is; so, I added a defined(_POWER) to the list of conditions. The next problem that I ran into is that select_platform_config.hpp only includes aix.hpp if __IBMCPP__ is defined. This macro is not defined under g++. As a temporary hack I defined this macro on the command line. Fortunately the series of #elif in select_compiler_config.hpp selected gcc.hpp, so I got the right platform (aix.hpp) and compiler (gcc.hpp). aix.hh #define's BOOST_HAS_PTHREAD_YIELD. In thread.cpp thread::yield() this causes pthread_yield () to be invoked. Unfortunately (for me) /usr/include/pthread.h looks like #ifdef _AIX_PTHREADS_D7 extern void pthread_yield __((void)); #endif and _AIX_PTHREADS_D7 is not defined. To workaround this problem I defined BOOST_HAS_SCHED_YIELD on the command line. I don't know whether my little workarounds / command line hacks are correct. By documenting this problem I'm hoping that Boost.Threads will be updated to support AIX / gcc. Thanks, Doug </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/77 Trac 1.4.3 cpqlvc Thu, 02 May 2002 19:48:35 GMT <link>https://svn.boost.org/trac10/ticket/77#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/77#comment:1</guid> <description> <pre class="wiki">Logged In: YES user_id=525108 After fumbling around (see above) I ran the configure script, creating a user.hpp file. Unfortunately... 1) This does not fix the #error problem in boost/limits.hpp. 2) The first #define in user.hpp is #define BOOST_NO_CONFIG This disables the inclusion of gcc.hpp, which #define's BOOST_HAS_THREADS. Attempting to compile the source code in the threads library results in ../../../boost/thread/thread.hpp:17: #error Thread support is unavailable! In file included from ../../../boost/thread/thread.hpp:22, I commented-out the #define BOOST_NO_CONFIG in user.hpp, and now all threads files compile under AIX 4.3/ gcc 2.95.3 </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Wed, 16 Mar 2005 12:34:30 GMT</pubDate> <title>status changed https://svn.boost.org/trac10/ticket/77#comment:2 https://svn.boost.org/trac10/ticket/77#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> <pre class="wiki">Logged In: YES user_id=14804 This is should be fixed in the current cvs state. John Maddock </pre> Ticket