Andrej van der Zee | 20 May 14:33

compiling boost on AIX gives pthread errors

Hi,

I am having problems with compiling boost 1.35 on AIX
5.3 with gcc 4.0.0. I get the pthread errors below. I
am new to AIX, so I have hopes that this can be easily
solved....

Cheers,
Andrej

ibm1# make
./tools/jam/src/bin.aix/bjam 
--user-config=user-config.jam --with-date_time
...patience...
...found 453 targets...
...updating 4 targets...
gcc.compile.c++
bin.v2/libs/date_time/build/gcc-4.0.0/release/threading-multi/greg_month.o
/usr/include/pthread.h:596: error: 'pthread_rwlock_t'
was not declared in this scope
/usr/include/pthread.h:596: error: expected
primary-expression before ')' token
/usr/include/pthread.h:599: error: 'pthread_rwlock_t'
was not declared in this scope
/usr/include/pthread.h:599: error: expected
primary-expression before ',' token
/usr/include/pthread.h:599: error: expected
primary-expression before 'const'
/usr/include/pthread.h:599: error: initializer
expression list treated as compound expression
(Continue reading)

K. Noel Belcourt | 20 May 18:52
Favicon

Re: compiling boost on AIX gives pthread errors

Hi Andrej,

On May 20, 2008, at 6:35 AM, Andrej van der Zee wrote:

> I am having problems with compiling boost 1.35 on AIX
> 5.3 with gcc 4.0.0. I get the pthread errors below. I
> am new to AIX, so I have hopes that this can be easily
> solved....

We don't test with gcc on Aix, but we should.  My system seems to  
compile this file okay :

gcc.compile.c++ bin.v2/libs/date_time/build/gcc-4.0.0/release/ 
threading-multi/greg_month.o

     "g++"  -ftemplate-depth-128 -O3 -finline-functions -Wno-inline - 
Wall -fPIC -pthread  -DBOOST_ALL_DYN_LINK=1 -DBOOST_ALL_NO_LIB=1 - 
DDATE_TIME_INLINE -DNDEBUG  -I"." -c -o "bin.v2/libs/date_time/build/ 
gcc-4.0.0/release/threading-multi/greg_month.o" "libs/date_time/src/ 
gregorian/greg_month.cpp"

This is with Boost 1.35.0 and AIX 5.3 (31488 MB  8 CPU   
PowerPC_POWER5  model IBM,9118-575)

-- Noel
Andrej van der Zee | 21 May 00:36

Re: compiling boost on AIX gives pthread errors

Hi,

Thanks for your reply.

Are there any special configure options or packages
that you installed? I installed AIX for the first time
so maybe I did something bad.

BTW, I noticed that pthread_rwlock_t (the struct my
compiler does not recognize) is defined in
"sys/types.h" and that this file is included from
pthread.h like this:

#ifndef _H_TYPES
#include <sys.types.h>
#endif

But, _H_TYPES is defined at this point and therefor
"sys/types.h" is never included! I checked removing
"sys/types.h" totally from my system but the compiler
does not complain about a missing "sys/types.h" at
all! 

Please anybody?

Cheers,
Andrej

--- "K. Noel Belcourt" <kbelco <at> sandia.gov> wrote:

(Continue reading)

K. Noel Belcourt | 21 May 04:08
Favicon

Re: compiling boost on AIX gives pthread errors


On May 20, 2008, at 4:36 PM, Andrej van der Zee wrote:

> Are there any special configure options or packages
> that you installed? I installed AIX for the first time
> so maybe I did something bad.

Possibly, but it would be helpful if you sent the full compile line  
for greg_month.cpp, so we can compare them for differences.

> BTW, I noticed that pthread_rwlock_t (the struct my
> compiler does not recognize) is defined in
> "sys/types.h" and that this file is included from
> pthread.h like this:
>
> #ifndef _H_TYPES
> #include <sys.types.h>
> #endif
>
> But, _H_TYPES is defined at this point and therefor
> "sys/types.h" is never included! I checked removing
> "sys/types.h" totally from my system but the compiler
> does not complain about a missing "sys/types.h" at
> all!

Don't know that I'm much help here.  Perhaps you're using a gcc you  
built and installed yourself (rather than the one in /usr/bin/gcc)?

-- Noel
(Continue reading)

Andrej van der Zee | 21 May 05:52

Re: compiling boost on AIX gives pthread errors

Hi,

I think it is related to my AIX installation or
something (sorry for misusing the boost news group).
Even the smallest program does not compile:

#include  <iostream>

using namespace std;

int main (void)
{
   cout << "Hello World!\n";

   return 0;
}

When running gcc main.cpp I some of the same errors as
when compiling boost:

