From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: ken Newsgroups: gmane.emacs.help Subject: Re: Duplicate symbols due to /src/termcap.c Date: Fri, 5 Jan 2018 08:32:45 -0500 Message-ID: References: Reply-To: gebser@mousecar.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1515159108 11091 195.159.176.226 (5 Jan 2018 13:31:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 5 Jan 2018 13:31:48 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 05 14:31:44 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eXS5t-0001ph-C8 for geh-help-gnu-emacs@m.gmane.org; Fri, 05 Jan 2018 14:31:33 +0100 Original-Received: from localhost ([::1]:40251 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eXS7q-000376-ON for geh-help-gnu-emacs@m.gmane.org; Fri, 05 Jan 2018 08:33:34 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58326) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eXS7K-00036K-0V for help-gnu-emacs@gnu.org; Fri, 05 Jan 2018 08:33:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eXS7C-0004R5-Is for help-gnu-emacs@gnu.org; Fri, 05 Jan 2018 08:33:02 -0500 Original-Received: from mout.perfora.net ([74.208.4.194]:56180) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eXS7C-0004QC-Ba for help-gnu-emacs@gnu.org; Fri, 05 Jan 2018 08:32:54 -0500 Original-Received: from nv.mousecar.net ([96.27.75.237]) by mrelay.perfora.net (mreueus002 [74.208.5.2]) with ESMTPSA (Nemesis) id 0LqjuG-1fAcMA0kBm-00eM8u for ; Fri, 05 Jan 2018 14:32:52 +0100 In-Reply-To: Content-Language: en-US X-Provags-ID: V03:K0:D8IaEOuvEozHKVqkl4l0VPMREz7Rk51Gkwro8DPmllcJd50D8K5 nCARGQIBjN8xKrHxwHaGx10p342pivNz3g/PWxKu03tnxCS2XQ0tcjqZRQPaMk4JDDc4Fvm Xm3RiHGBG+JAmDpyJ+NST5gRybnKIZEb7FmoDkUYRVo40fXsL6wavTEM2N3JFC+JqZWwsdj h7307bH1AuY4p+9l0GFvA== X-UI-Out-Filterresults: notjunk:1;V01:K0:U4eRm4IEfz0=:FSPvlShN7rYCC2uXB7sXtp QL7iHbHw8yW56u6KdbNmOSnYH1QB1L372rhxe7jifMD/tfbMdk8bZ5eoC0ei75SnXXV4Ol+y7 k8FwLB81kLJX3NKB/thu6b06NRPSaTCQsuti8u7/ewtSdVSORpjYOQ172mbhVnXyQoO36Qlt9 aqZYVKPZBZh3MgdgH5PakPnF92Z8oDsTHmtlMbrd4j2cjoOTzgtxx39XbmtQNgEMq/Wd9GRJx BUuyRX/3uosY0bdviqzAybcs6cv6ooRhTnD30NHdyE847OtAk6SeRkOdD1mKXrcUmYD3P+32o yxbkrHLe1H9N7tmQIS0dzMP1xkteyr2BS7R3wBiBi4AtarZPxOKKCZ+mKQ6LYXb2DBVOiydbo uENmKNr05RS99Xu/WkPDc1SGYemeHJgJnJZ08H5UJXY8d9gogXocvhOkY+KdsiZbshWcCFuSG 4hgdiaqi1gGOuBuUluE1lMSOs0jMPYeQrtXRT/qRaNh5jDJvo/5soRP7xrTxzIexluJhdA/H3 lvApS4D0bK5Qg1yEV4LWiy5p0PqPXKfeYc3/lBqoONnuD6/xCDIjQrP3t/yIWR/HebG8QWco5 nFejD+ZGbU8xu5KA0+993x9z4gAii7hJe0PZAfpbs38SBn7gAfUlICLN8ANwuhKQNheYdpLhF bsc4zMquqc/B/JDJ9UQ7tcW1mUKrEo5Uk1a4fKlqH/1y8IM7S41a+vxIjGsssJDjgKzxqeyBH 7dXpoGHesMRZbmqjefoPzHckG3NzRs3hqppxnUpgIQPQazGiab4Cxssotaw= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 74.208.4.194 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:115590 Archived-At: On 01/03/2018 05:39 PM, Jeffrey Walton wrote: > I'm building Emacs from sources. Termcap, Ncurses, GetText and friends > are already installed. > > As the build finishes I see: > > ... > /usr/local/lib64/libtermcap.a(tparam.o): In function `tparam': > /home/scripts/termcap-1.3.1/tparam.c:101: multiple definition of `tparam' > terminfo.o:terminfo.c:(.text+0x0): first defined here > terminfo.o: In function `tparam': > terminfo.c:(.text+0x4a): undefined reference to `tparm' > collect2: error: ld returned 1 exit status > > It looks like it is due to a local copy of termcap.c: > > $ find . -name termcap.c > ./emacs-24.5/src/termcap.c > > How do I tell Emacs to avoid its copy of Termcap, and use the one > already built and installed > > ****************************** > > Here is how Emacs was configured: > > PKG_CONFIG_PATH="${BUILD_PKGCONFIG[*]}" \ > CPPFLAGS="${BUILD_CPPFLAGS[*]}" \ > CFLAGS="${BUILD_CFLAGS[*]}" CXXFLAGS="${BUILD_CXXFLAGS[*]}" \ > LDFLAGS="${BUILD_LDFLAGS[*]}" LIBS="${BUILD_LIBS[*]}" \ > ./configure --prefix="$INSTALL_PREFIX" --libdir="$INSTALL_LIBDIR" \ > --with-xml2 --without-x --without-sound --without-xpm \ > --without-jpeg --without-tiff --without-gif --without-png --without-rsvg \ > --without-imagemagick --without-xft --without-libotf --without-m17n-flt \ > --without-xaw3d --without-toolkit-scroll-bars --without-gpm --without-dbus \ > --without-gconf --without-gsettings --without-makeinfo \ > --without-compress-install > > And here are the variables it was asked to use: > > INSTALL_PREFIX: /usr/local > INSTALL_LIBDIR: /usr/local/lib64 > > PKGCONFIG: /usr/local/lib64/pkgconfig > CPPFLAGS: -I/usr/local/include -DNDEBUG > CFLAGS: -m64 -march=native -fPIC > CXXFLAGS: -m64 -march=native -fPIC > LDFLAGS: -L/usr/local/lib64 -m64 -Wl,-R,/usr/local/lib64 > -Wl,--enable-new-dtags > LDLIBS: -ldl -lpthread > > ****************************** > > gcc -Demacs -I. -I. -I../lib -I./../lib -MMD -MF deps/.d -MP -m64 > -march=native -fPIC -Wl,-znocombreloc -L/usr/local/lib64 -m64 > -Wl,-R,/usr/local/lib64 -Wl,--enable-new-dtags \ > -o temacs vm-limit.o dispnew.o frame.o scroll.o xdisp.o menu.o > window.o charset.o coding.o category.o ccl.o character.o chartab.o > bidi.o cm.o term.o terminal.o xfaces.o emacs.o keyboard.o macros.o > keymap.o sysdep.o buffer.o filelock.o insdel.o marker.o minibuf.o > fileio.o dired.o cmds.o casetab.o casefiddle.o indent.o search.o > regex.o undo.o alloc.o data.o doc.o editfns.o callint.o eval.o > floatfns.o fns.o font.o print.o lread.o syntax.o unexelf.o bytecode.o > process.o gnutls.o callproc.o region-cache.o sound.o atimer.o doprnt.o > intervals.o textprop.o composite.o xml.o inotify.o profiler.o > decompress.o terminfo.o lastfile.o gmalloc.o ralloc.o > ../lib/libgnu.a -lrt -ltermcap > -lpthread -lm -lz > /usr/local/lib64/libtermcap.a(tparam.o): In function `tparam': > /home/scripts/termcap-1.3.1/tparam.c:101: multiple definition of `tparam' > terminfo.o:terminfo.c:(.text+0x0): first defined here > terminfo.o: In function `tparam': > terminfo.c:(.text+0x4a): undefined reference to `tparm' > collect2: error: ld returned 1 exit status > gmake[1]: *** [Makefile:664: temacs] Error 1 > gmake[1]: Leaving directory '/home/scripts/emacs-24.5/src' > gmake: *** [Makefile:387: src] Error 2 > This hasn't been my wheelhouse for a long time, but it used to be that a make (now gmake) would resolve such a conflict by using the most recent file... so here doing a "touch termcap.c" on your preferred version would be a fix. But that fix would actually depend upon the contents of your Makefile.  So if the above doesn't work (and absent documentation telling you), look into that Makefile to see if its code specify more recent files gain priority or, alternatively, if some particular directory or directory tree endows preference when there are duplicate files. But before all that, I think what I would do would be "gcc [relevant flags] /home/scripts/termcap-1.3.1/tparam.c" just to check if that by itself compiles properly. Happy hacking!