Anyone have vim + YCM working?

I am successfully installing YouCompleteMe with vim-plug and installing deps and compiling/installing the third_party components with inspiration from this haikuport recipe:

Unfortunately I am getting a seg fault when opening vim.

I also cannot install vim_source to debug since I get the following:

~> pkgman search vim_source
Status  Name         Description                                     
---------------------------------------------------------------------
        qvim_source  An experimental Qt gui for Vim (source files)   
        vim_source   A highly configurable text editor (source files)
~> pkgman install vim_source
100% repochecksum-1 [65 bytes]
Validating checksum for Haiku...done.
100% repochecksum-1 [64 bytes]
Validating checksum for HaikuPorts...done.
*** Failed to find a match for "vim_source": Name not found
~> 

Does anybody have vim + YCM working and could anyone give any tips on how to proceed?

You are NOT supposed to install source packages, they are meant only to fulfill license requiments.
If you build vim and co yourself with haikuporter, you will get the sources to use for debugging.

Thanks.

Building vim with haikuporter is failing on the libiconv configure stage (building with --missing-dependencies):

waiting for build package libiconv-1.16-1 to be activated
waiting for build package libiconv_debuginfo-1.16-1 to be activated
waiting for build package libiconv_devel-1.16-1 to be activated
Building ...
AC_CONFIG_MACRO_DIR([m4]) >> configure.ac
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: copying file 'build-aux/config.guess'
libtoolize: copying file 'build-aux/config.sub'
libtoolize: copying file 'build-aux/install-sh'
libtoolize: copying file 'build-aux/ltmain.sh'
libtoolize: You should add the contents of the following files to 'aclocal.m4':
libtoolize:   '/packages/libtool-2.4.6-2/.self/data/aclocal/libtool.m4'
libtoolize:   '/packages/libtool-2.4.6-2/.self/data/aclocal/ltoptions.m4'
libtoolize:   '/packages/libtool-2.4.6-2/.self/data/aclocal/ltsugar.m4'
libtoolize:   '/packages/libtool-2.4.6-2/.self/data/aclocal/ltversion.m4'
libtoolize:   '/packages/libtool-2.4.6-2/.self/data/aclocal/lt~obsolete.m4'
libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
libtoolize: and rerunning libtoolize and aclocal.
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
configure.ac:51: warning: The macro `AC_GNU_SOURCE' is obsolete.
configure.ac:51: You should run autoupdate.
./lib/autoconf/specific.m4:312: AC_GNU_SOURCE is expanded from...
srcm4/gnulib-comp.m4:34: gl_EARLY is expanded from...
configure.ac:51: the top level
configure.ac:58: warning: The macro `AC_HELP_STRING' is obsolete.
configure.ac:58: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
./lib/autoconf/general.m4:1534: AC_ARG_ENABLE is expanded from...
configure.ac:58: the top level
configure.ac:153: warning: The macro `_AC_COMPUTE_INT' is obsolete.
configure.ac:153: You should run autoupdate.
./lib/autoconf/general.m4:3376: _AC_COMPUTE_INT is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
m4/eilseq.m4:14: AC_EILSEQ is expanded from...
configure.ac:153: the top level
configure.ac:155: warning: The macro `AC_TRY_RUN' is obsolete.
configure.ac:155: You should run autoupdate.
./lib/autoconf/general.m4:2997: AC_TRY_RUN is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
m4/endian.m4:12: CL_WORDS_LITTLEENDIAN is expanded from...
configure.ac:155: the top level
AC_CONFIG_MACRO_DIR([m4]) >> configure.ac
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: copying file 'build-aux/config.guess'
libtoolize: copying file 'build-aux/config.sub'
libtoolize: copying file 'build-aux/install-sh'
libtoolize: copying file 'build-aux/ltmain.sh'
libtoolize: You should add the contents of the following files to 'aclocal.m4':
libtoolize:   '/packages/libtool-2.4.6-2/.self/data/aclocal/libtool.m4'
libtoolize:   '/packages/libtool-2.4.6-2/.self/data/aclocal/ltoptions.m4'
libtoolize:   '/packages/libtool-2.4.6-2/.self/data/aclocal/ltsugar.m4'
libtoolize:   '/packages/libtool-2.4.6-2/.self/data/aclocal/ltversion.m4'
libtoolize:   '/packages/libtool-2.4.6-2/.self/data/aclocal/lt~obsolete.m4'
libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
libtoolize: and rerunning libtoolize and aclocal.
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
configure: error: cannot find required auxiliary files: compile missing
Warning: Command '['bash', '-c', '. /wrapper-script']' returned non-zero exit status 1.
Error: Build has failed - stopping.

Building youcompleteme with haikuporter also fails:

