Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion Linker error: std::time_put_w@@GLIBCPP_3.2
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Paul Pluzhnikov  
View profile  
 More options Mar 14 2005, 11:07 pm
Newsgroups: gnu.gcc.help
From: Paul Pluzhnikov <ppluzhnikov-...@charter.net>
Date: 14 Mar 2005 20:07:22 -0800
Local: Mon, Mar 14 2005 11:07 pm
Subject: Re: Linker error: std::time_put_w@@GLIBCPP_3.2

Laurent Birtz <laurent.bi...@usherbrooke.ca> writes:
> I did a minimal program that triggers the problem (file name is test.cc):

Great. I've reproduced the problem (although I get a different symbol):

/usr/local/gcc-3.3.2/bin/g++ -fPIC -shared -o junk.so junk.cc -L.                                      
/usr/bin/ld: junk.so: undefined versioned symbol name std::time_get_c@@GLIBCPP_3.2

> I'm not sure what to try next.

The bad news is that this is a bug in the way gcc-3.3.x libstdc++.a
is built. The bug does not show up in gcc-3.2.x, nor in gcc-3.4.x.

> What I can't find is the place where the symbol is used.

It's not being used. It is mistakenly defined in an archive library,
which the linker is not expecting.

So, if you can build with gcc-3.4.x (which I am guessing you could,
as you are trying to eliminate C++ dependencies to begin with,
and your users (in theory) should not care which version you used),
then that's the cleanest solution.

If for whatever reason you have to build with gcc-3.3.5, then you
need to figure out how versioned symbols get into the
libstdc++.a(globals.o), and fix the build so they don't.

Here is what the picture of "versioned symbols in libstdc++.a" looks like:

$ for i in gcc*; do
  echo $i:
  nm -A $($i/bin/g++ -print-file-name=libstdc++.a) | grep @ | head -1
 done

gcc-2.95.3:
gcc-3.1:
gcc-3.2:
gcc-3.3:
gcc-3.3/bin/../lib/gcc-lib/i686-pc-linux-gnu/3.3/../../../libstdc++.a:globa ls.o:00000000 R _ZNSt10__num_base8_S_atomsE@@GLIBCPP_3.2
gcc-3.3.2:
gcc-3.3.2/bin/../lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../libstdc++.a:g lobals.o:00000000 R _ZNSt10__num_base8_S_atomsE@@GLIBCPP_3.2
gcc-3.4.0:
gcc-3.4.3:
gcc-4.0:

Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google