[ia64] libgcc1: undefined reference to `_Unwind_GetIPInfo'

Bug #64014 reported by Matthias Klose
2
Affects Status Importance Assigned to Milestone
gcc
Fix Released
Critical
gcc-4.1 (Ubuntu)
Fix Released
High
Matthias Klose

Bug Description

Binary package hint: libgcc1

glibc FTBFS; see http://gcc.gnu.org/PR27880

Revision history for this message
In , Andreas Schwab (schwab-linux-m68k) wrote :

Static linking is broken on ia64:

$ gcc -static -v hello.c
Using built-in specs.
Target: ia64-suse-linux
Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib --libexecdir=/usr/lib --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking --with-gxx-include-dir=/usr/include/c++/4.2.0 --enable-ssp --disable-libssp --enable-java-awt=gtk --enable-gtk-cairo --disable-libjava-multilib --disable-ltdl-install --with-slibdir=/lib --with-system-zlib --enable-shared --enable-__cxa_atexit --enable-libstdcxx-allocator=new --with-system-libunwind --host=ia64-suse-linux
Thread model: posix
gcc version 4.2.0 20060601 (experimental) (SUSE Linux)
 /usr/lib/gcc/ia64-suse-linux/4.2.0/cc1 -quiet -v hello.c -quiet -dumpbase hello.c -auxbase hello -version -o /tmp/ccAc4LPK.s
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/lib/gcc/ia64-suse-linux/4.2.0/include
 /usr/lib/gcc/ia64-suse-linux/4.2.0/../../../../ia64-suse-linux/include
 /usr/include
End of search list.
GNU C version 4.2.0 20060601 (experimental) (SUSE Linux) (ia64-suse-linux)
        compiled by GNU C version 4.2.0 20060601 (experimental) (SUSE Linux).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: a5d82c8d6aeb8d953dd6034fd4040dff
 /usr/lib/gcc/ia64-suse-linux/4.2.0/../../../../ia64-suse-linux/bin/as -x -o /tmp/cc8qYnOm.o /tmp/ccAc4LPK.s
 /usr/lib/gcc/ia64-suse-linux/4.2.0/collect2 -static /usr/lib/gcc/ia64-suse-linux/4.2.0/../../../crt1.o /usr/lib/gcc/ia64-suse-linux/4.2.0/../../../crti.o /usr/lib/gcc/ia64-suse-linux/4.2.0/crtbegin.o -L/usr/lib/gcc/ia64-suse-linux/4.2.0 -L/usr/lib/gcc/ia64-suse-linux/4.2.0 -L/usr/lib/gcc/ia64-suse-linux/4.2.0/../../../../ia64-suse-linux/lib -L/usr/lib/gcc/ia64-suse-linux/4.2.0/../../.. /tmp/cc8qYnOm.o --start-group -lgcc -lgcc_eh -lunwind -lc --end-group /usr/lib/gcc/ia64-suse-linux/4.2.0/crtend.o /usr/lib/gcc/ia64-suse-linux/4.2.0/../../../crtn.o
/usr/lib/gcc/ia64-suse-linux/4.2.0/libgcc_eh.a(unwind-c.o): In function `__gcc_personality_v0':
(.text+0x822): undefined reference to `_Unwind_GetIPInfo'
collect2: ld returned 1 exit status

Revision history for this message
In , Steve Ellcey (steve-ellcey) wrote :

I believe this is because you are configuring with --with-system-libunwind and
your system unwind does not have _Unwind_GetIPInfo. This routine was added to the GCC libunwind back in February by Jakub Jelinek to fix PR other/26208.

Revision history for this message
In , Pinskia (pinskia) wrote :

And I did mention this when that other PR's patch was posted.
--with-system-libunwind is the "issue".

Revision history for this message
In , Steve Ellcey (steve-ellcey) wrote :

I should have mentioned that for HP-UX, where the system unwind also does not have _Unwind_GetIPInfo, I added it to libgcc. See

http://gcc.gnu.org/ml/gcc-patches/2006-03/msg01285.html

Revision history for this message
In , Geoffk-n (geoffk-n) wrote :

In bug 26792, I suggest that libstdc++ should use autoconf to detect whether this function exists and not use it if it doesn't. That would also fix this bug.

Revision history for this message
In , Steve Ellcey (steve-ellcey) wrote :

I think using configure to detect whether or not _Unwind_GetIPInfo exists may be difficult. The libstdc++ configure script seems to go out of its way to not link programs or to use and/or look at libgcc in anyway.

Anyone have an idea on how to implement this? I am thinking the checking/flag setting on whether or not _Unwind_GetIPInfo exists might have to be done in the gcc directory.

Revision history for this message
In , Andreas Schwab (schwab-linux-m68k) wrote :
Revision history for this message
In , Patchapp (patchapp) wrote :

Subject: Bug number PR target/27880

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2006-06/msg01023.html

Revision history for this message
In , Echristo (echristo) wrote :

I believe a patch to libstdc++ to check for __Unwind_GetIPInfo was committed. Verify this still fails?

Revision history for this message
In , Andreas Schwab (schwab-linux-m68k) wrote :

Why do you think this bug has anything to do with libstdc++?

Revision history for this message
In , Pinskia (pinskia) wrote :

libstdc++ is only part of the problem, libjava still has the same issue.

Revision history for this message
In , Pinskia (pinskia) wrote :

*** Bug 29342 has been marked as a duplicate of this bug. ***

Matthias Klose (doko)
Changed in gcc-4.1:
assignee: nobody → doko
importance: Undecided → High
status: Unconfirmed → Confirmed
Revision history for this message
In , Steve Ellcey (steve-ellcey) wrote :

The uses of __Unwind_GetIPInfo in libstdc++ and libjava have been fixed. It looks like the report in PR 29342 is due to the use of __Unwind_GetIPInfo in gcc/unwind-c.c. I will create a patch for this use.

Changed in gcc:
status: Unknown → In Progress
Revision history for this message
In , 3-sje (3-sje) wrote :

Subject: Bug 27880

Author: sje
Date: Mon Oct 9 15:55:38 2006
New Revision: 117576

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117576
Log:
 PR target/27880
 * unwind-c.c (PERSONALITY_FUNCTION): Ifdef use of _Unwind_GetIPInfo.
 * configure.ac (HAVE_GETIPINFO): Check for _Unwind_GetIPInfo.
 * configure: Regenerate.
 * config.in: Regenerate.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config.in
    trunk/gcc/configure
    trunk/gcc/configure.ac
    trunk/gcc/unwind-c.c

Revision history for this message
In , Steve Ellcey (steve-ellcey) wrote :

With the patch I just checked in, I believe that this defect is now fixed.
The uses of GetIPInfo in libstdc++ and libjava were fixed earlier, this latest patch fixes the use in unwind-c.c and that should be it.

Changed in gcc:
status: In Progress → Fix Released
Revision history for this message
Matthias Klose (doko) wrote :

fixed in 4.1.1-13ubuntu5

Changed in gcc-4.1:
status: Confirmed → Fix Released
Revision history for this message
In , Andreas Schwab (schwab-linux-m68k) wrote :

This still does not work. When configuring the stage2 compiler the symbol will be found in libgcc_s (from unwind-compat.o).

Revision history for this message
In , Andreas Schwab (schwab-linux-m68k) wrote :

Also why does configure set HAVE_GETIPINFO unconditionally when the system libunwind is used?

Changed in gcc:
status: Fix Released → Confirmed
Revision history for this message
In , Mmitchel-gcc (mmitchel-gcc) wrote :

Will not be fixed in 4.2.0; retargeting at 4.2.1.

Revision history for this message
In , Mmitchel-gcc (mmitchel-gcc) wrote :

Change target milestone to 4.2.3, as 4.2.2 has been released.

Revision history for this message
In , Patchapp (patchapp) wrote :

Subject: Bug number PR target/27880

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2006-06/msg01023.html

Revision history for this message
In , Bkoz (bkoz) wrote :

This patch seems good to me. What's the delay here?

Revision history for this message
In , Jsm28 (jsm28) wrote :

4.2.3 is being released now, changing milestones of open bugs to 4.2.4.

Revision history for this message
In , Ubizjak (ubizjak) wrote :

Critical P2 bug and the patch gets unreviewed for so long?!

Is this bug still relevant for ia64-*-linux?

Revision history for this message
In , Wilson-q (wilson-q) wrote :

Subject: Re: [4.2/4.3/4.4 regression] undefined reference
 to `_Unwind_GetIPInfo'

