🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #51092

gcc-2.4.5: undefined symbol: __lib_version on SunOS

#51092
From: Roger West
Date: Wed, 30 Jun 1993 18:35
40 lines
2631 bytes
I'm baffled.  

After building gcc-2.4.5 and libg++2.3.1 on a Sun (both configured using
the canonical name "sparc-sun-sunos4.1"), I encountered the following link
error during "make check" in libg++-2.3.1/libg++/tests...

    gcc tRational.o -o tRational ../libg++.a -lm
    ld: Undefined symbol 
       __lib_version 
    collect: ld returned 2 exit status

After grepping and nm-ing everything in sight, I couldn't find any references
to this symbol in any source or object code.  The only thing I did find was the
following comment in the file gcc-2.4.5/config/svr4.h...

    /* Gcc automatically adds in one of the files /usr/ccs/lib/values-Xc.o,
       /usr/ccs/lib/values-Xa.o, or /usr/ccs/lib/values-Xt.o for each final
       link step (depending upon the other gcc options selected, such as
       -traditional and -ansi).  These files each contain one (initialized)
       copy of a special variable called `_lib_version'.  Each one of these
       files has `_lib_version' initialized to a different (enum) value.
       The SVR4 library routines query the value of `_lib_version' at run
       to decide how they should behave.  Specifically, they decide (based
       upon the value of `_lib_version') if they will act in a strictly ANSI
       conforming manner or not.
    */

Since I'm not even on an SVR4 system, I have absolutely no idea why gcc even
cares about this symbol.  One thing I did notice is that this error seemed to
occur only when -lm was being linked to.

Any insight to this predicament would be extremely welcome.

--
   _____________________________________________________________
   |   Roger West              Internet: west@tsd.itg.ti.com   |
   |   Texas Instruments Inc.    TI MSG: RWES                  |
   |   PO Box 149149, MS 2201     Voice: (512) 250-7372        |
   |___Austin, TX 78714-9149________Fax: (512) 250-7104________|
Technical Details
Message-ID: <WEST.93Jun30123532@lux.tsd.itg.ti.com>
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!darwin.sura.net!math.ohio-state.edu!cs.utexas.edu!csc.ti.com!tilde.csc.ti.com!fstop.csc.ti.com!fstop!west

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,e37eef784c9bc381,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-06-30 10:58:11 PST
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!darwin.sura.net!math.ohio-state.edu!cs.utexas.edu!csc.ti.com!tilde.csc.ti.com!fstop.csc.ti.com!fstop!west
From: west@lux.tsd.itg.ti.com (Roger West)
Subject: gcc-2.4.5: undefined symbol: __lib_version on SunOS
Message-ID: <WEST.93Jun30123532@lux.tsd.itg.ti.com>
Sender: usenet@csc.ti.com
Nntp-Posting-Host: lux.tsd.itg.ti.com
Reply-To: west@tsd.itg.ti.com
Organization: Texas Instruments, Speech Mushrooms.
Date: Wed, 30 Jun 1993 18:35:32 GMT
Lines: 40