Undefined Symbol _mcounts

Undefined Symbol _mcounts

Post by Stuart Smi » Wed, 16 Nov 1994 12:13:00

I have had the above error occur in two situations recently.  First, trying to
compile a program I wrote to produce profiling information ( -pg ) produced
several of them.  Then compiling Lynx v2.3 produced the same series during the
link phase.  Does anyone have any ideas what could be the problem?

I am using gcc v2.5.8, and linux v1.1.59.  The libraries are 4.5.26 and I
haven't had any other problems with them..  any help is appreciated - thanks.


*    Cow's milk is for baby cows.    | Human babies need human milk.  *
*  Just say "NO!" to dairy products. |    *feed your babies.     *


1. libc.sa, libg.a - undefined symbol _mcount. Help!

Date: 27 Mar 94 19:13:47 GMT

This may be a post for comp.lang.c, but I believe this is specific to
the Linux libc and libg.

I have tried compiling a couple of programs, one of them my own, another
the SWI-Prolog package.  In both I have gotten similar results.  Here is a
sample of a compilation of my own program:
        /usr/lib/libg.a(atexit.o): Undefined symbol _mcount referenced from
                text segment.
        /usr/lib/libg.a(atexit.o): Undefined symbol _mcount referenced from
                text segment.
        /usr/lib/libg.a(memcpy.o): Undefined symbol _mcount referenced from
                text segment.

        This continues on for a while.  All the errors are the same -
                Undefined symbol _mcount referenced from text segment.
        Very similar messages are obtained when compiling the SWI-Prolog
        package, except all the errors are with libc.a.

I'm no C guru, so it's possible I'm missing something obvious.  I'm
using version 4.5.21 of the C library, and version 2.5.8 of gcc.  Let me know
if additional info is needed.

John Miller

2. build error

3. XFree Problems - Please Help

4. Problem using prof/gprof - _mcount undefined.

5. Can't compile kernels w/Vox3.x drivers and PAS16

6. undefined symbol: gdk_imlib_get_cache_info

7. Swappable drive bay

8. ioconf.o Undefined symbol in '_btintr' ????

9. Unable to load shared library due to undefined symbol cerr

10. Linker problems:spurious undefined symbols error

11. g++ returns Undefined symbol error

12. Mandrake: undefined symbol _t24__default_alloc_template2b1i0.free_list