Date: Mon, 18 Feb 2002 22:04:03 -0800 From: Alfred Perlstein <bright@mu.org> To: ports@freebsd.org Cc: obrien@freebsd.org, jdp@freebsd.org Subject: vim linker oddity Message-ID: <20020219060403.GE12136@elvis.mu.org>
next in thread | raw e-mail | index | archive | help
Y'know how vim tries to reduce the number of libraries it links to? Well it eventually suceeds with this: gcc -L/usr/X11R6/lib -L/usr/local/lib -o vim objects/buffer.o objects/ch= arset.o objects/diff.o objects/digraph.o objects/edit.o objects/eval.o = objects/ex_cmds.o objects/ex_cmds2.o objects/ex_docmd.o objects/ex_getl= n.o objects/fileio.o objects/fold.o objects/getchar.o objects/if_csco= pe.o objects/if_xcmdsrv.o objects/main.o objects/mark.o objects/memfile= .o objects/memline.o objects/menu.o objects/message.o objects/misc1.o = objects/misc2.o objects/move.o objects/mbyte.o objects/normal.o objects= /ops.o objects/option.o objects/os_unix.o objects/pathdef.o objects/qui= ckfix.o objects/regexp.o objects/screen.o objects/search.o objects/synt= ax.o objects/tag.o objects/term.o objects/ui.o objects/undo.o object= s/window.o objects/gui.o objects/gui_gtk.o objects/gui_gtk_x11.o objects/= pty.o objects/gui_gtk_f.o objects/version.o -L/usr/X11R6/li= b -L/usr/X11R6/lib -lgtk12 -lgdk12 -L/usr/local/lib -Wl,-E -lgmodule12 -lgl= ib12 -lintl -lXext -lm -lXt -ltermlib -liconv -lposix1e However running the resulting binary: ~/tmp/hpcvs/hpoj % vim /usr/libexec/ld-elf.so.1: Shared object "libXThrStub.XmbResetIC" not found ~/tmp/hpcvs/hpoj %=20 Basically it's missing X11, however the linker scripty thing in vim removes it because the link succeeds for some oddball reason. This: gcc -L/usr/X11R6/lib -L/usr/local/lib -o vim objects/buffer.o objects/ch= arset.o objects/diff.o objects/digraph.o objects/edit.o objects/eval.o = objects/ex_cmds.o objects/ex_cmds2.o objects/ex_docmd.o objects/ex_getl= n.o objects/fileio.o objects/fold.o objects/getchar.o objects/if_csco= pe.o objects/if_xcmdsrv.o objects/main.o objects/mark.o objects/memfile= .o objects/memline.o objects/menu.o objects/message.o objects/misc1.o = objects/misc2.o objects/move.o objects/mbyte.o objects/normal.o objects= /ops.o objects/option.o objects/os_unix.o objects/pathdef.o objects/qui= ckfix.o objects/regexp.o objects/screen.o objects/search.o objects/synt= ax.o objects/tag.o objects/term.o objects/ui.o objects/undo.o object= s/window.o objects/gui.o objects/gui_gtk.o objects/gui_gtk_x11.o objects/= pty.o objects/gui_gtk_f.o objects/version.o -L/usr/X11R6/li= b -L/usr/X11R6/lib -lgtk12 -lgdk12 -L/usr/local/lib -Wl,-E -lgmodule12 -lgl= ib12 -lintl -lXext -lm -lXt -ltermlib -liconv -lposix1e -lX11 (notice trailing -lX11) results in a working binary. --=20 -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' Tax deductible donations for FreeBSD: http://www.freebsdfoundation.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020219060403.GE12136>