This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Making gvim with Make_cyg.mak: /usr/bin/ld: cannot find crt2.o, -lmingw32, -lmoldname, etc.


Hi,

I am trying to compile vim 7.3.206 from source on Cygwin, according to the advice on:
http://users.skynet.be/antoine.mechelynck/vim/compile.htm

but get the following linker failures:

~/vim/build/vim73/src
# make  -f Make_cyg.mak ARCH=i686  PERL_VER=512 DYNAMIC_PERL=no GUI=yes
gcc -O3 -fomit-frame-pointer -freg-struct-return -fno-strength-reduce -DWIN32 -DHAVE_PATHDEF -DFEAT_BIG -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -DDYNAMIC_GETTEXT -DDYNAMIC_ICONV -DFEAT_MBYTE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_GUI_W32 -DFEAT_CLIPBOARD -march=i686 -Iproto -s -mno-cygwin -o gvim.exe gobj/blowfish.o gobj/buffer.o gobj/charset.o gobj/diff.o gobj/digraph.o gobj/edit.o gobj/eval.o gobj/ex_cmds.o gobj/ex_cmds2.o gobj/ex_docmd.o gobj/ex_eval.o gobj/ex_getln.o gobj/fileio.o gobj/fold.o gobj/getchar.o gobj/hardcopy.o gobj/hashtab.o gobj/main.o gobj/mark.o gobj/memfile.o gobj/memline.o gobj/menu.o gobj/message.o gobj/misc1.o gobj/misc2.o gobj/move.o gobj/mbyte.o gobj/normal.o gobj/ops.o gobj/option.o gobj/os_win32.o gobj/os_mswin.o gobj/pathdef.o gobj/popupmnu.o gobj/quickfix.o gobj/regexp.o gobj/screen.o gobj/search.o gobj/sha256.o gobj/spell.o gobj/syntax.o gobj/tag.o gobj/term.o gobj/ui.o gobj/undo.o gobj/version.o gobj/vimrc.o gobj/window.o gobj/if_cscope.o gobj/netbeans.o gobj/gui.o gobj/gui_w32.o gobj/gui_beval.o gobj/os_w32exe.o  -luuid -lole32 -lwsock32 -mwindows -lcomctl32 -lversion
/usr/bin/ld: cannot find crt2.o: No such file or directory
/usr/bin/ld: cannot find -lmingw32
/usr/bin/ld: cannot find -lmoldname
/usr/bin/ld: cannot find -lmingwex
/usr/bin/ld: cannot find -lmsvcrt
/usr/bin/ld: cannot find -lmingw32
/usr/bin/ld: cannot find -lmingw32
/usr/bin/ld: cannot find -lmoldname
/usr/bin/ld: cannot find -lmingwex
/usr/bin/ld: cannot find -lmsvcrt
collect2: ld returned 1 exit status
make: *** [gvim.exe] Error 1

These are the files in /usr/lib/mingw:

~/vim/build/vim73/src
# ls /usr/lib/mingw
CRT_fp10.o    dllcrt1.o      libmingwex.a        libmoldname80.a   libmsvcr71d.a
CRT_fp8.o     dllcrt2.o      libmingwthrd.a      libmoldname80d.a  libmsvcr80.a
CRT_noglob.o  gcrt0.o        libmingwthrd_old.a  libmoldname90.a   libmsvcr80d.a
binmode.o     libcoldname.a  libmoldname.a       libmoldname90d.a  libmsvcr90.a
crt1.o        libcrtdll.a    libmoldname70.a     libmoldnamed.a    libmsvcr90d.a
crt2.o        libgmon.a      libmoldname70d.a    libmsvcr70.a      libmsvcrt.a
crtmt.o       libm.a         libmoldname71.a     libmsvcr70d.a     libmsvcrtd.a
crtst.o       libmingw32.a   libmoldname71d.a    libmsvcr71.a      txtmode.o

How should I change the "make" command line to so that these files libraries are found?
I tried setting LD_LIBRARY_PATH:

# LD_LIBRARY_PATH=/usr/lib/mingw make  -f Make_cyg.mak ARCH=i686  PERL_VER=512 DYNAMIC_PERL=no GUI=yes

