Youcompleteme: ERROR: The build failed.

Created on 27 Oct 2016  路  8Comments  路  Source: ycm-core/YouCompleteMe

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.
  • [x] 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 included the output of
    :YcmToggleLogs stderr.
  • [ ] 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.
  • [ ] 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

[If filing a bug report, please include a list of steps that describe how to
reproduce the bug you are experiencing. Also include test code if relevant.]


I install youcompleteme with some problems. My system is ubuntu 14.04LTS,vim version is 7.4.273, as I went to the last step ./install.py --clang-completer there would be error as follow. I tried many times, the problems were all the same. Looking forward to your help, thx a lot.

WARNING: this script is deprecated. Use the install.py script instead.
Searching Python 2.7 libraries...
Found Python library: /usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.so
Found Python headers folder: /usr/include/python2.7
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
Your C++ compiler supports C++11, compiling in that mode.
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
  Could NOT find PythonLibs (missing: PYTHON_INCLUDE_DIRS) (Required is at
  least version "2.6")
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-2.8/Modules/FindPythonLibs.cmake:208 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:198 (find_package)


-- Configuring incomplete, errors occurred!
See also "/tmp/ycm_build_0mXz0M/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
  File "/home/hosea/.vim/bundle/YouCompleteMe/third_party/ycmd/build.py", line 359, in BuildYcmdLib
    subprocess.check_call( [ 'cmake' ] + full_cmake_args )
  File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['cmake', '-G', 'Unix Makefiles', '-DPYTHON_LIBRARY=/usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.so', '-DPYTHON_INCLUDE_DIR=/usr/include/python2.7', '-DUSE_CLANG_COMPLETER=ON', '-DUSE_PYTHON2=ON', '/home/hosea/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp']' returned non-zero exit status 1


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
and the invocation line used to run it.

Most helpful comment

Which version of CMake are you using? Did you install the Python headers as instructed in the documentation:

sudo apt-get install python-dev

?

All 8 comments

Which version of CMake are you using? Did you install the Python headers as instructed in the documentation:

sudo apt-get install python-dev

?

It's the python's problem,it works,thx very much!

I found that cmake installed for a user with python3.8 (default installation) did not work on Ubuntu 20.04. When I removed it and ran sudo apt install cmake I was able to compile python3 install.py --all without further issue.

And what was the error? I have tried 20.04 when it was in beta and it worked.

@bstaletic The error was the same as given in this title, a highly non-descript "ERROR: The build failed"

That is printed _after_ the actual error

Even the OP included the _actual_ error.

CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
  Could NOT find PythonLibs (missing: PYTHON_INCLUDE_DIRS) (Required is at
  least version "2.6")
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-2.8/Modules/FindPythonLibs.cmake:208 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:198 (find_package)

What what the _actual_ error ?

@bstaletic The following is copy/pasted directly from my terminal ssh-ed into a fresh install of Ubuntu Server 20.04 LTS Arm (on RPi4). I was given no cmake error.

[ ~ ]  cd .vim/bundle/YouCompleteMe/

[ YouCompleteMe ]  pip3 install --user cmake
Requirement already satisfied: cmake in /home/magnus/.local/lib/python3.8/site-packages (3.18.2.post1)

[ YouCompleteMe ]  which -a cmake
/home/magnus/.local/bin/cmake

[ YouCompleteMe ]  python3 -V
Python 3.8.2

[ YouCompleteMe ]  cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.1 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.1 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

[ YouCompleteMe ]  python3 install.py --all
Searching Python 3.8 libraries...
Found Python library: /usr/lib/python3.8/config-3.8-aarch64-linux-gnu/libpython3.8.so
Found Python headers folder: /usr/include/python3.8
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
and the invocation line used to run it.

The following seuqence fixed it though:

pip3 uninstall cmake
sudo apt install cmake
python3 install.py --all

You were supposed to install cmake with apt. I have no idea what cmake from pip is.

Was this page helpful?
0 / 5 - 0 ratings