microsoft / verona

Research programming language for concurrent ownership

Home Page:https://microsoft.github.io/verona/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build error on ubuntu 18.04 server with CMake 3.19.3

Reisande opened this issue · comments

commented

I am trying to build verona, and I believe I have most of the requirements at this point. However I am getting this very non descriptive error in step 4/8 of the call to ninja:

-- Configuring incomplete, errors occurred! See also "/home/misha/verona/src/CMakeFiles/CMakeOutput.log". FAILED: verona-prefix/src/verona-stamp/verona-configure cd /home/misha/verona/build_ninja/verona-prefix/src/verona-build && /usr/local/bin/cmake -DCLANG_FORMAT=/usr/bin/clang-format-9 -DCMAKE_ADDR2LINE=/usr/bin/addr2line -DCMAKE_AR=/usr/bin/ar -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CACHEFILE_DIR=/home/misha/verona/build_ninja -DCMAKE_CACHE_MAJOR_VERSION=3 -DCMAKE_CACHE_MINOR_VERSION=19 -DCMAKE_CACHE_PATCH_VERSION=3 -DCMAKE_COMMAND=/usr/local/bin/cmake -DCMAKE_CPACK_COMMAND=/usr/local/bin/cpack -DCMAKE_CTEST_COMMAND=/usr/local/bin/ctest -DCMAKE_CXX_COMPILER=/usr/bin/c++ -DCMAKE_CXX_COMPILER_AR=/usr/bin/llvm-ar-6.0 -DCMAKE_CXX_COMPILER_RANLIB=/usr/bin/llvm-ranlib-6.0 -DCMAKE_CXX_FLAGS= -DCMAKE_CXX_FLAGS_DEBUG=-g "-DCMAKE_CXX_FLAGS_MINSIZEREL=-Os -DNDEBUG" "-DCMAKE_CXX_FLAGS_RELEASE=-O3 -DNDEBUG" "-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-O2 -g -DNDEBUG" -DCMAKE_DLLTOOL=CMAKE_DLLTOOL-NOTFOUND -DCMAKE_EXECUTABLE_FORMAT=ELF -DCMAKE_EXE_LINKER_FLAGS= -DCMAKE_EXE_LINKER_FLAGS_DEBUG= -DCMAKE_EXE_LINKER_FLAGS_MINSIZEREL= -DCMAKE_EXE_LINKER_FLAGS_RELEASE= -DCMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO= -DCMAKE_EXPORT_COMPILE_COMMANDS=OFF -DCMAKE_EXTRA_GENERATOR= -DCMAKE_GENERATOR=Ninja -DCMAKE_GENERATOR_INSTANCE= -DCMAKE_GENERATOR_PLATFORM= -DCMAKE_GENERATOR_TOOLSET= -DCMAKE_INSTALL_SO_NO_EXE=1 -DCMAKE_LINKER=/usr/bin/ld -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja -DCMAKE_MODULE_LINKER_FLAGS= -DCMAKE_MODULE_LINKER_FLAGS_DEBUG= -DCMAKE_MODULE_LINKER_FLAGS_MINSIZEREL= -DCMAKE_MODULE_LINKER_FLAGS_RELEASE= -DCMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO= -DCMAKE_NM=/usr/bin/nm -DCMAKE_NUMBER_OF_MAKEFILES=2 -DCMAKE_OBJCOPY=/usr/bin/objcopy -DCMAKE_OBJDUMP=/usr/bin/objdump -DCMAKE_PLATFORM_INFO_INITIALIZED=1 -DCMAKE_PROJECT_DESCRIPTION= -DCMAKE_PROJECT_HOMEPAGE_URL= -DCMAKE_PROJECT_NAME=verona -DCMAKE_RANLIB=/usr/bin/ranlib -DCMAKE_READELF=/usr/bin/readelf -DCMAKE_ROOT=/usr/local/share/cmake-3.19 -DCMAKE_SHARED_LINKER_FLAGS= -DCMAKE_SHARED_LINKER_FLAGS_DEBUG= -DCMAKE_SHARED_LINKER_FLAGS_MINSIZEREL= -DCMAKE_SHARED_LINKER_FLAGS_RELEASE= -DCMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO= -DCMAKE_SKIP_INSTALL_RPATH=NO -DCMAKE_SKIP_RPATH=NO -DCMAKE_STATIC_LINKER_FLAGS= -DCMAKE_STATIC_LINKER_FLAGS_DEBUG= -DCMAKE_STATIC_LINKER_FLAGS_MINSIZEREL= -DCMAKE_STATIC_LINKER_FLAGS_RELEASE= -DCMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO= -DCMAKE_STRIP=/usr/bin/strip -DCMAKE_UNAME=/bin/uname -DCMAKE_VERBOSE_MAKEFILE=FALSE -DENABLE_ASSERTS=OFF -DFILECHECK=/home/misha/.local/bin/OutputCheck "-DFIND_PACKAGE_MESSAGE_DETAILS_Git=[/usr/bin/git][v2.17.1()]" "-DFIND_PACKAGE_MESSAGE_DETAILS_Python3=[/usr/bin/python3.6][cfound components: Interpreter ][v3.6.9()]" -DGIT_EXECUTABLE=/usr/bin/git -DProcessorCount_cmd_getconf=/usr/bin/getconf -DProcessorCount_cmd_nproc=/usr/bin/nproc -DProcessorCount_cmd_sysctl=/sbin/sysctl -DUSE_ASAN=OFF -DUSE_CRASH_LOGGING=OFF -DUSE_SCHED_STATS=OFF -DUSE_SYSTEMATIC_TESTING=OFF -DVERONA_CI_BUILD=OFF -D_Python3_EXECUTABLE=/usr/bin/python3.6 -D_Python3_INTERPRETER_PROPERTIES=Python 3 6 9 64 m cpython-36m-x86_64-linux-gnu /usr/lib/python3.6 /usr/lib/python3.6 /usr/lib/python3.6/site-packages /usr/lib/python3.6/site-packages -D_Python3_INTERPRETER_SIGNATURE=f52291214427087aac30502e37c88f84 -Dverona_BINARY_DIR=/home/misha/verona/build_ninja -Dverona_SOURCE_DIR=/home/misha/verona -DVERONA_LLVM_LOCATION=/home/misha/verona/build_ninja/Debug/mlir/install -DCMAKE_INSTALL_PREFIX=/home/misha/verona/build_ninja/dist/ -GNinja /home/misha/verona/src && /usr/local/bin/cmake -E touch /home/misha/verona/build_ninja/verona-prefix/src/verona-stamp/verona-configure ninja: build stopped: subcommand failed.

