Hi, Attached are the patches fixing two different kinds of build failure on Mac, although both are about the compilation switch FEAT_CLIPBOARD.
First, 'make' following ./configure --with-features=tiny --disable-gui yields
the link error:
gcc -o vim objects/buffer.o objects/blowfish.o objects/charset.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_eval.o
objects/ex_getln.o objects/fileio.o objects/fold.o objects/getchar.o
objects/hardcopy.o objects/hashtab.o objects/if_cscope.o objects/if_xcmdsrv.o
objects/mark.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/popupmnu.o objects/quickfix.o objects/regexp.o objects/screen.o
objects/search.o objects/sha256.o objects/spell.o objects/syntax.o
objects/tag.o objects/term.o objects/ui.o objects/undo.o objects/version.o
objects/window.o objects/os_macosx.o objects/os_mac_conv.o
objects/netbeans.o objects/main.o objects/memfile.o -lm -lncurses
-liconv
Undefined symbols for architecture x86_64:
"_objc_msgSend_fixup", referenced from:
l_objc_msgSend_fixup_autorelease in os_macosx.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[1]: *** [vim] Error 1
make: *** [first] Error 2
Apparently from the error message, the failure is caused by not specifying any
Objective-C runtime library or framework for the linker.
However, since this particular tiny build is not supposed to support clipboard
(3693--3694, src/configure.in). it doesn't need any code from os_macosx.m,
because that source file only contains clipboard support code.
So, excluding os_macosx.m from OS_EXTRA_OBJ would be rather cleaner than adding
either -lobjc, -framework Foundation, or -framework Cocoa to LIBS, and this is
just what configure.in.patch does.
Second, 'make' following ./configure --with-features=small --disable-gui yields
the compile error:
gcc -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X_UNIX -no-cpp-precomp -g -O2
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -o objects/ui.o ui.c
ui.c: In function 'clip_modeless':
ui.c:635: error: 'MOUSE_RIGHT' undeclared (first use in this function)
ui.c:635: error: (Each undeclared identifier is reported only once
ui.c:635: error: for each function it appears in.)
ui.c:640: error: 'mouse_col' undeclared (first use in this function)
ui.c:640: error: 'mouse_row' undeclared (first use in this function)
ui.c:653: error: 'MOUSE_RELEASE' undeclared (first use in this function)
ui.c: In function 'clip_process_selection':
ui.c:760: error: 'MOUSE_RELEASE' undeclared (first use in this function)
ui.c:806: error: 'MOUSE_RIGHT' undeclared (first use in this function)
make[1]: *** [objects/ui.o] Error 1
make: *** [first] Error 2
Although it is not explicitly said that this particular small build supports
clipboard,
the code at 217--226 in src/feature.h and the code at 97--105 in src/vim.h
indicate that the clipboard feature is supported on Mac for every build except
tiny one. (This looks a little bit different from other systems where clipboard
support usually belongs to 'normal' feature.)
With this understanding, when FEAT_SMALL is defined on Mac, we need to define
FEAT_MOUSE accordingly to let the compiler see the definition of
MOUSE_something macros and so on. The needed modification is contained in
vim.h.patch.
Best regards,
- KK
configure.in.patch
Description: Binary data
vim.h.patch
Description: Binary data
-- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
