HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- gcc makes segmentation error when executing codes ...
Operating System - HP-UX
1827251
Members
3102
Online
109716
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2003 10:27 PM
07-06-2003 10:27 PM
gcc makes segmentation error when executing codes with <iostream> included.
I've found that 64bit gcc on hpux doesn't go easy as in linux or something. I've spent several weeks in doing the same thing...
Binary version of gcc from hp site, the first one, had the following configuration,
Reading specs from /usr/local/pa20_64/lib/gcc-lib/hppa64-hp-hpux11.00/3.2/specs
Configured with: ../gcc/configure --prefix=/usr/local/pa20_64 --enable-languages=c,c++ --host=hppa64-hp-hpux11.00 --target=hppa64-hp-hpux11.00 --with-ld=/usr/ccs/bin/ld --with-gnu-as --enable-libstdcxx-v3 --disable-checking
Thread model: single
gcc version 3.2 20020708 (experimental)
But it had errors when building gnu softwares, say, it stops out of memory(lack of maxssiz parameter or something). Then I got a pre-built version configured with gnu ld from http://www.cmve.net/~merijn/, and it didn't make errors as in the above, but it had errors like incompatable header file, and makes a lot of link error due to gnu linker, so I finally built my own 64bit gcc from original hp 64bit gcc configured with hp linker.
Well, it went well for some time, but I found that it had errors when executing c++ codes(not in compiling). Whenever the code includes iostream object like 'cout', it makes segmentation error. If I inserted stdio.h function like printf(), it works fine.
//hello.cc
#include
int main()
{
std::cout << "hello" << std::endl;
return 0;
}
contgw:/usr/local>./hello
Segmentation fault (core dumped)
Anybody can give me any hint for this?
Thanks in advance.
Binary version of gcc from hp site, the first one, had the following configuration,
Reading specs from /usr/local/pa20_64/lib/gcc-lib/hppa64-hp-hpux11.00/3.2/specs
Configured with: ../gcc/configure --prefix=/usr/local/pa20_64 --enable-languages=c,c++ --host=hppa64-hp-hpux11.00 --target=hppa64-hp-hpux11.00 --with-ld=/usr/ccs/bin/ld --with-gnu-as --enable-libstdcxx-v3 --disable-checking
Thread model: single
gcc version 3.2 20020708 (experimental)
But it had errors when building gnu softwares, say, it stops out of memory(lack of maxssiz parameter or something). Then I got a pre-built version configured with gnu ld from http://www.cmve.net/~merijn/, and it didn't make errors as in the above, but it had errors like incompatable header file,
Well, it went well for some time, but I found that it had errors when executing c++ codes(not in compiling). Whenever the code includes iostream object like 'cout', it makes segmentation error. If I inserted stdio.h function like printf(), it works fine.
//hello.cc
#include
int main()
{
std::cout << "hello" << std::endl;
return 0;
}
contgw:/usr/local>./hello
Segmentation fault (core dumped)
Anybody can give me any hint for this?
Thanks in advance.
newbie for HP-seeker for free-of-charge stuffs.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2003 10:59 PM
07-06-2003 10:59 PM
Re: gcc makes segmentation error when executing codes with <iostream> included.
Not so many answers here...sad...
Well, when I run gdb with the executable, I get the following error messages.
contgw:/usr/local>gdb hello
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "hppa64-hp-hpux11.11"...
(gdb) r
Starting program: /usr/local/hello
warning: (Internal error: pc 0x800003ffff7c2c4c in read in psymtab, but not in symtab.)
Program received signal SIGSEGV, Segmentation fault.
warning: (Internal error: pc 0x800003ffff7c2c4c in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x800003ffff7c2c4c in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x800003ffff7c2c4c in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x800003ffff7c2c4c in read in psymtab, but not in symtab.)
0x800003ffff7c2c4c in ?? ()
at /CLO/Products/OPENSOURCE/src/PL/gcc/obj_gcc/hppa64-hp-hpux11.00/libstdc++-v3/include/istream:273
273 /CLO/Products/OPENSOURCE/src/PL/gcc/obj_gcc/hppa64-hp-hpux11.00/libstdc++-v3/include/istream: No such file or directory.
in /CLO/Products/OPENSOURCE/src/PL/gcc/obj_gcc/hppa64-hp-hpux11.00/libstdc++-v3/include/istream
warning: (Internal error: pc 0x800003ffff7c2c4c in read in psymtab, but not in symtab.)
Please help.
Well, when I run gdb with the executable, I get the following error messages.
contgw:/usr/local>gdb hello
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "hppa64-hp-hpux11.11"...
(gdb) r
Starting program: /usr/local/hello
warning: (Internal error: pc 0x800003ffff7c2c4c in read in psymtab, but not in symtab.)
Program received signal SIGSEGV, Segmentation fault.
warning: (Internal error: pc 0x800003ffff7c2c4c in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x800003ffff7c2c4c in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x800003ffff7c2c4c in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x800003ffff7c2c4c in read in psymtab, but not in symtab.)
0x800003ffff7c2c4c in ?? ()
at /CLO/Products/OPENSOURCE/src/PL/gcc/obj_gcc/hppa64-hp-hpux11.00/libstdc++-v3/include/istream:273
273 /CLO/Products/OPENSOURCE/src/PL/gcc/obj_gcc/hppa64-hp-hpux11.00/libstdc++-v3/include/istream: No such file or directory.
in /CLO/Products/OPENSOURCE/src/PL/gcc/obj_gcc/hppa64-hp-hpux11.00/libstdc++-v3/include/istream
warning: (Internal error: pc 0x800003ffff7c2c4c in read in psymtab, but not in symtab.)
Please help.
newbie for HP-seeker for free-of-charge stuffs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2003 11:34 PM
07-06-2003 11:34 PM
Re: gcc makes segmentation error when executing codes with <iostream> included.
1.how much memory is free on the system?
Is the memory usage OK on the system and also the swap usage.
2.Increase the kernel parameters
maxdsiz |
maxssiz | for 32 -bit applications
maxdsiz_64 |
maxssiz_64 |for 64 bit applications
By default the data size and stack size of the process is 64 MB.
Increase to some value higher.
Most SIGSEGV problems are due to the above.
Revert
Is the memory usage OK on the system and also the swap usage.
2.Increase the kernel parameters
maxdsiz |
maxssiz | for 32 -bit applications
maxdsiz_64 |
maxssiz_64 |for 64 bit applications
By default the data size and stack size of the process is 64 MB.
Increase to some value higher.
Most SIGSEGV problems are due to the above.
Revert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2003 12:04 AM
07-07-2003 12:04 AM
Re: gcc makes segmentation error when executing codes with <iostream> included.
I've checked out kernel parameters with SAM and the current value for maxssiz is 8.3MB.
You mean I need to increase it to 64MB, right?
If this is the case, I don't know how to update the kernel values. That's why I discarded 64bit gcc 3.2 from hp site which made errors like SIGSEGV. Can you let me know the detailed steps I need to take if you don't mind?
Regards.
You mean I need to increase it to 64MB, right?
If this is the case, I don't know how to update the kernel values. That's why I discarded 64bit gcc 3.2 from hp site which made errors like SIGSEGV. Can you let me know the detailed steps I need to take if you don't mind?
Regards.
newbie for HP-seeker for free-of-charge stuffs.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP