Opened 16 years ago

Closed 13 years ago

#77 closed Bugs (Fixed)

config needed for AIX - gcc

Reported by: cpqlvc Owned by: John Maddock
Milestone: Component: config
Version: None Severity:
Keywords: Cc:


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 

(27_0/libs/thread/src)$ g++ -g -Wall -W -c -I../../.. 
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.

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 

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 

extern void
pthread_yield __((void));

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.



Attachments (0)

Change History (2)

comment:1 Changed 16 years ago by cpqlvc

Logged In: YES 

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 
 2) The first #define in user.hpp is 
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 
in user.hpp, and now all threads files compile under 
AIX 4.3/ gcc 2.95.3

comment:2 Changed 13 years ago by John Maddock

Status: assignedclosed
Logged In: YES 

This is should be fixed in the current cvs state.

John Maddock

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain John Maddock.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.