vim60h - make shadow & AIX build patches
- I encountered three problems when building vim 6.0h.
1. Make shadow didn't copy/link everything needed in the shadow
2. I had problems building on AIX with perl - this is probably a local
problem, but others might encounter the same issue and the fix is
3. Also on aix, using gcc 2.8.1, I ended up with a final link command
that looked like this (excuse the very long line):
gcc -L/fs5/c/waggoner/local/aix4.1.x/lib -L/usr/intel/pkgs/X11/R6.4PL3/lib -lgtk -lgdk -Wl,-E -lgmodule -lglib -lXext -lX11 -lm -L/usr/intel/pkgs/X11/R6.4PL3/lib -o vim objects/buffer.o objects/charset.o objects/digraph.o objects/edit.o objects/eval.o objects/ex_cmds.o objects/ex_docmd.o objects/ex_getln.o objects/fileio.o objects/fold.o objects/getchar.o objects/if_cscope.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/multibyte.o objects/normal.o objects/ops.o objects/option.o objects/os_unix.o objects/pathdef.o objects/quickfix.o objects/regexp.o objects/screen.o objects/search.o objects/syntax.o objects/tag.o objects/term.o objects/ui.o objects/undo.o objects/window.o objects/gui.o objects/gui_gtk.o objects/gui_gtk_x11.o objects/pty.o objects/gui_gtk_f.o objects/if_perl.o objects/if_perlsfio.o objects/version.o -lSM -lICE -lXpm -lXt -lX11 -ltermcap -L/usr/intel/97r1/lib -L/usr/lpp/xlC/lib -L/usr/local/lib -L/usr/ccs/lib /usr/intel/97r1.3/lib/perl5/rs_aix41/5.00404/auto/DynaLoader/DynaLoader.a -L/usr/intel/97r1.3/lib/perl5/rs_aix41/5.00404/CORE -lperl -lgdbm -ldbm -lld -lm -lc -lbsd -lPW
This doesn't work. I get lots of undefined references to gtk_*
I think all the -l options need to be after the object file list.
It appears that the Makefile intends to order them with the
libraries at the end:
# Link the target for normal use or debugging.
# A shell script is used to try linking without unneccesary libraries.
$(VIMTARGET): auto/config.mk objects $(OBJ) version.c version.h
$(CCC) version.c -o objects/version.o
@LINK="$(PURIFY) $(SHRPENV) $(CClink) $(LDFLAGS) $(ALL_LIB_DIRS) \
-o $(VIMTARGET) $(OBJ) objects/version.o $(ALL_LIBS)" \
MAKE="$(MAKE)" sh $(srcdir)/link.sh
However, the configure script, when testing for gtk, puts both the
-L and the -l options from gtk-config into the GUI_LIB_LOC
environment variable, and then this is used to define the
GTK_LIBS_DIR, which defines the GUI_LIB_DIR, which becomes part of
ALL_LIB_DIRS. I made a change to the Makefile which removes the
GUI_LIB_DIR from the ALL_LIB_DIRS, and instead makes it part of
GUI_LIBS2. This isn't the ideal fix - but I'm not sure how else to
Attached is a patch for all of these problems. The make shadow patch
also includes a modification to the way the "shadow" directory is
created. If there is an environment variable called "SHADOWDIR" set,
it will use that for the name of the shadow directory instead of just
"shadow". I found this VERY helpful when building on multiple
platforms so that I can launch builds on multiple machines without
worrying about making sure one machine finishes with:
mv shadow $SHADOWDIR
before the next machine starts doing the same, which can cause the two
of them to get very confused.
Mark Waggoner waggoner@... (503) 712-3335
From there to here, from here to there, funny things are everywhere