To whom it may concern,
I seem to be unable to compile YCM on my OpenBSD 7.1 machine. (cmake 3.20.3). Based on another Git issue opened on a different project seen here I think that this is an issue that came about with Clang upgrades (since OpenBSD 6.8):
If possible, would the YCM team be interested in supporting/fixing this?
Here is my error log when running ./install --system-libclang --all.
The same error message comes up with just ./install btw.
librem$ ./install.py --system-libclang --all --verbose
Searching Python 3.9 libraries...
Found Python library: /usr/local/lib/libpython3.9.so.0.0
Found Python headers folder: /usr/local/include/python3.9
-- The C compiler identification is Clang 13.0.0
-- The CXX compiler identification is Clang 13.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Python3: /usr/local/bin/python3 (found suitable version "3.9.12", minimum required is "3.6") found components: Interpreter Development Development.Module Development.Embed
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Using libclang to provide semantic completion for C/C++/ObjC
-- Using external libclang: /usr/local/lib/libclang.so.8.2
-- Using Abseil hash tables
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/ycm_build_yn1u1s52
[ 0%] Building CXX object absl/absl/base/CMakeFiles/absl_exponential_biased.dir/internal/exponential_biased.cc.o
[ 1%] Linking CXX static library libabsl_exponential_biased.a
[ 1%] Built target absl_exponential_biased
[ 1%] Building CXX object absl/absl/time/CMakeFiles/absl_time_zone.dir/internal/cctz/src/zone_info_source.cc.o
[ 3%] Building CXX object absl/absl/time/CMakeFiles/absl_time_zone.dir/internal/cctz/src/time_zone_fixed.cc.o
[ 3%] Building CXX object absl/absl/time/CMakeFiles/absl_time_zone.dir/internal/cctz/src/time_zone_format.cc.o
[ 4%] Building CXX object absl/absl/time/CMakeFiles/absl_time_zone.dir/internal/cctz/src/time_zone_if.cc.o
[ 6%] Building CXX object absl/absl/time/CMakeFiles/absl_time_zone.dir/internal/cctz/src/time_zone_impl.cc.o
[ 6%] Building CXX object absl/absl/time/CMakeFiles/absl_time_zone.dir/internal/cctz/src/time_zone_info.cc.o
[ 8%] Building CXX object absl/absl/time/CMakeFiles/absl_time_zone.dir/internal/cctz/src/time_zone_libc.cc.o
[ 8%] Building CXX object absl/absl/time/CMakeFiles/absl_time_zone.dir/internal/cctz/src/time_zone_lookup.cc.o
[ 9%] Building CXX object absl/absl/time/CMakeFiles/absl_time_zone.dir/internal/cctz/src/time_zone_posix.cc.o
In file included from /home/tvetere/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/absl/absl/time/internal/cctz/src/time_zone_format.cc:28:
In file included from /home/tvetere/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/absl/absl/time/internal/cctz/include/cctz/time_zone.h:29:
In file included from /home/tvetere/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/absl/absl/time/internal/cctz/include/cctz/civil_time.h:19:
In file included from /home/tvetere/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/absl/absl/time/internal/cctz/include/cctz/civil_time_detail.h:20:
In file included from /usr/include/c++/v1/ostream:140:
In file included from /usr/include/c++/v1/locale:218:
/usr/include/c++/v1/__bsd_locale_fallbacks.h:122:17: error: use of undeclared identifier 'vasprintf'; did you mean 'vsprintf'?
int __res = vasprintf(__s, __format, __va);
^
/usr/include/c++/v1/cstdio:124:9: note: 'vsprintf' declared here
using ::vsprintf _LIBCPP_USING_IF_EXISTS;
^
In file included from /home/tvetere/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/absl/absl/time/internal/cctz/src/time_zone_format.cc:28:
In file included from /home/tvetere/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/absl/absl/time/internal/cctz/include/cctz/time_zone.h:29:
In file included from /home/tvetere/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/absl/absl/time/internal/cctz/include/cctz/civil_time.h:19:
In file included from /home/tvetere/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/absl/absl/time/internal/cctz/include/cctz/civil_time_detail.h:20:
In file included from /usr/include/c++/v1/ostream:140:
In file included from /usr/include/c++/v1/locale:218:
/usr/include/c++/v1/__bsd_locale_fallbacks.h:122:27: error: cannot initialize a parameter of type 'char *' with an lvalue of type 'char **'
int __res = vasprintf(__s, __format, __va);
^~~
/usr/include/stdio.h:269:21: note: passing argument to parameter here
int vsprintf(char *, const char *, __va_list);
^
/home/tvetere/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/absl/absl/time/internal/cctz/src/time_zone_format.cc:651:10: error: use of undeclared identifier 'strptime'
dp = strptime(dp, fmt, tm);
^
3 errors generated.
*** Error 1 in target 'absl/absl/time/CMakeFiles/absl_time_zone.dir/internal/cctz/src/time_zone_format.cc.o'
*** Error 1 in . (absl/absl/time/CMakeFiles/absl_time_zone.dir/build.make:90 'absl/absl/time/CMakeFiles/absl_time_zone.dir/internal/cctz/src/time_zone_format.cc.o')
*** Error 2 in . (CMakeFiles/Makefile2:2542 'absl/absl/time/CMakeFiles/absl_time_zone.dir/all')
*** Error 2 in . (CMakeFiles/Makefile2:2682 'ycm/CMakeFiles/ycm_core.dir/rule')
*** Error 2 in /tmp/ycm_build_yn1u1s52 (Makefile:962 'ycm_core': /usr/bin/make -s -f CMakeFiles/Makefile2 ycm_core)
ERROR: the build failed.
NOTE: it is *highly* unlikely that this is a bug but rather that this is a problem with the configuration of your system or a missing dependency. Please carefully read CONTRIBUTING.md and if you're sure that it is a bug, please raise an issue on the issue tracker, including the entire output of this script (with --verbose) and the invocation line used to run it.