~/dev/haikuporter> ./haikuporter youcompleteme
Checking if any dependency-infos need to be updated ...
Looking for stale dependency-infos ...
----------------------------------------------------------------------
app-vim::youcompleteme-20190724
        /boot/home/dev/haikuports/app-vim/youcompleteme/youcompleteme-20190724.recipe
----------------------------------------------------------------------

Downloading: https://github.com/ycm-core/YouCompleteMe/archive/fa92f40d0209469a037196fdc3d949ae29d0c30a.zip ...
--2022-07-19 22:09:02--  https://github.com/ycm-core/YouCompleteMe/archive/fa92f40d0209469a037196fdc3d949ae29d0c30a.zip
Resolving github.com... 140.82.121.3
Connecting to github.com|140.82.121.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/ycm-core/YouCompleteMe/zip/fa92f40d0209469a037196fdc3d949ae29d0c30a [following]
--2022-07-19 22:09:02--  https://codeload.github.com/ycm-core/YouCompleteMe/zip/fa92f40d0209469a037196fdc3d949ae29d0c30a
Resolving codeload.github.com... 140.82.121.9
Connecting to codeload.github.com|140.82.121.9|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: ‘/boot/home/dev/haikuports/app-vim/youcompleteme/download/fa92f40d0209469a037196fdc3d949ae29d0c30a.zip’
     0K .....                                                  487K=0.7s
2022-07-19 22:09:03 (487 KB/s) - ‘/boot/home/dev/haikuports/app-vim/youcompleteme/download/fa92f40d0209469a037196fdc3d949ae29d0c30a.zip’ saved [357640]
Validating checksum of fa92f40d0209469a037196fdc3d949ae29d0c30a.zip

Downloading: https://github.com/ycm-core/ycmd/archive/be84d443f2afd4eff72b3eb420656de6155eca20.zip ...
--2022-07-19 22:09:04--  https://github.com/ycm-core/ycmd/archive/be84d443f2afd4eff72b3eb420656de6155eca20.zip
Resolving github.com... 140.82.121.3
Connecting to github.com|140.82.121.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/ycm-core/ycmd/zip/be84d443f2afd4eff72b3eb420656de6155eca20 [following]
--2022-07-19 22:09:04--  https://codeload.github.com/ycm-core/ycmd/zip/be84d443f2afd4eff72b3eb420656de6155eca20
Resolving codeload.github.com... 140.82.121.9
Connecting to codeload.github.com|140.82.121.9|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: ‘/boot/home/dev/haikuports/app-vim/youcompleteme/download/be84d443f2afd4eff72b3eb420656de6155eca20.zip’
     0K ........ ........ ........ ........ ........ ........ 1.68M
  3072K ........ ........ ........ ........ ........ ....     1.76M=3.4s
2022-07-19 22:09:07 (1.72 MB/s) - ‘/boot/home/dev/haikuports/app-vim/youcompleteme/download/be84d443f2afd4eff72b3eb420656de6155eca20.zip’ saved [6063451]
Validating checksum of be84d443f2afd4eff72b3eb420656de6155eca20.zip
Unpacking source of fa92f40d0209469a037196fdc3d949ae29d0c30a.zip
Unpacking source of be84d443f2afd4eff72b3eb420656de6155eca20.zip
Initialized empty Git repository in /boot/home/dev/haikuports/app-vim/youcompleteme/work-20190724/sources/YouCompleteMe-fa92f40d0209469a037196fdc3d949ae29d0c30a/.git/
Applying patchset "/boot/home/dev/haikuports/app-vim/youcompleteme/patches/youcompleteme-20180809.patchset" ...
Applying: Force use of Python 3.6 for the server on Haiku.
Initialized empty Git repository in /boot/home/dev/haikuports/app-vim/youcompleteme/work-20190724/sources-2/ycmd-be84d443f2afd4eff72b3eb420656de6155eca20/.git/
[Errno -2147459069] No such file or directory: '/boot/home/dev/haikuports/repository/youcompleteme-20190724.DependencyInfo'

Haiku version: Walter hrev56288. x86_64

Mostly these are created when running autoreconf (automake takes care of those), I can’t see it being used, but maybe @extrowerk knows more there and I missed something.

Sometimes this happens, try cleaning your repository directory, no worries on the next run haikuporter will re-create the dependencies.

Thanks, unfortunately there is no .DependencyInfo generated after a clean.

I found this post:

… which along with the subsequent post suggests that I am barking up the wrong tree, at least as far as x86_64 Haiku goes at the moment. In that thread there are reports that QtCreator + CMake is a working solution to the modern autocomplete/code analysis conundrum, but alas it is not in a working state here either.

It was woking when we wrote the recipes (I did some of the patching there) but probably it was broken by updates to vim, python or libclang.

I’ll see if I can get it running again

3 Likes