The log file is not very helpful either; it is saying that everything succeeds with 0. The cmake lines cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug and cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release pass successfully, but the error occurs(the only difference is that for the release build the error is at stage 5/9).

Hi @Reisande,

It seems the problem is in the Verona CMake, not the top-level, so the answer might be in /home/misha/verona/build_ninja/verona-prefix/src/verona-build/CMakeFiles/CMakeOutput.log instead.

We have created a layered build that first builds (or downloads) LLVM then builds Verona. So the top-level CMake run doesn't do much, only prepares both sub-projects. When you call ninja, the top-level build calls cmake on external-prefix (which prepares LLVM) and verona-prefix which builds Verona.

Step 4 is:
[4/8] Performing configure step for 'verona'

Which is running Verona's CMake on verona-prefix/src/verona-build. You could look at the log file I mention above, or even go into that directory and run cmake by hand and see what the error is.

Hope this helps.

commented

It seems that this cmake file is fine as well. Here is the mentioned file. When I ran cmake ./ -GNinja -DCMAKE_BUILD_TYPE=Debug on build_ninja/verona-prefix/src/verona-build, it succeeded as well with the following output

-- Build Type for Verona Debug
-- Build types Release;Debug;RelWithDebInfo
-- Version: 6.2.0
-- Build type: Debug
-- CXX_STANDARD: 17
-- Required features: cxx_variadic_templates
CMake Deprecation Warning at /home/misha/verona/external/pegmatite/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Setting LLVM_DIR as /home/misha/verona/build_ninja/Debug/mlir/install/lib/cmake/llvm
-- Setting MLIR_DIR as /home/misha/verona/build_ninja/Debug/mlir/install/lib/cmake/mlir
-- Setting LLVM_EXTERNAL_LIT as /home/misha/verona/build_ninja/Debug/mlir/install/bin/llvm-lit
-- Using MLIRConfig.cmake in: /home/misha/verona/build_ninja/Debug/mlir/install/lib/cmake/mlir
-- Using LLVMConfig.cmake in: /home/misha/verona/build_ninja/Debug/mlir/install/lib/cmake/llvm
-- Building with -fPIC
-- Configuring done
-- Generating done
-- Build files have been written to: /home/misha/verona/build_ninja/verona-prefix/src/verona-build

and the build files seem fine. When I reran ninja in build_ninja/, the errors still occurred, and produced the same output file. For the build, what versions of clang and cmake are used?

commented

Also, I doubt this changes anything, but I am running Ubuntu server instead of Ubuntu desktop

When I reran ninja in build_ninja/, the errors still occurred, and produced the same output file.

The error you pasted in the first message is a CMake line, running on build_ninja but building inside the Verona dir. What happens if you run that again, by hand on build_ninja? (don't forget to quote the CMake options with spaces as the dump here didn't).

