static linkage...
Andreas Boerner
andreas.boerner at w84u.org
Tue Dec 16 00:47:15 UTC 2003
Problem:
I need the mc on a system to be installed, where the (shared) libraries are (yet) missing; so I need a statically linked mc.
I suggest to to add an option for the ./configure to allow static linkage.
Doing this manually is time consuming and needed several repairs:
(gentoo linux; system is up to date (Dec, 15th, 2003))
setting environment variable LDFLAGS to -Wl,-static
compile error: library glib-2.0 not found
changing within the link command glib-2.0 to glib solved it.
gcc -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -g -O2 -Wall -Wl,-static -o mc achown.o background.o boxes.o chmod.o chown.o cmd.o color.o command.o complete.o cons.handler.o dialog.o dir.o dlg.o ext.o file.o filegui.o filenot.o fileopctx.o find.o findme.o fsusage.o help.o hotlist.o info.o key.o keyxdef.o layout.o learn.o listmode.o main.o menu.o mountlist.o mouse.o option.o panelize.o popt.o poptconfig.o popthelp.o poptparse.o profile.o regex.o rxvt.o screen.o setup.o slint.o subshell.o terms.o text.o textconf.o tree.o treestore.o user.o util.o utilunix.o view.o widget.o win.o wtools.o ../edit/libedit.a ../vfs/libvfs-mc.a -lglib-2.0 -lgpm -lslang -lext2fs -lcom_err
some thread references were missing...
was solved by specifying ./configure --without-x ??
With these modifications I was able to build mc statically by sending the modified link command isolated to the shell.
I suggest to be able to do:
./configure --static
This description might be "bumpy"; I'm neither developer nor native english speaker...
-- Andreas
More information about the mc
mailing list