emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-23.1.96: problem, and workaround, on GNU/Linux Gentoo Alpha


From: Nelson H. F. Beebe
Subject: emacs-23.1.96: problem, and workaround, on GNU/Linux Gentoo Alpha
Date: Thu, 22 Apr 2010 12:45:38 -0600 (MDT)

A build of emacs-23.1.96 on

        DEC Alphastation 200 4/100 (1 CPU, 100 MHz Alpha 21064 EV4, 128MB RAM)
        GNU/Linux 2.6.31-gentoo-r7

initially failed like this in the final link of emacs:

        /usr/local/lib/libncurses.a(lib_termcap.o):(.sbss+0x0): multiple 
definition of `UP'
        terminfo.o:(.sbss+0x0): first defined here
        /usr/local/lib/libncurses.a(lib_termcap.o):(.sbss+0x8): multiple 
definition of `BC'
        terminfo.o:(.sbss+0x8): first defined here
        /usr/local/lib/libncurses.a(lib_tputs.o):(.sbss+0x0): multiple 
definition of `PC'
        terminfo.o:(.sbss+0x10): first defined here
        collect2: ld returned 1 exit status

Switching to /usr/lib/libcurses.{a,so} or /usr/lib/libncurses.{a,so}
did not help: the same multiple definitions remain.

I therefore made a small code modification

        % diff terminfo.c~ terminfo.c
        28c28
        < char *UP, *BC, PC;
        ---
        > extern char *UP, *BC, PC;

and restarted the build.  That simple change produced a completely
successful build and installation.

I have seen the same problem with those three symbols in other
packages as well; it is not clear to me why on Alpha GNU/Linux one
gets the multiple-definition error, but not on other CPU
architectures.  We run the same Gentoo versions on PowerPC and SPARC
systems, and no such problems are seen there.

With nm, I see these differences:

        Alpha:
                % nm /usr/lib/libcurses.a | egrep 'UP|BC|PC'
                                 U PC
                0000000000000008 S BC
                                 U PC
                0000000000000000 S UP
                0000000000000000 S PC

        PowerPC:
                % nm /usr/lib/libcurses.a | egrep 'UP|BC|PC'
                                 U PC
                0000000000000008 B BC
                                 U PC
                0000000000000000 B UP
                0000000000000008 B PC

        SPARC:
                % nm /usr/lib/libcurses.a | egrep 'UP|BC|PC'
                         U PC
                00000004 B BC
                         U PC
                00000000 B UP
                00000000 B PC

Notice that their symbol type code is S on Alpha, and B on the other
two CPUs.  From "man nm", the type codes are documented like this:

        "B"
        "b" The symbol is in the uninitialized data section (known as BSS).

        "S"
        "s" The symbol is in an uninitialized data section for small
            objects.

Running "strings /usr/bin/ld | grep binutils" shows these package
origins:

        Alpha   binutils-2.18-r3
        PowerPC binutils-2.19
        SPARC   binutils-2.18

Anyone care to speculate that the multiple-definition error might be a
GNU ld bug in the binutils distribution?

-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- University of Utah                    FAX: +1 801 581 4148                  -
- Department of Mathematics, 110 LCB    Internet e-mail: address@hidden  -
- 155 S 1400 E RM 233                       address@hidden  address@hidden -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]