No difference.

The file Make_cyg.mak uses EXTRA_LIBS, so I tried setting that following the comment in the file:

# USEDLL        no or yes: set to yes to use the Runtime library DLL (no)
#               For USEDLL=yes the cygwin1.dll is required to run Vim.
#               "no" does not work with latest version of Cygwin, use
#               Make_ming.mak instead.  Or set CC to gcc-3 and add
#               -L/lib/w32api to EXTRA_LIBS.

# EXTRA_LIBS="-L/usr/lib/w32api" make -f Make_cyg.mak ARCH=i686 PERL_VER=512 DYNAMIC_PERL=no GUI=yes USEDLL=yes

But this fails with trace starting:

gcc -O3 -fomit-frame-pointer -freg-struct-return -fno-strength-reduce -DWIN32 -DHAVE_PATHDEF -DFEAT_BIG -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -DDYNAMIC_GETTEXT -DDYNAMIC_ICONV -DFEAT_MBYTE -DFEAT_MBYTE_IME -DDYNAMIC_IME -D_MAX_PATH=256 -D__CYGWIN__ -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_GUI_W32 -DFEAT_CLIPBOARD -march=i686 -Iproto -s -o gvim.exe gobj/blowfish.o gobj/buffer.o gobj/charset.o gobj/diff.o gobj/digraph.o gobj/edit.o gobj/eval.o gobj/ex_cmds.o gobj/ex_cmds2.o gobj/ex_docmd.o gobj/ex_eval.o gobj/ex_getln.o gobj/fileio.o gobj/fold.o gobj/getchar.o gobj/hardcopy.o gobj/hashtab.o gobj/main.o gobj/mark.o gobj/memfile.o gobj/memline.o gobj/menu.o gobj/message.o gobj/misc1.o gobj/misc2.o gobj/move.o gobj/mbyte.o gobj/normal.o gobj/ops.o gobj/option.o gobj/os_win32.o gobj/os_mswin.o gobj/pathdef.o gobj/popupmnu.o gobj/quickfix.o gobj/regexp.o gobj/screen.o gobj/search.o gobj/sha256.o gobj/spell.o gobj/syntax.o gobj/tag.o gobj/term.o gobj/ui.o gobj/undo.o gobj/version.o gobj/vimrc.o gobj/window.o gobj/if_cscope.o gobj/netbeans.o gobj/gui.o gobj/gui_w32.o gobj/gui_beval.o gobj/os_w32exe.o  -luuid -lole32 -L/usr/lib/w32api -lwsock32 -mwindows -lcomctl32 -lversion
gobj/buffer.o:buffer.c:(.text+0x2d7d): undefined reference to `__isctype'
gobj/buffer.o:buffer.c:(.text+0x2e7d): undefined reference to `__imp___pctype'
gobj/buffer.o:buffer.c:(.text+0x335f): undefined reference to `__flsbuf'
gobj/buffer.o:buffer.c:(.text+0x539d): undefined reference to `__isctype'

and ending later with:

gobj/gui_w32.o:gui_w32.c:(.text+0x67d7): undefined reference to `__isctype'
gobj/gui_w32.o:gui_w32.c:(.text+0x6a17): undefined reference to `__isctype'
collect2: ld returned 1 exit status
make: *** [gvim.exe] Error 1

Note, I earlier managed to compile vim to work in mintty with the UNIX configure/make method:

$ ./configure --with-tlib=libncurses  --enable-perlinterp=yes
$ make
$ make check
$ make install

This created the following files in /usr/local/bin:

1474048 May 30 02:44 vim.exe
   2084 May 30 02:44 vimtutor
      7 May 30 02:45 ex -> vim.exe
      7 May 30 02:45 view -> vim.exe
      7 May 30 02:45 rvim -> vim.exe
      7 May 30 02:45 rview -> vim.exe
      7 May 30 02:45 vimdiff -> vim.exe
  12288 May 30 02:45 xxd.exe

I'd be grateful for advice on compiling gvim under cygwin to work as a Windows application.

Regards,
Clyde

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]