One thing I noticed is that you said step 4/9 and 5/9 and I read 4/8. The error could be somewhere else. Since the CMake log doesn't give us anything, can you start from scratch and paste the output of CMake to the console? There must be some kind of error we're not seeing.

For the build, what versions of clang and cmake are used?

We use clang 9, gcc 7.9 and CMake 3.x (can't remember the exact version) in our CI build.

I use clang 11, gcc 10.2 and CMake 3.19.3 on my Arch Linux. Anything in between should work fine.

Also, I doubt this changes anything, but I am running Ubuntu server instead of Ubuntu desktop

Other than maybe the versions of tools, it shouldn't.

commented

It seems like this is the main issue I found when I reran from scratch:

CMake Error at /usr/local/share/cmake-3.19/Modules/FindPython/Support.cmake:1802 (list):
  list index: 1 out of range (-1, 0)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.19/Modules/FindPython3.cmake:398 (include)
  testsuite/CMakeLists.txt:11 (find_package)


CMake Error at /usr/local/share/cmake-3.19/Modules/FindPython/Support.cmake:1803 (list):
  list index: 2 out of range (-1, 0)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.19/Modules/FindPython3.cmake:398 (include)
  testsuite/CMakeLists.txt:11 (find_package)


CMake Error at /usr/local/share/cmake-3.19/Modules/FindPython/Support.cmake:1804 (list):
  list index: 3 out of range (-1, 0)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.19/Modules/FindPython3.cmake:398 (include)
  testsuite/CMakeLists.txt:11 (find_package)


CMake Error at /usr/local/share/cmake-3.19/Modules/FindPython/Support.cmake:1806 (list):
  list index: 4 out of range (-1, 0)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.19/Modules/FindPython3.cmake:398 (include)
  testsuite/CMakeLists.txt:11 (find_package)


CMake Error at /usr/local/share/cmake-3.19/Modules/FindPython/Support.cmake:1809 (list):
  list index: 5 out of range (-1, 0)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.19/Modules/FindPython3.cmake:398 (include)
  testsuite/CMakeLists.txt:11 (find_package)


CMake Error at /usr/local/share/cmake-3.19/Modules/FindPython/Support.cmake:1810 (list):
  list index: 6 out of range (-1, 0)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.19/Modules/FindPython3.cmake:398 (include)
  testsuite/CMakeLists.txt:11 (find_package)


CMake Error at /usr/local/share/cmake-3.19/Modules/FindPython/Support.cmake:1812 (list):
  list index: 7 out of range (-1, 0)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.19/Modules/FindPython3.cmake:398 (include)
  testsuite/CMakeLists.txt:11 (find_package)


CMake Error at /usr/local/share/cmake-3.19/Modules/FindPython/Support.cmake:1813 (list):
  list index: 8 out of range (-1, 0)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.19/Modules/FindPython3.cmake:398 (include)
  testsuite/CMakeLists.txt:11 (find_package)


CMake Error at /usr/local/share/cmake-3.19/Modules/FindPython/Support.cmake:1814 (list):
  list index: 9 out of range (-1, 0)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.19/Modules/FindPython3.cmake:398 (include)
  testsuite/CMakeLists.txt:11 (find_package)


CMake Error at /usr/local/share/cmake-3.19/Modules/FindPython/Support.cmake:1815 (list):
  list index: 10 out of range (-1, 0)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.19/Modules/FindPython3.cmake:398 (include)
  testsuite/CMakeLists.txt:11 (find_package)

This might be an error with my CMake, because I have python3. I will downgrade to see if it helps, but I doubt it because I use the same cmake version as you. I can try and rebuild the ci pipeline on my machine though, or create a docker container if this doesn't work manually. I might be digging myself into an unnecessary rabbit hole, though.
A bit of searching found this stackoverflow post which may be helpful

commented

The previous stackoverflow post did not help either, and for some reason on the new, clean build the build_ninja/verona-prefix/src/verona-build folder is empty. You read it correctly from the beginning though. My build fails on step 4/8 on debug, and 5/9 on release mode.

The stack overflow error is different than yours. Theirs show explicitly it couldn't find Python, while on yours, it's a logical error on the CMake file itself. Neither of the files, though, are in Verona, but CMake itself. Honestly, I have never seen that error.

Perhaps investigating those files on the lines pointed by the error might give you a clue of what the problem is. Perhaps removing, wiping and re-installing CMake would help? I'm really not sure.

commented

I fixed it. I am not sure if it was because of a faulty CMake or something else. Since I was running this in a VM I just wiped it and rebuilt from scratch using 3.19.4 and it worked.