Bug 53680 - Versioned symbols in static libstdc++
Summary: Versioned symbols in static libstdc++
Status: RESOLVED DUPLICATE of bug 52689
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 4.7.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-15 08:21 UTC by __vic
Modified: 2012-06-15 10:37 UTC (History)
0 users

See Also:
Host:
Target: i686-pc-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed: 2012-06-15 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description __vic 2012-06-15 08:21:16 UTC
The same problem as fixed in Bug 12595 but in Release 4.7: versioned symbols in the static libstdc++.a
Comment 1 Richard Biener 2012-06-15 08:27:53 UTC
Please provide more information, your assessment it's the "same" bug might not
be true.
Comment 2 __vic 2012-06-15 08:30:06 UTC
$ uname -a
Linux m246 2.6.18-194.26.1.el5 #1 SMP Tue Nov 9 12:54:40 EST 2010 i686 i686 i386 GNU/Linux
$ cat /etc/*-release
CentOS release 5.4 (Final)

When building on

$ uname -a
Linux jansmb 2.6.9-103.ELsmp #1 SMP Fri Dec 9 04:31:51 EST 2011 i686 i686 i386 GNU/Linux
$ cat /etc/*-release
CentOS release 4.9 (Final)

it's all right
Comment 3 __vic 2012-06-15 08:34:13 UTC
When I'm trying link libstdc++.a statically to my .so I see messages like:
"undefined versioned symbol name std::defer_lock@@GLIBCPP_3...."

$ nm libstdc++.a | grep @

shows me that archive contains versioned symbols. Do you need the entire list?
Comment 4 __vic 2012-06-15 08:57:21 UTC
Note: undocumented configure option --disable-symvers helps but I think building with default parameters must work properly
Comment 5 __vic 2012-06-15 10:22:36 UTC
The exact description:

$ g++ -o formats/alcatel_alm9_decoder.fmt -shared -Llib -static-libgcc  -O3 -Wl,-s -Wl,--no-undefined src/alcatel_alm9_decoder.o formats.a decoder.a -ljanuary_tools -ljanuary
/usr/bin/ld: formats/alcatel_alm9_decoder.fmt: undefined versioned symbol name _ZSt10adopt_lock@@GLIBCXX_3.4.11
/usr/bin/ld: failed to set dynamic section sizes: Bad value
collect2: error: ld returned 1 exit status


$ nm lib/libstdc++.a | grep adopt
00000000 B _ZN9__gnu_cxx10adopt_lockE
00000000 B _ZSt10adopt_lock@@GLIBCXX_3.4.11
Comment 6 Jonathan Wakely 2012-06-15 10:25:32 UTC
(In reply to comment #4)
> Note: undocumented configure option --disable-symvers helps but I think
> building with default parameters must work properly

It's not undocumented
http://gcc.gnu.org/onlinedocs/libstdc++/manual/configure.html
Comment 7 Jonathan Wakely 2012-06-15 10:29:36 UTC
isn't this PR 52689 ?
Comment 8 __vic 2012-06-15 10:30:30 UTC
(In reply to comment #6)
> (In reply to comment #4)
> > Note: undocumented configure option --disable-symvers helps but I think
> > building with default parameters must work properly
> 
> It's not undocumented
> http://gcc.gnu.org/onlinedocs/libstdc++/manual/configure.html

Ok. But still. It must not be a mandatory option to build correct static lib
Comment 9 __vic 2012-06-15 10:33:13 UTC
(In reply to comment #7)
> isn't this PR 52689 ?

Probably it is.
Comment 10 __vic 2012-06-15 10:36:24 UTC
When 4.7.1 will be released?
Comment 11 Jonathan Wakely 2012-06-15 10:37:41 UTC
yesterday

http://gcc.gnu.org/gcc-4.7/

marking as dup, please reopen if 4.7.1 doesn't fix it

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