ubizjak at gmail dot com wrote:
> ------- Comment #22 from ubizjak at gmail dot com 2008-02-20 18:39 -------
> Critical P2 bug and the patch gets unreviewed for so long?!
> Is this bug still relevant for ia64-*-linux?

I didn't realize this PR was still open. I perhaps lost track of it
because some misleading info added to it implied that it was already
fixed. I'll take a look now.

Jim

Revision history for this message
In , Mike Frysinger (vapier) wrote :

the proposed patch in question seems to break the opposite scenario on ia64: --without-system-libunwind

Revision history for this message
In , Jsm28 (jsm28) wrote :

4.2.4 is being released, changing milestones to 4.2.5.

Revision history for this message
In , RussianE39 (russiane39) wrote :

This bug also affects OpenSolaris.
# gcc -v
Using built-in specs.
Target: i386-pc-solaris2.11
Configured with: ../gcc-4.2.4/configure --prefix=/usr/gnu --libdir=/usr/gnu/lib --libexecdir=/usr/gnu/lib --mandir=/usr/gnu/share/man --infodir=/usr/share/info --with-as=/usr/gnu/bin/as --with-gnu-as --with-ld=/usr/gnu/bin/ld --with-gnu-ld --enable-languages=c,c++,fortran,objc --enable-shared --disable-static --enable-decimal-float -disable-nls
Thread model: posix
gcc version 4.2.4
---------

