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

Bug#364231: exception catching broken on HPPA



$ ldd a.out
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x40575000)
        libm.so.6 => /lib/libm.so.6 (0x4046e000)
        libgcc_s.so.2 => /lib/libgcc_s.so.2 (0x40068000)
        libc.so.6 => /lib/libc.so.6 (0x4074b000)
        libgcc_s.so.4 => /lib/libgcc_s.so.4 (0x40015000)
        /lib/ld.so.1 (0x400e1000)

We end up with both libgcc_s.so.2 and libgcc_s.so.4 linked.  Is there
a solution other than making gcc-4.1/g++-4.1 the default and
rebuilding the libstdc++6 dependent packages with binary NMU's?


Steve M. Robbins writes:
> Package: g++-4.0
> Version: 4.0.3-1
> Severity: grave
> 
> Hi,
> 
> Ignore the architecture below -- this report is about HPPA.
> Here's a simple program that runs fine on my x86 box, but fails
> on Paer (2.6.16-1-parisc64-smp #2 SMP).
> 
> smr@paer:~/gmp-4.2.dfsg/tests/cxx$ cat test-throw.cc
> #include <iostream>
> #include <stdexcept>
> 
> 
> using namespace std;
> 
> 
> class A
> {
> public:
>   void throwMe()
>   {
>     if ( 1 )
>       throw std::invalid_argument( "booger" );
>   }
> };
> 
> 
> int main(int ac, char* av[])
> {
>   A a;
> 
>   {
>     try
>       {
>         a.throwMe();
>         cout << "Got here, but should not have\n";
>       }
>     catch (invalid_argument)
>       {
>         cout << "Caught the exception as expected\n";
>       }
>   }
> 
>   return 0;
> }
> 
> smr@paer:~/gmp-4.2.dfsg/tests/cxx$ g++ -Wall test-throw.cc && ./a.out
> /usr/bin/ld: warning: libgcc_s.so.4, needed by /usr/lib/gcc/hppa-linux-gnu/4.0.3/libstdc++.so, may conflict with libgcc_s.so.2
> /usr/bin/ld: warning: libgcc_s.so.4, needed by /usr/lib/gcc/hppa-linux-gnu/4.0.3/libstdc++.so, may conflict with libgcc_s.so.2
> terminate called after throwing an instance of 'std::invalid_argument'
> terminate called recursively
> Aborted
> 
> This breaks compilation of GMP, for example.
> 
> Cheers,
> -Steve
> 
> 
> 
> 
> -- System Information:
> Debian Release: testing/unstable
>   APT prefers unstable
>   APT policy: (990, 'unstable')
> Architecture: i386 (i686)
> Shell:  /bin/sh linked to /bin/bash
> Kernel: Linux 2.6.15-1-k7
> Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
> 
> Versions of packages g++-4.0 depends on:
> ii  gcc-4.0                       4.0.3-1    The GNU C compiler
> ii  gcc-4.0-base                  4.0.3-1    The GNU Compiler Collection (base 
> ii  libc6                         2.3.6-7    GNU C Library: Shared libraries
> ii  libstdc++6-4.0-dev            4.0.3-1    The GNU Standard C++ Library v3 (d
> 
> g++-4.0 recommends no packages.
> 
> -- no debconf information
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: