ycm-core/YouCompleteMe

Compile issue on FreeBSD13.3 release, absl_time_zone.dir/all => Error code 2

nerozero opened this issue · 11 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, using vim -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
    of install.py (or cmake/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.

Issue Details

Unable to compile YCM,
--- _deps/absl-build/absl/time/CMakeFiles/absl_time_zone.dir/all ---
*** [_deps/absl-build/absl/time/CMakeFiles/absl_time_zone.dir/all] Error code 2

  • What did you do?

pushd ~/.vim/plugged/YouCompleteMe/ ; ./install.py --verbose --clangd-completer ; popd

  • What did you expect to happen?

successful compilation

  • What actually happened?

compilation failed,

Diagnostic data

Output of vim --version

VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Jun 20 2024 20:07:24)
Included patches: 1-470
Compiled by nerozero@freebsd_13_3_amd64_nox-HEAD-job-01
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              +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           +virtualedit
+comments          +linebreak         +quickfix          +visual
+conceal           +lispindent        +reltime           +visualextra
+cryptv            +listcmds          +rightleft         +vreplace
+cscope            +localmap          -ruby              +wildignore
+cursorbind        +lua               +scrollbind        +wildmenu
+cursorshape       +menu              +signs             +windows
+dialog_con        +mksession         +smartindent       +writebackup
+diff              +modify_fname      -sodium            -X11
+digraphs          +mouse             -sound             -xattr
-dnd               -mouseshape        +spell             -xfontset
-ebcdic            +mouse_dec         +startuptime       -xim
+emacs_tags        -mouse_gpm         +statusline        -xpm
+eval              -mouse_jsbterm     -sun_workshop      -xsmp
+ex_extra          +mouse_netterm     +syntax            -xterm_clipboard
+extra_search      +mouse_sgr         +tag_binary        -xterm_save
-farsi             +mouse_sysmouse    -tag_old_static    
   system vimrc file: "/usr/local/etc/vim/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
 3rd user vimrc file: "~/.config/vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/local/etc/vim"
 f-b for $VIMRUNTIME: "/usr/local/share/vim/vim91"
Compilation: cc -c -I. -Iproto -DHAVE_CONFIG_H -DLIBICONV_PLUG -I/usr/local/include -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 
Linking: cc -fstack-protector-strong -L/usr/local/lib -Wl,--as-needed -o vim -lm -pthread -lncursesw -lrt -lintl -L/usr/local/lib -llua-5.4 -L/usr/local/lib/python3.11/config-3.11 -lpython3.11 -lintl -ldl -L/usr/local/lib -lintl -lutil -lm 

Output of git rev-parse HEAD in YouCompleteMe installation directory

b5fe27bb82cc375d66a9a006cf30390bdb215ed2

OS version, distribution, etc.

FreeBSD13.3 RELEASE
Python: Python 3.11.9
Python-absl: py311-absl-0.7.1_1 ( installed separately, has 0 effect )

Output of build/install commands

install.py output: ycm-compile-error.txt

Does it work if you install abseil through your system package manager and then pass -DUSE_SYSTEM_ABSEIL=ON to cmake? It should.

There's also EXTRA_CMAKE_ARGS that install.py knows about.

So something like EXTRA_CMAKE_ARGS=-DUSE_SYSTEM_ABSEIL=ON ./install.py --verbose --clangd-completer.

@bstaletic thank you for quick reply.

Unfortunately I made a mistake, I thought ycm is using a python module of absl but it is a cpp version. I haven't find a BSD port for absl-cpp, so there is no System Package in bsd...
If this is a absl-cpp module compile issue, then should i report a compiling issues in https://github.com/abseil/abseil-cpp?

I haven't find a BSD port for absl-cpp, so there is no System Package in bsd...

Bummer...

If this is a absl-cpp module compile issue, then should i report a compiling issues in https://github.com/abseil/abseil-cpp?

Basically yes. However, YCM is using this commit of abseil:
https://github.com/ycm-core/ycmd/blob/master/cpp/CMakeLists.txt#L248

Maybe master is already fixed? Either way, the problem needs to be fixed in abseil-cpp first. Then YCM can update the referred-to commit.

I found this post: abseil/abseil-cpp#1587

Latest Abseil LTS is this
abseil/abseil-cpp@d7aaad8

Would you mind trying that commit? If YCM compiles, I can make a pull request that updates it. Or you can.

Already done testing ( by changing GIT_TAG d7aaad83b488fd62bd51c81ecf16cd938532cc0a in third_party/ycmd/cpp/CMakeLists.txt ). Compiled and worked successfully.

One day - no issues with YCM. I guess we can close issue. Hope this commit of absl ( abseil/abseil-cpp@d7aaad8 ) appear in next YCM release.

We keep issues like this open until the next time we update the ycmd submodule.
We have updated it just before you opened this issue, though there is no fixed schedule. Rather "it's been a while".

In the mean time, a possible workaround isgit submodule update --remote, which pulls in ycmd master.

@bstaletic Thank you so much for very quick reactions!

Can confirm. i removed GIT TAG in third_party/ycmd/cpp/CMakeList.txt. Works well on FreeBSD 14.1.