Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 28802 - undefined reference to `_Unwind_Resume_or_Rethrow@GCC_3.3
Summary: undefined reference to `_Unwind_Resume_or_Rethrow@GCC_3.3
Status: RESOLVED DUPLICATE of bug 40694
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Please assign to toolchain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 29750 30136
  Show dependency tree
 
Reported: 2003-09-15 09:48 UTC by Stephane Chomat
Modified: 2005-07-17 13:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephane Chomat 2003-09-15 09:48:14 UTC
A link error with gcc 3.3.1 is :
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/libstdc++.so.5: undefined reference to
`_Unwind_Resume_or_Rethrow@GCC_3.3
The solution is to use g++ to link instead of gcc.
Comment 1 SpanKY gentoo-dev 2003-09-15 09:51:31 UTC
when are you getting this error ?  what pkg are you emerging ?
Comment 2 Stephane Chomat 2003-09-17 11:19:55 UTC
with a ebuild that use libstdc++, for exemple xfree, tvtime, gnucash.
Comment 3 Nick Burtner 2003-09-17 22:29:22 UTC
I've seen this bug as well, namely in MySQL 4.0.15.
Comment 4 Joshua Kinard gentoo-dev 2003-10-04 16:38:18 UTC
Everyone esperiencing this error, please have a look at this link:

http://gcc.gnu.org/ml/gcc-help/2003-07/msg00191.html

Check your systems to see if this is the case and report back.
Comment 5 Stephane Chomat 2003-10-05 02:53:23 UTC
I can test this error with this file (extract from configure shell of gnucash)
conftest.c :
#include <libofx/libofx.h>
int ofx_proc_status_cb(const struct OfxStatusData data) { return 0; }
int ofx_proc_account_cb(const struct OfxAccountData data) { return 0; }
int ofx_proc_security_cb(const struct OfxSecurityData data) { return 0; }
int ofx_proc_transaction_cb(const struct OfxTransactionData data) { return
0; }
int ofx_proc_statement_cb(const struct OfxStatementData data) { return 0;
}

int main() {

   ofx_proc_file(0, NULL);

   return 0; }

doesn't work with :
gcc -o conftest -mcpu=athlon-xp -O3 -pipe    conftest.c -lm   -lofx -lstdc++
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/libstdc++.so: undefined reference
to `_Unwind_Resume_or_Rethrow@GCC_3.3'
collect2: ld a retourn
Comment 6 Stephane Chomat 2003-10-05 02:53:23 UTC
I can test this error with this file (extract from configure shell of gnucash)
conftest.c :
#include <libofx/libofx.h>
int ofx_proc_status_cb(const struct OfxStatusData data) { return 0; }
int ofx_proc_account_cb(const struct OfxAccountData data) { return 0; }
int ofx_proc_security_cb(const struct OfxSecurityData data) { return 0; }
int ofx_proc_transaction_cb(const struct OfxTransactionData data) { return
0; }
int ofx_proc_statement_cb(const struct OfxStatementData data) { return 0;
}

int main() {

   ofx_proc_file(0, NULL);

   return 0; }

doesn't work with :
gcc -o conftest -mcpu=athlon-xp -O3 -pipe    conftest.c -lm   -lofx -lstdc++
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/libstdc++.so: undefined reference
to `_Unwind_Resume_or_Rethrow@GCC_3.3'
collect2: ld a retourné 1 code d'état d'exécution


work with :
gcc -o conftest -mcpu=athlon-xp -O3 -pipe    conftest.c -lm   -lofx -lstdc++
-lgcc_s
or
g++ -o conftest -mcpu=athlon-xp -O3 -pipe    conftest.c -lm   -lofx -lstdc++
Comment 7 Nick Burtner 2003-10-06 06:07:30 UTC
MySQL builds perfectly after fixing the libraries.
Comment 8 Joshua Kinard gentoo-dev 2003-10-06 11:09:19 UTC
Nick: Good to hear that it works.  Could you post the commands you used to
resolve this as well as the affected symlink?
Comment 9 Stephane Chomat 2003-10-06 12:04:20 UTC
It's work for me. 
I have installed gcc form gnu web-site at /opt/gcc-3.1.0/ and I switch to
this with gcc-config. the test work.
I switch to ebuilded gcc and the the test work.

call gcc-config '[1]'
Comment 10 Stefan 2003-11-27 12:08:12 UTC
I am recieving this bug too, when trying to emerge app-text/ghostscript-7.07.1. I have tried to use g++ although it doesnt compile. I have gcc 3.3.2-r2. gcc-config -l shows no other versions of gcc. /usr/lib/gcc-lib/i686-pc-linux-gnu/ had a directory 3.3.2 and 3.2.1. I moved the 3.2.1 directory away, which didnt help. ld.so.conf point to the correct lib. Im not sure what else to try. Can i give any more information or try anything else?
Comment 11 Target 2004-02-08 19:38:38 UTC
I get this error on sablotron with GCC 3.3.2.

I also noticed that emerging GCC 3.3.2 left 3.2.3 libs all over /lib (namely libgcc_s-3.2.3.so) and no 3.3.2 libs to replace them or even stand alongside them.

libgcc_s is where this reference is defined, so I'm thinking this is the problem. The gcc 3.3.2 ebuild is creating a build environment that isn't sane, and libstdc++ builds are going for the incorrect (old) libs in /lib.

The fix:
ln -sf /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/libgcc_s.so.1 /lib/libgcc_s.so.1

You may also want to delete the libgcc_s-2.3.2 files in /lib if nothing is using them.
Comment 12 Martin Schlemmer (RETIRED) gentoo-dev 2004-02-11 13:23:22 UTC
> The fix:
> ln -sf /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/libgcc_s.so.1 /lib/libgcc_s.so.1
>
> You may also want to delete the libgcc_s-2.3.2 files in /lib if nothing is
> using them.

1) Please do not do this.
2) There are no libgcc_s* files in /lib (or should be)  If there are, then
it was not put there by an ebuild (or unmodified one).

Please remove all those symlinks, and run:

  # ldconfig


*** This bug has been marked as a duplicate of 40694 ***