g++ -I/usr/include -I/usr/local/include -Wall -D_REENTRANT -pthreads -I/usr/local/include/openssl -DHAVE_SSL -I/opt/mysql/mysql/include -m64 -mtune=k8 -DMY_ATOMIC_MODE_RWLOCKS -m64 -O2 -mtune=k8 -static-libgcc -o ascent-logonserver AccountCache.o AuthSocket.o LogonCommServer.o LogonConsole.o LogonOpcodes.o LogonStdAfx.o AutoPatcher.o Main.o -L/export/home/burlex/summit/src/ascent-shared -L/export/home/burlex/summit/dep/src/zlib -L/usr/lib/amd64 -L/usr/local/lib/amd64 -L/usr/gnu/lib/amd64 -L/usr/sfw/lib/amd64 -L/usr/gnu/lib -L/opt/mysql/mysql/lib -lmysqlclient -lposix4 -lresolv -lgen -lsocket -lnsl -lm -lshared -lzlib -lz -lssl -lcrypto
/usr/gnu/lib/amd64/libstdc++.so: undefined reference to `_Unwind_GetIPInfo@GCC_4.2.0'
collect2: ld returned 1 exit status

Revision history for this message
In , Pinskia (pinskia) wrote :

*** Bug 37403 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Matthias Klose (doko) wrote :

so this bites again with trunk and ada. Jim, Steve, any news on this?

Revision history for this message
In , Steve Ellcey (steve-ellcey) wrote :

See http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00647.html for a discussion and proposed patch.

Revision history for this message
In , 3-sje (3-sje) wrote :

Subject: Bug 27880

Author: sje
Date: Wed Nov 12 21:35:46 2008
New Revision: 141804

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141804
Log:
 PR target/27880
 * config/unwind_ipinfo.m4 (GCC_CHECK_UNWIND_GETIPINFO): Change from
 link test to target based test.
 * libstdc++/v3/configure.ac: Move call to GCC_CHECK_UNWIND_GETIPINFO.
 * libstdc++/v3/configure: Regenerate.
 * libjava/configure: Regenerate.

Modified:
    trunk/config/ChangeLog
    trunk/config/unwind_ipinfo.m4
    trunk/libjava/ChangeLog
    trunk/libjava/configure
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/configure
    trunk/libstdc++-v3/configure.ac

Revision history for this message
In , 3-sje (3-sje) wrote :

Subject: Bug 27880

Author: sje
Date: Wed Nov 12 21:37:34 2008
New Revision: 141805

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141805
Log:
        PR target/27880
        * configure.ac (GCC_CHECK_UNWIND_GETIPINFO): Use this macro
        to set HAVE_GETIPINFO.
        * aclocal.m4: Include ../config/unwind_ipinfo.m4.
        * configure: Regenerate.
        * config.in: Regenerate.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/aclocal.m4
    trunk/gcc/config.in
    trunk/gcc/configure
    trunk/gcc/configure.ac

Revision history for this message
In , littlestar (cnstar9988) wrote :

ping 4.3.3?

Revision history for this message
In , Rob (rob1weld) wrote :

With "gcc version 4.4.0 20090102" on i386-pc-solaris2.11 I'm getting:

# gcc -v -o test_gmp_1 test_gmp_1.cc -lgmp -lstdc++
/usr/local/lib/gcc/i386-pc-solaris2.11/4.4.0/../../../libstdc++.so: undefined reference to `_Unwind_GetIPInfo@GCC_4.2.0'
collect2: ld returned 1 exit status

Revision history for this message
In , Pinskia (pinskia) wrote :

(In reply to comment #33)
> With "gcc version 4.4.0 20090102" on i386-pc-solaris2.11 I'm getting:
>
> # gcc -v -o test_gmp_1 test_gmp_1.cc -lgmp -lstdc++
> /usr/local/lib/gcc/i386-pc-solaris2.11/4.4.0/../../../libstdc++.so: undefined
> reference to `_Unwind_GetIPInfo@GCC_4.2.0'
> collect2: ld returned 1 exit status

sounds like correct version of libgcc is not being so that is not a bug with GCC but with your installation of GCC.

Revision history for this message
In , Rob (rob1weld) wrote :

(In reply to comment #33)
> With "gcc version 4.4.0 20090102" on i386-pc-solaris2.11 I'm getting:
>
> # gcc -v -o test_gmp_1 test_gmp_1.cc -lgmp -lstdc++
> /usr/local/lib/gcc/i386-pc-solaris2.11/4.4.0/../../../libstdc++.so: undefined
> reference to `_Unwind_GetIPInfo@GCC_4.2.0'
> collect2: ld returned 1 exit status

Another thread suggested that "gcc" should not be used for ".cc" files as
gcc did not invoke the same mechanisms as g++ does. I tried g++ (instead
of gcc) and it worked correctly on my ".cc" file.

Rob

Revision history for this message
In , Jsm28 (jsm28) wrote :

Closing 4.2 branch.

Revision history for this message
In , Rguenth (rguenth) wrote :

GCC 4.3.4 is being released, adjusting target milestone.

Revision history for this message
In , Rguenth (rguenth) wrote :

GCC 4.3.5 is being released, adjusting target milestone.

Revision history for this message
In , Rguenth (rguenth) wrote :

Fixed in GCC 4.4.0.

Changed in gcc:
importance: Unknown → Critical
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.