rdnetto / YCM-Generator

Generates config files for YouCompleteMe (https://github.com/Valloric/YouCompleteMe)
GNU General Public License v3.0
917 stars 128 forks source link

ERROR: Unknown build system #122

Open pBlasiak opened 6 years ago

pBlasiak commented 6 years ago

I am trying to use ycm-generator for OpenFOAM. I compiled ycm according to this https://github.com/Valloric/YouCompleteMe#full-installation-guide

I typed the following in the .vim/bundle/YCM-Generator directory I typed ./config_gen.py -v -e -c ~/ycm_temp/llvm_root_dir/bin/clang ~/OpenFOAM/OpenFOAM-v1612+/

but I got the error: ERROR: Unknown build system

I have read issues https://github.com/rdnetto/YCM-Generator/issues/36 and https://github.com/rdnetto/YCM-Generator/issues/61 but it did not help

pBlasiak commented 6 years ago

I once again compiled YCM but now with install.py script and now I typed ./config_gen.py -c /usr/bin/clang-6.0 ~/OpenFOAM/OpenFOAM-v1612+/

but I still have ERROR: Unknown build system

which compiler should I point? From YCM compilation I got: ` 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 5.4.0 -- The CXX compiler identification is GNU 5.4.0 -- 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 -- Detecting C compile features -- Detecting C compile features - 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 -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found PythonLibs: /usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.so (found suitable version "2.7.12", minimum required is "2.7") -- Using libclang archive: /home/przemek/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/../clang_archives/libclang-6.0.0-x86_64-linux-gnu-ubuntu-14.04.tar.bz2 -- Using libclang to provide semantic completion for C/C++/ObjC -- Using external libclang: /tmp/ycm_build_XRx8QT/lib/libclang.so.6.0 -- NOT using clang-tidy for static analysis. -- Configuring done -- Generating done -- Build files have been written to: /tmp/ycm_build_XRx8QT Scanning dependencies of target BoostParts [ 1%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/path.cpp.o [ 3%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/utf8_codecvt_facet.cpp.o [ 5%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/operations.cpp.o [ 7%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/path_traits.cpp.o [ 11%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/portability.cpp.o [ 11%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/codecvt_error_category.cpp.o [ 13%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/windows_file_codecvt.cpp.o [ 15%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/unique_path.cpp.o [ 17%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/usinstances.cpp.o [ 19%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/wide_posix_api.cpp.o [ 21%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/regex_traits_defaults.cpp.o [ 23%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/wc_regex_traits.cpp.o [ 25%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/regex_debug.cpp.o [ 26%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/winstances.cpp.o [ 28%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/cregex.cpp.o [ 30%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/regex.cpp.o [ 32%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/regex_raw_buffer.cpp.o [ 34%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/instances.cpp.o [ 36%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/posix_api.cpp.o [ 38%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/w32_regex_traits.cpp.o [ 40%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/static_mutex.cpp.o [ 42%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/icu.cpp.o [ 44%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/fileiter.cpp.o [ 46%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/c_regex_traits.cpp.o [ 48%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/cpp_regex_traits.cpp.o [ 50%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/system/src/error_code.cpp.o [ 51%] Linking CXX static library libBoostParts.a [ 51%] Built target BoostParts Scanning dependencies of target ycm_core [ 53%] Building CXX object ycm/CMakeFiles/ycm_core.dir/IdentifierCompleter.cpp.o [ 55%] Building CXX object ycm/CMakeFiles/ycm_core.dir/CodePointRepository.cpp.o [ 57%] Building CXX object ycm/CMakeFiles/ycm_core.dir/CodePoint.cpp.o [ 59%] Building CXX object ycm/CMakeFiles/ycm_core.dir/IdentifierUtils.cpp.o [ 63%] Building CXX object ycm/CMakeFiles/ycm_core.dir/Result.cpp.o [ 63%] Building CXX object ycm/CMakeFiles/ycm_core.dir/Character.cpp.o [ 65%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ycm_core.cpp.o [ 67%] Building CXX object ycm/CMakeFiles/ycm_core.dir/CharacterRepository.cpp.o [ 69%] Building CXX object ycm/CMakeFiles/ycm_core.dir/Candidate.cpp.o [ 71%] Building CXX object ycm/CMakeFiles/ycm_core.dir/CandidateRepository.cpp.o [ 73%] Building CXX object ycm/CMakeFiles/ycm_core.dir/Utils.cpp.o [ 75%] Building CXX object ycm/CMakeFiles/ycm_core.dir/Word.cpp.o [ 76%] Building CXX object ycm/CMakeFiles/ycm_core.dir/versioning.cpp.o [ 78%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/ClangUtils.cpp.o [ 80%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/CompilationDatabase.cpp.o [ 82%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/TranslationUnitStore.cpp.o [ 84%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/ClangCompleter.cpp.o [ 86%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/ClangHelpers.cpp.o [ 88%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/Range.cpp.o [ 90%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/Documentation.cpp.o [ 92%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/CompletionData.cpp.o [ 94%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/TranslationUnit.cpp.o [ 96%] Building CXX object ycm/CMakeFiles/ycm_core.dir/IdentifierDatabase.cpp.o [ 98%] Building CXX object ycm/CMakeFiles/ycm_core.dir/PythonSupport.cpp.o [100%] Linking CXX shared library /home/przemek/.vim/bundle/YouCompleteMe/third_party/ycmd/ycm_core.so [100%] Built target ycm_core -- The C compiler identification is GNU 5.4.0 -- 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 -- Detecting C compile features -- Detecting C compile features - done -- Found PythonLibs: /usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.so (found version "2.7.12") -- Configuring done -- Generating done -- Build files have been written to: /tmp/regex_build_GCz0Sk Scanning dependencies of target _regex [ 66%] Building C object CMakeFiles/_regex.dir/regex_2/_regex.c.o [ 66%] Building C object CMakeFiles/_regex.dir/regex_2/_regex_unicode.c.o [100%] Linking C shared library /home/przemek/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/cregex/regex_2/_regex.so [100%] Built target _regex

`

JoshuaSBrown commented 5 years ago

So I ran into this problem to, when trying to run it with a c++ repository but it turns out it was because I was not in the same directory as the CMakeLists.txt file. At least I think that is what the problem was. And I had not built the project prior to running :YcmGenerateConfig.

pBlasiak commented 5 years ago

Thank you for advice It really helped I ran now this ./config_gen.py --verbose ~/OpenFOAM/przemek-v1612+/applications/solvers/multiphase/interFoam but I got this error:

Found OpenFOAM Make/options

Running wmake... $ wmake wmake error: environment variable $WM_OPTIONS not set Build completed in 0.01 sec

Collected 0 relevant entries for C compilation (0 discarded). Collected 0 relevant entries for C++ compilation (0 discarded).

ERROR: No commands were logged to the build logs (C: /tmp/tmpxLKLKL, C++: /tmp/tmpA1G4_a). Your build system may not be compatible.

but then I ran this with -e flag ./config_gen.py -e ~/OpenFOAM/przemek-v1612+/applications/solvers/multiphase/interFoam

and it works now :)

Found OpenFOAM Make/options

Running wmake... $ wmake Build completed in 0.62 sec

Collected 0 relevant entries for C compilation (0 discarded). Collected 2 relevant entries for C++ compilation (0 discarded). Created YCM config file with 28 C++ flags

Press ENTER or type command to continue

ps for OpenFOAM useres it is important to firstly load OF environments e.g. like this https://www.cfd-online.com/Forums/blogs/wyldckat/931-advanced-tips-working-openfoam-shell-environment.html

pBlasiak commented 4 years ago

additionally it is important to delete linux* old compilations from Make directory than in main directory of a solver one can apply in vim :YcmGenerateConfig -e for me it works