* [Bug c++/42033] libstdc++ seems to miss std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char> const&)
2009-11-13 19:25 [Bug c++/42033] New: libstdc++ seems to miss std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char> const&) hubicka at gcc dot gnu dot org
@ 2009-11-13 20:09 ` jason at gcc dot gnu dot org
2009-11-13 20:37 ` paolo dot carlini at oracle dot com
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-13 20:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jason at gcc dot gnu dot org 2009-11-13 20:08 -------
libstdc++ does define that function, in string-inst.cc. And it shouldn't be
defined anywhere else. I don't know what would be causing that error.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42033
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/42033] libstdc++ seems to miss std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char> const&)
2009-11-13 19:25 [Bug c++/42033] New: libstdc++ seems to miss std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char> const&) hubicka at gcc dot gnu dot org
2009-11-13 20:09 ` [Bug c++/42033] " jason at gcc dot gnu dot org
@ 2009-11-13 20:37 ` paolo dot carlini at oracle dot com
2009-11-13 21:02 ` hubicka at ucw dot cz
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-11-13 20:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from paolo dot carlini at oracle dot com 2009-11-13 20:37 -------
It's normally exported from the *.so, just grep it:
00000000000a90d0 W std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char>
const&)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42033
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/42033] libstdc++ seems to miss std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char> const&)
2009-11-13 19:25 [Bug c++/42033] New: libstdc++ seems to miss std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char> const&) hubicka at gcc dot gnu dot org
2009-11-13 20:09 ` [Bug c++/42033] " jason at gcc dot gnu dot org
2009-11-13 20:37 ` paolo dot carlini at oracle dot com
@ 2009-11-13 21:02 ` hubicka at ucw dot cz
2009-11-13 21:11 ` paolo dot carlini at oracle dot com
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: hubicka at ucw dot cz @ 2009-11-13 21:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from hubicka at ucw dot cz 2009-11-13 21:01 -------
Subject: Re: libstdc++ seems to miss std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*,
char*, std::allocator<char> const&)
This fails with --static only:
jh@gcc17:~/gcc-install/lib64$ nm -C libstdc++.so | less
jh@gcc17:~/gcc-install/lib64$ fgrep 'std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*,
char*, std::allocator<char> const&)'
jh@gcc17:~/gcc-install/lib64$ nm -C libstdc++.so | fgrep
'std::basic_string<char, std::char_traits<char>, std::allocator<char>
>::basic_string<char*>(char*, char*, std::allocator<char> const&)'
00000000000a3bf0 W std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char>
const&)
00000000000a3a50 W std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char>
const&)
jh@gcc17:~/gcc-install/lib64$ nm -C libstdc++.a | fgrep
'std::basic_string<char, std::char_traits<char>, std::allocator<char>
>::basic_string<char*>(char*, char*, std::allocator<char> const&)'
U std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char>
const&)
U std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char>
const&)
0000000000000000 W std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char>
const&)
0000000000000000 W std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char>
const&)
jh@gcc17:~/trunk/build5$ ~/gcc-install/bin/g++ a.o --static
/home/jh/gcc-install/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../lib64/libstdc++.a(sstream-inst.o):
In function `std::basic_stringbuf<char, std::char_traits<char>,
std::allocator<char> >::str() const':
/home/jh/trunk/build5/x86_64-unknown-linux-gnu/libstdc++-v3/include/sstream:129:
undefined reference to `std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char>
const&)'
/home/jh/trunk/build5/x86_64-unknown-linux-gnu/libstdc++-v3/include/sstream:127:
undefined reference to `std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char>
const&)'
/home/jh/trunk/build5/x86_64-unknown-linux-gnu/libstdc++-v3/include/sstream:129:
undefined reference to `std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char>
const&)'
/home/jh/trunk/build5/x86_64-unknown-linux-gnu/libstdc++-v3/include/sstream:127:
undefined reference to `std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char>
const&)'
/home/jh/trunk/build5/x86_64-unknown-linux-gnu/libstdc++-v3/include/sstream:129:
undefined reference to `std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char>
const&)'
/home/jh/gcc-install/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../lib64/libstdc++.a(sstream-inst.o):/home/jh/trunk/build5/x86_64-unknown-linux-gnu/libstdc++-v3/include/sstream:127:
more undefined references to `std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char>
const&)' follow
collect2: ld returned 1 exit status
jh@gcc17:~/trunk/build5$ ~/gcc-install/bin/g++ a.o
jh@gcc17:~/trunk/build5$
LD_LIBRARY_PATH=/home//jh/gcc-install/lib64/:$LD_LIBRARY_PATH ./a.out
Usage: tramp3d-v4
--help|-h|-? show this command line help
--num-iter|-n number of iterations to perform [Inf]
--end-t|-t time to stop simulation [Inf]
--cfl cfl number [0.6]
--dt constant timestep, used with cfl number [off]
--min-dt minimum timestep allowed
--max-dt maximum timestep allowed
--blocks nx ny nz processor setup [automatic]
--cartvis nr av artificial viscosity NR AV [off]
--eos n choose eos
--rhomin rho density floor [off]
--blocking-expressions set blocking expressions [off]
--domain x y z computational vertex domain [64x64x64]
A particularly benchmarky and checky command-line includes
both artificial viscosity and density minimum via f.i.
./tramp3d-v4 --cartvis 1.0 0.0 --rhomin 1e-8
(reverse-i-search)`fg': fg
jh@gcc17:~/trunk/build5$ nm -C a.o | fgrep 'std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*,
char*, std::allocator<char> const&)'
0000000000000000 t std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char>
const&)
jh@gcc17:~/trunk/build5$
Honza
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42033
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/42033] libstdc++ seems to miss std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char> const&)
2009-11-13 19:25 [Bug c++/42033] New: libstdc++ seems to miss std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char> const&) hubicka at gcc dot gnu dot org
` (2 preceding siblings ...)
2009-11-13 21:02 ` hubicka at ucw dot cz
@ 2009-11-13 21:11 ` paolo dot carlini at oracle dot com
2009-11-13 21:16 ` hubicka at ucw dot cz
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-11-13 21:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from paolo dot carlini at oracle dot com 2009-11-13 21:10 -------
I see. Seems a compiler problem indeed, because, as Jason mentioned, the
template is explicitly instantiated in string-inst.cc and marked to be exported
in the linker script for the *.so. I have no idea what libstdc++ could do to
fix this...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42033
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/42033] libstdc++ seems to miss std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char> const&)
2009-11-13 19:25 [Bug c++/42033] New: libstdc++ seems to miss std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char> const&) hubicka at gcc dot gnu dot org
` (3 preceding siblings ...)
2009-11-13 21:11 ` paolo dot carlini at oracle dot com
@ 2009-11-13 21:16 ` hubicka at ucw dot cz
2009-11-13 21:59 ` rguenth at gcc dot gnu dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: hubicka at ucw dot cz @ 2009-11-13 21:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from hubicka at ucw dot cz 2009-11-13 21:16 -------
Subject: Re: libstdc++ seems to miss std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*,
char*, std::allocator<char> const&)
> I see. Seems a compiler problem indeed, because, as Jason mentioned, the
> template is explicitly instantiated in string-inst.cc and marked to be exported
> in the linker script for the *.so. I have no idea what libstdc++ could do to
> fix this...
I am confused why I get link error given that even my *.a exports the
symbol...
Honza
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42033
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/42033] libstdc++ seems to miss std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char> const&)
2009-11-13 19:25 [Bug c++/42033] New: libstdc++ seems to miss std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char> const&) hubicka at gcc dot gnu dot org
` (4 preceding siblings ...)
2009-11-13 21:16 ` hubicka at ucw dot cz
@ 2009-11-13 21:59 ` rguenth at gcc dot gnu dot org
2009-11-13 21:59 ` rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-11-13 21:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from rguenth at gcc dot gnu dot org 2009-11-13 21:59 -------
*** Bug 42036 has been marked as a duplicate of this bug. ***
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42033
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/42033] libstdc++ seems to miss std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char> const&)
2009-11-13 19:25 [Bug c++/42033] New: libstdc++ seems to miss std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char> const&) hubicka at gcc dot gnu dot org
` (5 preceding siblings ...)
2009-11-13 21:59 ` rguenth at gcc dot gnu dot org
@ 2009-11-13 21:59 ` rguenth at gcc dot gnu dot org
2009-11-13 23:18 ` jason at redhat dot com
2010-09-13 15:23 ` paolo dot carlini at oracle dot com
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-11-13 21:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from rguenth at gcc dot gnu dot org 2009-11-13 21:58 -------
*** Bug 42035 has been marked as a duplicate of this bug. ***
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42033
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/42033] libstdc++ seems to miss std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char> const&)
2009-11-13 19:25 [Bug c++/42033] New: libstdc++ seems to miss std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char> const&) hubicka at gcc dot gnu dot org
` (6 preceding siblings ...)
2009-11-13 21:59 ` rguenth at gcc dot gnu dot org
@ 2009-11-13 23:18 ` jason at redhat dot com
2010-09-13 15:23 ` paolo dot carlini at oracle dot com
8 siblings, 0 replies; 10+ messages in thread
From: jason at redhat dot com @ 2009-11-13 23:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jason at redhat dot com 2009-11-13 23:18 -------
Subject: Re: libstdc++ seems to miss std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*,
char*, std::allocator<char> const&)
On 11/13/2009 04:16 PM, hubicka at ucw dot cz wrote:
> I am confused why I get link error given that even my *.a exports the
> symbol...
Yeah, sounds more like a linker issue.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42033
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/42033] libstdc++ seems to miss std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char> const&)
2009-11-13 19:25 [Bug c++/42033] New: libstdc++ seems to miss std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char> const&) hubicka at gcc dot gnu dot org
` (7 preceding siblings ...)
2009-11-13 23:18 ` jason at redhat dot com
@ 2010-09-13 15:23 ` paolo dot carlini at oracle dot com
8 siblings, 0 replies; 10+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-09-13 15:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from paolo dot carlini at oracle dot com 2010-09-13 15:22 -------
What's going on with this? Is there something I can do to help resolving it for
good?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42033
^ permalink raw reply [flat|nested] 10+ messages in thread