This is a discussion on g++ 4.1.1 with pthread option on powerpc-ibm-aix5.3.0.0 within the AIX Operating System forums, part of the Unix Operating Systems category; --> hi, I'm porting a C++ multithread application from Solaris to IBM AIX 5.3 platform. The gcc configuration is : ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| hi, I'm porting a C++ multithread application from Solaris to IBM AIX 5.3 platform. The gcc configuration is : g++ -v Using built-in specs. Target: powerpc-ibm-aix5.3.0.0 Configured with: ./configure --prefix=/home/dwam4/cross/aix64 --with-ld=/usr/ccs/bin/ld --with-as=/usr/ccs/bin/as --enable-shared --enable-threads=posix --enable-languages=c,c++ --disable-nls Thread model: aix gcc version 4.1.1 The compiler options are: CXXFLAGS="-O2 -g -pthread -maxi64" LDFLAGS="-lpthread" All sources compile without error but when i execute the output I get "segmentation fault" in STL sources code. The same sources compile without "-pthread" options, are fine and are executed without errors. Do you have same ideas about this problem ?? sorry for my fucking english thank you very much bye Alberto |
| |||
| Alberto wrote: > hi, > I'm porting a C++ multithread application from Solaris to IBM AIX 5.3 > platform. > The gcc configuration is : > g++ -v > Using built-in specs. > Target: powerpc-ibm-aix5.3.0.0 > Configured with: ./configure --prefix=/home/dwam4/cross/aix64 > --with-ld=/usr/ccs/bin/ld --with-as=/usr/ccs/bin/as --enable-shared > --enable-threads=posix --enable-languages=c,c++ --disable-nls > Thread model: aix > gcc version 4.1.1 > > The compiler options are: > CXXFLAGS="-O2 -g -pthread -maxi64" > LDFLAGS="-lpthread" > > All sources compile without error but when i execute the output I get > "segmentation fault" > in STL sources code. > The same sources compile without "-pthread" options, are fine and are > executed without errors. > > Do you have same ideas about this problem ?? > > sorry for my fucking english > thank you very much > bye Alberto Alberto, Review this (little bit dated) link: http://www-128.ibm.com/developerwork...ry/au-gnu.html Pay particular care to section on "Compiler Options", which says in part: -pthread compiles and links your application code with the POSIX threads library, just as you would do in VisualAge (or XL) C/C++. With VisualAge (or XL) C/C++, you can also compile and link using xlc_r or xlC_r to get thread support, but this option doesn't exist with GCC. Threaded code should therefore be linked with -pthread for GCC. The -pthread option sets flags for both the preprocessor and linker. -tony |
| |||
| Hi Tony, thank you very much for your support. I tried using "-pthread" as linking options but I had the same problems of "Segmentation fault" when I run the executables. Did you use GCC with pthread options on some projects or do you known someone with experience on GCC in AIX environment ?? We ned to to resolve the problem and we have some good opportunites for who is able to help us. thanks bye Alberto bennett.tony@con-way.com ha scritto: > Alberto wrote: > > hi, > > I'm porting a C++ multithread application from Solaris to IBM AIX 5.3 > > platform. > > The gcc configuration is : > > g++ -v > > Using built-in specs. > > Target: powerpc-ibm-aix5.3.0.0 > > Configured with: ./configure --prefix=/home/dwam4/cross/aix64 > > --with-ld=/usr/ccs/bin/ld --with-as=/usr/ccs/bin/as --enable-shared > > --enable-threads=posix --enable-languages=c,c++ --disable-nls > > Thread model: aix > > gcc version 4.1.1 > > > > The compiler options are: > > CXXFLAGS="-O2 -g -pthread -maxi64" > > LDFLAGS="-lpthread" > > > > All sources compile without error but when i execute the output I get > > "segmentation fault" > > in STL sources code. > > The same sources compile without "-pthread" options, are fine and are > > executed without errors. > > > > Do you have same ideas about this problem ?? > > > > sorry for my fucking english > > thank you very much > > bye Alberto > > Alberto, > > Review this (little bit dated) link: > http://www-128.ibm.com/developerwork...ry/au-gnu.html > > Pay particular care to section on "Compiler Options", which says in > part: > -pthread compiles and links your application code with the POSIX > threads library, just as > you would do in VisualAge (or XL) C/C++. With VisualAge (or XL) > C/C++, you can also > compile and link using xlc_r or xlC_r to get thread support, but > this option doesn't exist > with GCC. Threaded code should therefore be linked with -pthread for > GCC. The -pthread > option sets flags for both the preprocessor and linker. > > -tony |
| |||
| On 2006-12-04 09:38:33 -0600, "Alberto" <albeporta@gmail.com> said: > bennett.tony@con-way.com ha scritto: > >> Alberto wrote: >>> hi, >>> I'm porting a C++ multithread application from Solaris to IBM AIX 5.3 >>> platform. >>> The gcc configuration is : >>> g++ -v >>> Using built-in specs. >>> Target: powerpc-ibm-aix5.3.0.0 >>> Configured with: ./configure --prefix=/home/dwam4/cross/aix64 >>> --with-ld=/usr/ccs/bin/ld --with-as=/usr/ccs/bin/as --enable-shared >>> --enable-threads=posix --enable-languages=c,c++ --disable-nls >>> Thread model: aix >>> gcc version 4.1.1 >>> >>> The compiler options are: >>> CXXFLAGS="-O2 -g -pthread -maxi64" >>> LDFLAGS="-lpthread" >>> >>> All sources compile without error but when i execute the output I get >>> "segmentation fault" >>> in STL sources code. >>> The same sources compile without "-pthread" options, are fine and are >>> executed without errors. >>> >>> Do you have same ideas about this problem ?? >>> >>> sorry for my fucking english >>> thank you very much >>> bye Alberto I would suggest subscribing to the GCC help email list: http://gcc.gnu.org/lists.html The place to subscribe (it was confusing to me) is about half way down the page. -- Perry Smith (*pedz@easesoftware.com ) Ease Software, Inc. (*http://www.easesoftware.com ) Low cost SATA Disk Systems for IBMs p5, pSeries, and RS/6000 AIX systems |
| ||||
| Hi, I have some news: you need to install a patch released in decembre 2006 by IBM to resolve this problem. The patch is include in SP of dicember 2006 and modified the include file /usr/include/sys/threads.h. bye Alberto Alberto ha scritto: > hi, > I'm porting a C++ multithread application from Solaris to IBM AIX 5.3 > platform. > The gcc configuration is : > g++ -v > Using built-in specs. > Target: powerpc-ibm-aix5.3.0.0 > Configured with: ./configure --prefix=/home/dwam4/cross/aix64 > --with-ld=/usr/ccs/bin/ld --with-as=/usr/ccs/bin/as --enable-shared > --enable-threads=posix --enable-languages=c,c++ --disable-nls > Thread model: aix > gcc version 4.1.1 > > The compiler options are: > CXXFLAGS="-O2 -g -pthread -maxi64" > LDFLAGS="-lpthread" > > All sources compile without error but when i execute the output I get > "segmentation fault" > in STL sources code. > The same sources compile without "-pthread" options, are fine and are > executed without errors. > > Do you have same ideas about this problem ?? > > sorry for my fucking english > thank you very much > bye Alberto |