help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AIX 5.3 + GCC 4.1.1 : problems with -pthread


From: po . houot
Subject: AIX 5.3 + GCC 4.1.1 : problems with -pthread
Date: 28 Aug 2006 06:26:43 -0700
User-agent: G2/0.2

Hi,

I have a lot of problems using -pthread compilation option with AIX 5.3
and GCC 4.1.1 (binaries installed from ucla library).

I use -pthread on all my compilation lines, example :

g++ -g -c -pthread main.cpp -o main.o
g++ -g -c -pthread Point.cpp -o Point.o
g++ -g -c -pthread Rien.cpp -o Rien.o
g++ -g -c -pthread Rien2.cpp -o Rien2.o
g++ -g -Wl,-G -shared -pthread -L/usr/lib/threads Point.o -o
libpoint.so
g++ -g -Wl,-G -shared -pthread -L/usr/lib/threads Rien.o Rien2.o -o
librien.so
g++ -g -Wl,-brtl -pthread -L/usr/lib/threads main.o -L. -lrien -lpoint
-o appli24

If I don't do that a core dump is generated with backtrace :
#0  0xf09c0404 in __gnu_internal::ctype_c ()
Cannot access memory at address 0x2be4
I also have sometimes errors with C++ streams : operator <<,
destructors, ...

The next problem concerns static variables initialization. There are
not correct. Only one of the library librien.so is initialized (should
be two : 1 in Rien.cpp and one in Rien2.cpp).

The last problem is a linker's warning concerning duplicated symbols :
g++ -g -c -pthread main.cpp -o main.o
g++ -g -c -pthread Point.cpp -o Point.o
g++ -g -c -pthread Rien.cpp -o Rien.o
g++ -g -c -pthread Rien2.cpp -o Rien2.o
g++ -g -pthread -L/usr/lib/threads main.o Point.o Rien.o Rien2.o -o
appli03
ld : 0711-224 AVERTISSEMENT : Symbole .global destructors keyed to
thread_creds_ten double.
ld : 0711-224 AVERTISSEMENT : Symbole .global constructors keyed to
thread_creds_ten double.
ld : 0711-224 AVERTISSEMENT : Symbole thread_creds_t en double.
ld : 0711-224 AVERTISSEMENT : Symbole global constructors keyed to
thread_creds_ten double.
ld : 0711-224 AVERTISSEMENT : Symbole global destructors keyed to
thread_creds_ten double.
ld : 0711-345 Pour plus de d├ętails, utilisez
        l'option -bloadmap ou -bnoquiet.
It seems to influence static initialization.

Does anayone can help me or give me instructions for correct
compilation ?

Regards,
PO Houot.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]