ibm1# gcc main.cpp 
/opt/freeware/lib/gcc/powerpc-ibm-aix5.1.0.0/4.0.0/include/wchar.h:299:
error: 'mbstate_t' has not been declared
/opt/freeware/lib/gcc/powerpc-ibm-aix5.1.0.0/4.0.0/include/wchar.h:302:
error: 'mbstate_t' has not been declared
/opt/freeware/lib/gcc/powerpc-ibm-aix5.1.0.0/4.0.0/include/c++/cwchar:71:
error: '::mbstate_t' has not been declared
/opt/freeware/lib/gcc/powerpc-ibm-aix5.1.0.0/4.0.0/include/c++/cwchar:145:
error: '::btowc' has not been declared
/opt/freeware/lib/gcc/powerpc-ibm-aix5.1.0.0/4.0.0/include/c++/cwchar:150:
(Continue reading)

K. Noel Belcourt | 21 May 05:56
Favicon

Re: compiling boost on AIX gives pthread errors


On May 20, 2008, at 9:52 PM, Andrej van der Zee wrote:

> I think it is related to my AIX installation or
> something (sorry for misusing the boost news group).
> Even the smallest program does not compile:
>
> #include  <iostream>
>
> using namespace std;
>
> int main (void)
> {
>    cout << "Hello World!\n";
>
>    return 0;
> }
>
> When running gcc main.cpp I some of the same errors as
> when compiling boost:

Yup, seems like an installation problem.  Good luck!

-- Noel
Sohail Somani | 21 May 06:08

Re: compiling boost on AIX gives pthread errors

Andrej van der Zee wrote:
> Hi,
> 
> I think it is related to my AIX installation or
> something (sorry for misusing the boost news group).
> Even the smallest program does not compile:
> 
> #include  <iostream>
> 
> using namespace std;
> 
> int main (void)
> {
>    cout << "Hello World!\n";
> 
>    return 0;
> }

If you are using the IBM provided gcc (4.0?), I found that was 
hopelessly broken. I do remember a XOPEN macro being involved. I've 
learned to block out the memory so I can't help you much more than that.

I think I was better off compiling it myself so maybe that would help you.

Like others said, good luck ;-)

Sohail
Andrej van der Zee | 22 May 04:28

Re: compiling boost on AIX gives pthread errors


> If you are using the IBM provided gcc (4.0?), I
> found that was 
> hopelessly broken. 

Thanks, after installing gcc 4.2.0 from the IBM
website gcc works more or less. Problem is, I still
can't compile boost because I get an internal compiler
error now (see below some gcc output) for some
sources. I was wondering, did ANYONE manage to compile
boost on AIX 5.3 with gcc? If so, which version of
boost and gcc did you use?

Cheers,
Andrej

ibm1# make
./tools/jam/src/bin.aix/bjam 
--user-config=user-config.jam 
warning: Graph library does not contain optional
GraphML reader.
note: to enable GraphML support, set EXPAT_INCLUDE and
EXPAT_LIBPATH to the
note: directories containing the Expat headers and
libraries, respectively.
warning: skipping optional Message Passing Interface
(MPI) library.
note: to enable MPI support, add "using mpi ;" to
user-config.jam.
note: to suppress this message, pass "--without-mpi"
(Continue reading)

K. Noel Belcourt | 22 May 06:00
Favicon

Re: compiling boost on AIX gives pthread errors


On May 21, 2008, at 8:28 PM, Andrej van der Zee wrote:

>
>> If you are using the IBM provided gcc (4.0?), I
>> found that was
>> hopelessly broken.
>
> Thanks, after installing gcc 4.2.0 from the IBM
> website gcc works more or less. Problem is, I still
> can't compile boost because I get an internal compiler
> error now (see below some gcc output) for some
> sources. I was wondering, did ANYONE manage to compile
> boost on AIX 5.3 with gcc? If so, which version of
> boost and gcc did you use?

We use vacpp version 8.0, sorry.

-- Noel
Andrej van der Zee | 21 May 00:38

Re: compiling boost on AIX gives pthread errors

Hi,

> Hi Andrej,
> 
> On May 20, 2008, at 6:35 AM, Andrej van der Zee
> wrote:
> 
> > I am having problems with compiling boost 1.35 on
> AIX
> > 5.3 with gcc 4.0.0. I get the pthread errors
> below. I
> > am new to AIX, so I have hopes that this can be
> easily
> > solved....
> 
> We don't test with gcc on Aix, but we should.  

Is AIX tested with any other compilers than gcc?

Thanks,
Andrej

      __________________________________________________________
Sent from Yahoo! Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html

Gmane