Subject: pkg/14088: 'make install' fails in editors/emacs
To: None <gnats-bugs@gnats.netbsd.org>
From: None <ryoh@jaist.ac.jp>
List: netbsd-bugs
Date: 09/28/2001 21:58:42
>Number:         14088
>Category:       pkg
>Synopsis:       'make install' fails in editors/emacs
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 28 05:59:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Ryo HAYASAKA
>Release:        the latest pkgsrc tree
>Organization:
	Japan Advanced Institute of Science and Technology (JAIST)
>Environment:
System: NetBSD bonnie.jaist.ac.jp 1.5Y NetBSD 1.5Y (BONNIE) #108: Thu Sep 27 03:31:41 JST 2001 root@bonnie.jaist.ac.jp:/c/src/sys/arch/i386/compile/BONNIE i386
Architecture: i386
Machine: i386
$ cc -v
Using builtin specs.
gcc version 2.95.3 20010315 (release)
(I have switched to the new toolchain)
>Description:
	I got a ld error when compiling editors/emacs.

	# cd /usr/pkgsrc/editors/emacs
	# make install
	...
	cc   `echo -R/usr/X11R6/lib  | sed -e 's/-R/-Wl,-rpath,/'`                         -o temacs  dispnew.o frame.o scroll.o xdisp.o xmenu.o window.o       charset.o coding.o category.o ccl.o     cm.o term.o xfaces.o xterm.o xfns.o xselect.o xrdb.o fontset.o  emacs.o keyboard.o macros.o keymap.o sysdep.o   buffer.o filelock.o insdel.o marker.o intervals.o textprop.o    minibuf.o fileio.o dired.o filemode.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 print.o lread.o abbrev.o syntax.o unexelf.o  mocklisp.o bytecode.o      process.o callproc.o   region-cache.o   doprnt.o strftime.o       tparam.o lastfile.o gmalloc.o ralloc.o vm-limit.o  widget.o            ../lwlib/liblw.a -L/usr/X11R6/lib    -lXaw -lXmu  -lXt -lSM -lICE -lXext -lX11          -ltermcap        -lm    
	/usr/X11R6/lib/libXaw.so: warning: tmpnam() possibly used unsafely, use mkstemp() or mkdtemp()
	callproc.o: In function `Fcall_process_region':
	callproc.o(.text+0x10f9): warning: mktemp() possibly used unsafely, use mkstemp() or mkdtemp()
	/usr/bin/ld: warning: libXpm.so.4, needed by /usr/X11R6/lib/libXaw.so, not found (try using -rpath or -rpath-link)
	/usr/X11R6/lib/libXaw.so: undefined reference to `XpmReadFileToPixmap'
	collect2: ld returned 1 exit status
	gmake[1]: *** [temacs] Error 1
	gmake[1]: Leaving directory `/c/pkgsrc/editors/emacs/work/emacs-20.7/src'
	gmake: *** [src] Error 2
	*** Error code 2

>How-To-Repeat:
  See above.
>Fix:
	As ld suggested above, add -rpath-link option to the argument.  Thus, the following works successfully:

	cc -Wl,-R/usr/X11R6/lib -Wl,-rpath-link,/usr/X11R6/lib -o temacs  dispnew.o frame.o scroll.o xdisp.o xmenu.o window.o       charset.o coding.o category.o ccl.o     cm.o term.o xfaces.o xterm.o xfns.o xselect.o xrdb.o fontset.o  emacs.o keyboard.o macros.o keymap.o sysdep.o   buffer.o filelock.o insdel.o marker.o intervals.o textprop.o    minibuf.o fileio.o dired.o filemode.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 print.o lread.o abbrev.o syntax.o unexelf.o  mocklisp.o bytecode.o      process.o callproc.o   region-cache.o   doprnt.o strftime.o       tparam.o lastfile.o gmalloc.o ralloc.o vm-limit.o  widget.o            ../lwlib/liblw.a -L/usr/X11R6/lib    -lXaw -lXmu  -lXt -lSM -lICE -lXext -lX11          -ltermcap        -lm 
>Release-Note:
>Audit-Trail:
>Unformatted: