[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

79.0. "Problem linking with X11 lib on Ultrix 3.0" by DECWET::WICKHAM (Charlie, DECWest Engr.) Tue Jan 31 1989 11:27

    This is cross-posted in the Ultrix conference.
        
    I tried to link GNU Emacs under Ultrix 3.0 with the X11 library
    and it complained as follows:
        
    _malloc: ld:/lib/libX11.a(XvmsAlloc.o): multiply defined
    _free: /lib/libX11.a(XvmsAlloc.o): multiply defined
    _realloc: /lib/libX11.a(XvmsAlloc.o): multiply defined
    *** Error code 2
        
    Emacs defines its own storage allocators. If the above routines
    are necessary for the code in XvmsAlloc.o, shouldn't be defined
    as static so their names aren't available at link time? thanx for
    any explanation/corrections...
        
    charlie

T.RTitleUserPersonal
Name
DateLines
79.1library orderDECWET::WICKHAMCharlie, DECWest Engr.Tue Jan 31 1989 11:378
    Forgot to mention that the order of libraries on the link line is:
    
    -lX11 -lg -lc
    
    The problem can be solved by specifying the order as:
    
    -lg -lc -lX11 -lc

79.2Reply from Ultrix notesfile...DECWET::WICKHAMCharlie, DECWest Engr.Sat Feb 04 1989 14:4313
                <<< NAC::WORK$01:[NOTES$LIBRARY]ULTRIX.NOTE;1 >>>
                  -< It's OK to say the U... word, Volume #2 >-
================================================================================
Note 910.2                Problem linking with X11 lib                    2 of 2
ENXIO::thomas "The Code Warrior"                      4 lines  31-JAN-1989 13:06
--------------------------------------------------------------------------------

DECwindow's Xlib includes it's own malloc, free, realloc, calloc, and cfree.
GNU doesn't include calloc and cfree in it malloc.c.  So when ld goes to 
resolve calloc and cfree, is picks them out of Xlib giving the multiple
defintions.