$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Liam Routt (caligari_at_[hidden])
Date: 2005-08-16 01:52:17
I've just moved our project across to Boost 1.33, which seems to be 
working fine on our x86 linux gcc 3.4.4 machine. However, I'm getting 
seg faults on really basic stuff on the mac G5 we have, running linux 
with gcc 3.4.4 (Gentoo, using ppc64 kernel and userspace). This machine 
had no problems under Boost 1.32, I should add.
Here is a simple test program (based on one of the early examples):
=========
#include <boost/program_options.hpp>
namespace po = boost::program_options;
int main ( int, char* )
{
   po::options_description generic("Generic options");
   generic.add_options() ("version,v", "print version string");
   generic.add_options() ("help", "produce help message");
   return ( 0 );
}
=========
The seg fault happens on the second add_options() line. If the two lines 
are combined (as in the original example) it faults somewhere in there, 
but I think it is the same place.
My gdb session:
=========
GNU gdb 6.3
Copyright 2004 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 "powerpc64-unknown-linux-gnu"...Using host 
libthread_db library "/lib/libthread_db.so.1".
Core was generated by `a.out '.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libboost_program_options.so.1.33.0...done.
Loaded symbols for /usr/lib/libboost_program_options.so.1.33.0
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from 
/usr/lib/gcc-lib/powerpc64-unknown-linux-gnu/3.4.4/libstdc++.so.6...done.
Loaded symbols for 
/usr/lib/gcc/powerpc64-unknown-linux-gnu/3.4.4/libstdc++.so.6
Reading symbols from /lib/ld64.so.1...done.
Loaded symbols for /lib64/ld64.so.1
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from 
/usr/lib/gcc-lib/powerpc64-unknown-linux-gnu/3.4.4/libgcc_s.so.1...done.
Loaded symbols for 
/usr/lib/gcc/powerpc64-unknown-linux-gnu/3.4.4/libgcc_s.so.1
#0  0x000000800005d7a8 in 
._ZN5boost6detail17sp_counted_impl_pINS_15program_options18option_descriptionEE7disposeEv 
()
   from /usr/lib/libboost_program_options.so.1.33.0
(gdb) up
#1  0x0000008000057b90 in 
._ZN5boost15program_options29options_description_easy_initclEPKcS3_ () 
from /usr/lib/libboost_program_options.so.1.33.0
(gdb) up
#2  0x0000000010001930 in main () at my1.cc:14
14         generic.add_options() ("help", "produce help message");
(gdb) up
#3  0x00000080000d8fa4 in .__libc_start_main () from /lib/libc.so.6
=========
Any advice or suggestions are welcome.
We're installing boost 1.33 in our 32-bit ppc chroot environment, and 
will see if there is any difference there, in case that helps.
Also it is worth noting that we have a program that doesn't use the 
program_options, but does use boost filesystem, and that seems to run 
fine.
Take care,
Liam
-- Liam Routt Ph: (03) 8344-1315 Research Programmer caligari_at_[hidden] Computer Science, Melbourne University (or liam_at_[hidden])