From owner-freebsd-ports Mon Feb 18 22: 4: 5 2002 Delivered-To: freebsd-ports@freebsd.org Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by hub.freebsd.org (Postfix) with ESMTP id 3358937B402; Mon, 18 Feb 2002 22:04:03 -0800 (PST) Received: by elvis.mu.org (Postfix, from userid 1192) id 16FB5AE28D; Mon, 18 Feb 2002 22:04:03 -0800 (PST) Date: Mon, 18 Feb 2002 22:04:03 -0800 From: Alfred Perlstein To: ports@freebsd.org Cc: obrien@freebsd.org, jdp@freebsd.org Subject: vim linker oddity Message-ID: <20020219060403.GE12136@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Mutt/1.3.27i Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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