* Duplicate symbols due to <emacs dir>/src/termcap.c
@ 2018-01-03 22:39 Jeffrey Walton
2018-01-05 13:32 ` ken
2018-01-06 3:15 ` Glenn Morris
0 siblings, 2 replies; 3+ messages in thread
From: Jeffrey Walton @ 2018-01-03 22:39 UTC (permalink / raw)
To: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Duplicate symbols due to <emacs dir>/src/termcap.c
2018-01-03 22:39 Duplicate symbols due to <emacs dir>/src/termcap.c Jeffrey Walton
@ 2018-01-05 13:32 ` ken
2018-01-06 3:15 ` Glenn Morris
1 sibling, 0 replies; 3+ messages in thread
From: ken @ 2018-01-05 13:32 UTC (permalink / raw)
To: help-gnu-emacs
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!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Duplicate symbols due to <emacs dir>/src/termcap.c
2018-01-03 22:39 Duplicate symbols due to <emacs dir>/src/termcap.c Jeffrey Walton
2018-01-05 13:32 ` ken
@ 2018-01-06 3:15 ` Glenn Morris
1 sibling, 0 replies; 3+ messages in thread
From: Glenn Morris @ 2018-01-06 3:15 UTC (permalink / raw)
To: noloader; +Cc: help-gnu-emacs
Jeffrey Walton wrote:
> /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
I think your conclusion about the cause of this issue is incorrect.
Emacs does not use its file src/termcap.c, except on MS-DOS.
> 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
Note lack of "termcap.o" in the above.
> /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'
So it looks like you have a hand-compiled, static version of libtermcap,
which is rather unusual. I think the problem is internal to your
libtermcap installation.
Emacs's configure script will use any of libtinfo, libncurses,
libterminfo in preference to libtermcap. So you might try installing one
of those, preferably the standard version from your (unspecified)
distribution, and retry with a clean build.
Note also that Emacs 25.3 is the latest release.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-01-06 3:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-03 22:39 Duplicate symbols due to <emacs dir>/src/termcap.c Jeffrey Walton
2018-01-05 13:32 ` ken
2018-01-06 3:15 ` Glenn Morris
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).