MSYS2/MingW64 compilation failure
RivenSkaye opened this issue · comments
Issue Prelude
Please complete these steps and check these boxes (by putting an x
inside
the brackets) before filing your issue:
- I have read and understood YCM's CONTRIBUTING document.
- I have read and understood YCM's CODE_OF_CONDUCT document.
- I have read and understood YCM's README, especially the
Frequently Asked Questions section. - I have searched YCM's issue tracker to find issues similar to the one I'm
about to report and couldn't find an answer to my problem. (Example Google
search.) - If filing a bug report, I have included the output of
vim --version
. - If filing a bug report, I have included the output of
:YcmDebugInfo
. - If filing a bug report, I have attached the contents of the logfiles using
the:YcmToggleLogs
command. - If filing a bug report, I have included which OS (including specific OS
version) I am using. - If filing a bug report, I have included a minimal test case that reproduces
my issue, usingvim -Nu /path/to/YCM/vimrc_ycm_minimal
, including what I
expected to happen and what actually happened. - If filing a installation failure report, I have included the entire output
ofinstall.py
(orcmake
/make
/ninja
) including its invocation - I understand this is an open-source project staffed by volunteers and
that any help I receive is a selfless, heartfelt gift of their free time. I
know I am not entitled to anything and will be polite and courteous. - I understand my issue may be closed if it becomes obvious I didn't
actually perform all of these steps.
Thank you for adhering to this process! It ensures your issue is resolved
quickly and that neither your nor our time is needlessly wasted.
You're very much welcome! Proper reports save lives a lot of precious developer time
Issue Details
Provide a clear description of the problem, including the following key
questions:
- What did you do?
Attempted installation through vim-plug
and subsequent CLI steps to build YCM. The build subsequently fails in one of two ways.
-
It fails on account of not being able to find the
libclang
it downloaded itself, and halts. -
It fails when using
--system-libclang
- It first emits errors about unicode points
- it subsequently fails the build later on
-
PlugInstall 'ycm-core/YouCompleteMe'
-
Add
Plug 'ycm-core/YouCompleteMe'
to.vimrc
-
:wq
-
cd ~/.vim/plugged/YouCompleteMe
-
python3.11 install.py --clang-completer --rust-completer --verbose
(fails to find thelibclang
it downloads) orpython3.11 install.py --clang-completer --rust-completer --verbose --system-libclang
(errors in compilation)- I added
> ~/ycmd_build[-sys].log 2>&1
to the commands to produce the attached log files
- I added
- What did you expect to happen?
Successful compilation and use of YCM
- What actually happened?
Include description of the observed behaviour, including actual output,
Without --system-libclang
With --system-libclang, zipped because it's 46MB
Failure to finish compilation, leaving it in a currently unusable state.
Diagnostic data
Output of vim --version
❯ vim --version
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Jul 14 2023 00:15:07)
Included patches: 1-1403
Compiled by <https://www.msys2.org/>
Huge version without GUI. Features included (+) or not (-):
+acl +file_in_path +mouse_urxvt -tag_any_white
+arabic +find_in_path +mouse_xterm -tcl
+autocmd +float +multi_byte +termguicolors
+autochdir +folding +multi_lang +terminal
-autoservername -footer -mzscheme +terminfo
-balloon_eval +fork() +netbeans_intg +termresponse
+balloon_eval_term +gettext +num64 +textobjects
-browse -hangul_input +packages +textprop
++builtin_terms +iconv +path_extra +timers
+byte_offset +insert_expand +perl/dyn +title
+channel +ipv6 +persistent_undo -toolbar
+cindent +job +popupwin +user_commands
-clientserver +jumplist +postscript +vartabs
+clipboard +keymap +printer +vertsplit
+cmdline_compl +lambda +profile +vim9script
+cmdline_hist +langmap -python +viminfo
+cmdline_info +libcall +python3/dyn +virtualedit
+comments +linebreak +quickfix +visual
+conceal +lispindent +reltime +visualextra
+cryptv +listcmds +rightleft +vreplace
+cscope +localmap +ruby/dyn +wildignore
+cursorbind -lua +scrollbind +wildmenu
+cursorshape +menu +signs +windows
+dialog_con +mksession +smartindent +writebackup
+diff +modify_fname -sodium -X11
+digraphs +mouse -sound -xfontset
-dnd -mouseshape +spell -xim
-ebcdic +mouse_dec +startuptime -xpm
+emacs_tags -mouse_gpm +statusline -xsmp
+eval -mouse_jsbterm -sun_workshop -xterm_clipboard
+ex_extra +mouse_netterm +syntax -xterm_save
+extra_search +mouse_sgr +tag_binary
-farsi -mouse_sysmouse -tag_old_static
system vimrc file: "/etc/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
defaults file: "$VIMRUNTIME/defaults.vim"
fall-back for $VIM: "/etc"
f-b for $VIMRUNTIME: "/usr/share/vim/vim90"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -I/usr/include/ncursesw -march=nocona -msahf -mtune=generic -O2 -pipe -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -pipe -Wl,--as-needed -o vim.exe -lm -lncursesw -liconv -lacl -lintl -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector-strong -L/usr/lib/perl5/core_perl/CORE -lperl -lpthread -ldl -lcrypt
Output of YcmDebugInfo
N/A
Output of YcmDiags
N/A
Output of git rev-parse HEAD
in YouCompleteMe installation directory
❯ git rev-parse HEAD
142a559acd70a4da190e36b1b05b9f1eec67acd0
Contents of YCM, ycmd and completion engine logfiles
N/A
OS version, distribution, etc.
❯ uname -a
MINGW64_NT-10.0-19045 DESKTOP-2M2MTV7 3.4.7.x86_64 2023-07-14 16:57 UTC x86_64 Msys
From the Windows info itself:
- Windows 10 Pro
- 22H2
- 19045.3208
- Windows Feature Experience Pack 1000.19041.1000.0
Output of build/install commands
See log files provided earlier, gist doesn't like the 46MB one either
If any additional info is desired, please do let me know and I'll provide it ASAP. I was busy migrating my office workflow to vim, and as such I haven't uninstalled my alternative options yet. It does, however, mean I can only collect info during my office hours.
Sorry, mingw is not an officially supported platform. Per the instructions on README, for windows, we assume you are using cmd.exe. This works fine. Mingw can be made to work, and there is some community-supported info here: https://github.com/ycm-core/YouCompleteMe/wiki/Windows-Installation-Guide-for-Unix%E2%80%90like-Environments
As an aside, you provably shouldn't be using libclang completer nowadays (it's considered legacy); we officially recommend using clangd completer instead. To do that use install.py
without --clang-completer
and specify g:ycm_clangd_binary_path
to a clangd that works on your mingw environment.
but I don't consider it a bug that YCM's installer/prebuilt binaries don't support mingw, so closing.