ycm-core / YouCompleteMe

A code-completion engine for Vim
http://ycm-core.github.io/YouCompleteMe/
GNU General Public License v3.0
25.36k stars 2.8k forks source link

OpenBSD 7.4 Python module fails to load #4213

Closed Jaywalker closed 5 months ago

Jaywalker commented 5 months ago

Issue Prelude

Please complete these steps and check these boxes (by putting an x inside the brackets) before filing your issue:

Thank you for adhering to this process! It ensures your issue is resolved quickly and that neither your nor our time is needlessly wasted.

Issue Details

The module fails to load on OpenBSD. It tries to load the .so file, but fails and says "Cannot load specified object".

I have tried the "Run YCM Manually" step per https://github.com/ycm-core/YouCompleteMe/wiki/Troubleshooting-steps-for-ycmd-server-SHUT-DOWN and got the same issue as is noted in the ycmd stderr log in the gist below.

I then tried running it with the flag LD_DEBUG=1 as follows env LD_DEBUG=1 python3.10 ycmd --options_file=default_settings.json and got the output in this gist: https://gist.github.com/Jaywalker/e353ea8ab31b209ce59e5c5ad142b663

Most notable line to me is line 602: dlopen: /home/jaywalker/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycm_core.cpython-310.so: done (failed).

  1. Open vim
  2. See the report that the YCM server has failed

YCM to run.

It says the YCM server is shutdown.

Diagnostic data

Output of vim --version

NVIM v0.9.1
Build type: Release
LuaJIT 2.1.0-beta3

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/share/nvim"

Run :checkhealth for more info

Output of YcmDebugInfo

Printing YouCompleteMe debug information...
-- Resolve completions: Up front
-- Client logfile: /tmp/ycm_5yba4vp4.log
-- Server errored, no debug info from server
-- Server running at: http://127.0.0.1:31439
-- Server process ID: 11829
-- Server logfiles:
--   /tmp/ycmd_31439_stdout_kob6taco.log
--   /tmp/ycmd_31439_stderr_banvy3ej.log
-- Semantic highlighting supported: False
-- Virtual text supported: False
-- Popup windows supported: False

Output of YcmDiags

Native filetype completion not supported for current file, cannot force recompilation.

Output of git rev-parse HEAD in YouCompleteMe installation directory

79c850b4a674a4f461a670f4515ab953bb89d632

Contents of YCM, ycmd and completion engine logfiles

https://gist.github.com/Jaywalker/bf28d07a66eeb1ea050793075a5e861e https://gist.github.com/Jaywalker/66ef3959dfc459b2171f0a659055b463

OS version, distribution, etc.

OpenBSD 7.4

Output of build/install commands

https://gist.github.com/Jaywalker/8ec1b4a7a5bf404ce20d4d5cb8e6edfa

bstaletic commented 5 months ago

I see you are using the legacy --clang-completer. I would advise you to skip that flag and instead set g:ycm_clangd_binary_path.

Jaywalker commented 5 months ago

Aha! I didn't realize that was deprecated. Completion is working as expected with that fix in place. Thanks!