root-project / root

The official repository for ROOT: analyzing, storing and visualizing big data, scientifically
https://root.cern
Other
2.66k stars 1.27k forks source link

CMake exits complaining `ROOT must be built out-of-source` even when building out-of-source #14159

Closed ShamrockLee closed 10 months ago

ShamrockLee commented 10 months ago

Check duplicate issues.

Description

CMake complains

$ cmake ../root
CMake Error at CMakeLists.txt:20 (message):
   ROOT must be built out-of-source.
   Please see README/INSTALL for more information.

-- Configuring incomplete, errors occurred!

and exit with status 1 even when building out-of-source as instructed by README/INSTALL.

Reproducer

  1. Run

    ssh <username>@lxplus8.cern.ch
    git clone https://github.com/root-project/root.git
    mkdir root-build.foo
    cd root-build.foo
    cmake ../root
  2. See the error described above.

ROOT version

Git branch: master Git revision: 2ee691da61ca51e4dd857ac8c88f778948fb49a7

Installation method

Out-of-tree build using CMake 3

Operating system

LXPLUS8 (CentOS Stream 8, x86_64-linux)

Additional context

NAME="Red Hat Enterprise Linux"
VERSION="8.9 (Ootpa)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="8.9"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Red Hat Enterprise Linux 8.9 (Ootpa)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:8::baseos"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_BUGZILLA_PRODUCT_VERSION=8.9
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.9"
bellenot commented 10 months ago

FYI, I tried on two different platforms (Windows and Ubuntu) and cannot reproduce this issue. And here is the output on lxplus8:

[bellenot@lxplus803 ~/temp]$ git clone https://github.com/root-project/root.git
Cloning into 'root'...
remote: Enumerating objects: 886380, done.
remote: Counting objects: 100% (40490/40490), done.
remote: Compressing objects: 100% (3412/3412), done.
remote: Total 886380 (delta 38265), reused 37097 (delta 37076), pack-reused 845890
Receiving objects: 100% (886380/886380), 973.60 MiB | 7.50 MiB/s, done.
Resolving deltas: 100% (645163/645163), done.
Updating files: 100% (22793/22793), done.
[bellenot@lxplus803 ~/temp]$ mkdir root-build.foo
[bellenot@lxplus803 ~/temp]$ cd root-build.foo
[bellenot@lxplus803 root-build.foo]$ cmake ../root
-- The C compiler identification is GNU 8.5.0
-- The CXX compiler identification is GNU 8.5.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 Git: /usr/bin/git (found version "2.39.3")
-- Building ROOT version 6.31.01
-- Checking internet connectivity
-- Checking internet connectivity - found
-- Looking for Python
-- Found Python3: /usr/bin/python3.8 (found version "3.8.17") found components: Interpreter Development NumPy Development.Module Development.Embed
-- Found GCC. Major version 8, minor version 5
-- The default C++ standard in use by the detected compiler (/usr/bin/c++) is lower than C++17. Setting C++17 as the minimum standard.
-- 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
-- Performing Test GLIBCXX_USE_CXX11_ABI
-- Performing Test GLIBCXX_USE_CXX11_ABI - Success
-- ROOT Platform: linux
-- ROOT Compiler: GNU 8.5.0
-- ROOT Processor: x86_64
-- ROOT Architecture: linuxx8664gcc
-- Build Type: 'Release' (flags = '-O3 -DNDEBUG')
-- Compiler Flags:  -std=c++17 -Wno-implicit-fallthrough -Wno-noexcept-type -pipe  -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -pthread -O3 -DNDEBUG
-- ROOT default compression algorithm: zlib
-- Cannot enable cudnn without enabling cuda or tmva-gpu: cudnn is disabled.
-- PyROOT will be built for version 3.8.17
-- Looking for ZLib
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.11")
-- Looking for nlohmann/json.hpp
-- nlohmann/json.hpp not found. Switching on builtin_nlohmannjson option
-- Looking for Freetype
-- Found Freetype: /usr/lib64/libfreetype.so (found version "2.9.1")
-- Looking for PCRE
-- Found PCRE: /usr/include (found version "8.42")
-- Looking for LZMA
-- Looking for lzma_auto_decoder in /usr/lib64/liblzma.so
-- Looking for lzma_auto_decoder in /usr/lib64/liblzma.so - found
-- Looking for lzma_easy_encoder in /usr/lib64/liblzma.so
-- Looking for lzma_easy_encoder in /usr/lib64/liblzma.so - found
-- Looking for lzma_lzma_preset in /usr/lib64/liblzma.so
-- Looking for lzma_lzma_preset in /usr/lib64/liblzma.so - found
-- Found LibLZMA: /usr/lib64/liblzma.so (found version "5.2.4")
-- Looking for xxHash
-- Could NOT find xxHash (missing: xxHash_LIBRARY xxHash_INCLUDE_DIR)
-- xxHash not found. Switching on builtin_xxhash option
-- Looking for ZSTD
-- Found ZSTD: /usr/lib64/libzstd.so
-- Looking for LZ4
-- Found LZ4: /usr/lib64/liblz4.so (found version "1.8.3")
-- Looking for X11
-- Found X11: /usr/include
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- X11_INCLUDE_DIR: /usr/include
-- X11_LIBRARIES: /usr/lib64/libSM.so;/usr/lib64/libICE.so;/usr/lib64/libX11.so;/usr/lib64/libXext.so
-- X11_Xpm_INCLUDE_PATH: /usr/include
-- X11_Xpm_LIB: /usr/lib64/libXpm.so
-- X11_Xft_INCLUDE_PATH: /usr/include
-- X11_Xft_LIB: /usr/lib64/libXft.so
-- X11_Xext_INCLUDE_PATH: /usr/include
-- X11_Xext_LIB: /usr/lib64/libXext.so
-- Could NOT find GIF (missing: GIF_LIBRARY GIF_INCLUDE_DIR)
-- Found TIFF: /usr/lib64/libtiff.so (found version "4.0.9")
-- Found PNG: /usr/lib64/libpng.so (found version "1.6.34")
-- Found JPEG: /usr/lib64/libjpeg.so (found version "62")
-- Looking for AfterImage
-- Could NOT find AfterImage (missing: AFTERIMAGE_INCLUDE_DIR AFTERIMAGE_LIBRARIES)
-- AfterImage not found. Switching on builtin_afterimage option
-- Building AfterImage library included in ROOT itself
-- Looking for OpenGL
-- Found OpenGL: /usr/lib64/libOpenGL.so
-- Looking for GLEW
-- Found GLEW: /usr/include (found version "2.0.0")
-- Looking for gl2ps
-- Could NOT find gl2ps (missing: GL2PS_LIBRARY GL2PS_INCLUDE_DIR)
-- gl2ps not found. Switching on builtin_gl2ps option
-- Looking for LibXml2
-- Found LibXml2: /usr/lib64/libxml2.so (found version "2.9.7")
-- Found OpenSSL: /usr/lib64/libcrypto.so (found version "1.1.1k")
-- Looking for MySQL
-- Could NOT find MySQL (missing: MYSQL_INCLUDE_DIR MYSQL_LIBRARIES)
-- MySQL not found. Switching off mysql option
-- Looking for PostgreSQL
-- Could NOT find PostgreSQL (missing: PostgreSQL_LIBRARY PostgreSQL_INCLUDE_DIR)
-- PostgreSQL not found. Switching off pgsql option
-- Looking for SQLite
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.4.2")
-- Found Sqlite: /usr/include
-- Looking for CFITSIO
-- Could NOT find CFITSIO (missing: CFITSIO_LIBRARY CFITSIO_INCLUDE_DIR)
-- CFITSIO not found. You can enable the option 'builtin_cfitsio' to build the library internally'
--                    For the time being switching off 'fitsio' option
-- Looking for XROOTD
-- Found Xrootd version num: 5.6.3 (setting -DROOTXRDVERS=500060003)
--              libXrdMain not found: xproofd will be a wrapper around xrootd
--              libXrdClient not found: use built-in
--              include_dirs: /usr/include/xrootd;/afs/cern.ch/user/b/bellenot/temp/root/proof/xrdinc
--              libraries: /usr/lib64/libXrdUtils.so;/usr/lib64/libXrdCl.so
-- Could NOT find FTGL (missing: FTGL_INCLUDE_DIR FTGL_LIBRARY)
-- ftgl library not found. Set variable FTGL_ROOT_DIR to point to your installation
-- For the time being switching ON 'builtin_ftgl' option
-- Checking for module 'davix>=0.6.4'
--   Package 'davix', required by 'virtual:world', not found
-- Looking for uuid_generate_random in uuid
-- Looking for uuid_generate_random in uuid - found
-- Found libuuid: /usr/include
-- Davix not found, switching ON 'builtin_davix' option.
-- Looking for clock_gettime
-- Looking for clock_gettime - found
-- Looking for TBB
-- Found TBB: /usr (found suitable version "2018.0", minimum required is "2018")
-- Performing Test tbb_exception_result
-- Performing Test tbb_exception_result - Success
-- Looking for VDT
-- Could NOT find Vdt (missing: VDT_INCLUDE_DIR VDT_LIBRARY) (Required is at least version "0.4")
-- VDT not found. Ensure that the installation of VDT is in the CMAKE_PREFIX_PATH
--                Switching ON 'builtin_vdt' option
-- Looking for BLAS for optional parts of TMVA
-- Looking for sgemm_
-- Looking for sgemm_ - not found
-- Looking for sgemm_
-- Looking for sgemm_ - found
-- Found BLAS: /usr/lib64/libopenblas.so
-- Performing Test ROOT_HAVE_CXX_ATOMICS_WITHOUT_LIB
-- Performing Test ROOT_HAVE_CXX_ATOMICS_WITHOUT_LIB - Success
-- Building LLVM in 'Release' mode.
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- clang project is enabled
-- clang-tools-extra project is disabled
-- compiler-rt project is disabled
-- cross-project-tests project is disabled
-- libc project is disabled
-- libclc project is disabled
-- libcxx project is disabled
-- libcxxabi project is disabled
-- libunwind project is disabled
-- lld project is disabled
-- lldb project is disabled
-- mlir project is disabled
-- openmp project is disabled
-- parallel-libs project is disabled
-- polly project is disabled
-- pstl project is disabled
-- flang project is disabled
-- Looking for backtrace
-- Looking for backtrace - found
-- backtrace facility detected in default set of libraries
-- Found Backtrace: /usr/include
-- Native target architecture is X86
-- Threads disabled.
-- Doxygen disabled.
-- Go bindings disabled.
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- OCaml bindings disabled.
-- Could NOT find Python module pygments
-- Could NOT find Python module pygments.lexers.c_cpp
-- Could NOT find Python module yaml
-- LLVM host triple: x86_64-unknown-linux-gnu
-- LLVM default target triple: x86_64-unknown-linux-gnu
-- Building with -fPIC
-- Found Python3: /usr/bin/python3.8 (found suitable version "3.8.17", minimum required is "3.0") found components: Interpreter
-- Linker detection: GNU ld
-- Targeting X86
-- Targeting NVPTX
-- Clang version: 13.0.0
-- Not building amdgpu-arch: hsa-runtime64 not found
-- Building Cling as part of ROOT
-- Cling version (from VERSION file): ROOT_1.0~dev
-- Cling will look for C++ headers in '/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8:/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/x86_64-redhat-linux:/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/backward' at runtime.
-- And then fallback to: 'c++'
-- Performing Test CXX_HAS_fno_rtti
-- Performing Test CXX_HAS_fno_rtti - Success
-- Performing Test C_HAS_Wno_strict_overflow
-- Performing Test C_HAS_Wno_strict_overflow - Success
-- Performing Test C_HAS_Wno_maybe_uninitialized
-- Performing Test C_HAS_Wno_maybe_uninitialized - Success
-- Performing Test C_HAS_Wno_parentheses_equality
-- Performing Test C_HAS_Wno_parentheses_equality - Success
-- Looking for m
-- Looking for m - not found
-- Use SSL API VERSION 1.1 for civetweb
-- Performing Test GCC_HAS_BIDI_CHARS_FLAG
-- Performing Test GCC_HAS_BIDI_CHARS_FLAG - Success
-- Distributed RDataFrame enabled
-- Looking for RapidYAML (used by RooFit)
-- Could NOT find ryml (missing: RYML_LIBRARY RYML_INCLUDE_DIR)
-- RapidYAML not found, only compiling RooFit with nlohmann-json parser
-- Performing Test found_setresuid
-- Performing Test found_setresuid - Success
-- Performing Test found_attribute_always_inline
-- Performing Test found_attribute_always_inline - Success
-- Performing Test has_found_attribute_noinline
-- Performing Test has_found_attribute_noinline - Success
-- Performing Test found_hardware_interference_size
-- Performing Test found_hardware_interference_size - Failed
Running /afs/cern.ch/user/b/bellenot/temp/root/build/unix/compiledata.sh
Making /afs/cern.ch/user/b/bellenot/temp/root-build.foo/ginclude/compiledata.h
-- ROOT Configuration

System          Linux-4.18.0-513.5.1.el8_9.x86_64
Processor       10 core Intel Core Processor (Broadwell, no TSX, IBRS) (x86_64)
Build type      Release
Install path    /usr/local
Compiler        GNU 8.5.0
Compiler flags:
C                -Wno-implicit-fallthrough -pipe -Wall -W -pthread -O3 -DNDEBUG
C++              -std=c++17 -Wno-implicit-fallthrough -Wno-noexcept-type -pipe  -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -pthread -O3 -DNDEBUG
Linker flags:
Executable       -rdynamic
Module
Shared           -Wl,--no-undefined -Wl,--hash-style="both"

-- Enabled support for:  asimage builtin_afterimage builtin_clang builtin_cling builtin_davix builtin_ftgl builtin_gl2ps builtin_llvm builtin_nlohmannjson builtin_openui5 builtin_vdt builtin_xxhash clad dataframe davix gdml http imt opengl proof pyroot roofit webgui root7 rpath runtime_cxxmodules shared sqlite ssl tmva tmva-cpu tmva-pymva spectrum vdt x11 xml xrootd
-- Configuring done
-- Generating done
-- Build files have been written to: /afs/cern.ch/user/b/bellenot/temp/root-build.foo
[bellenot@lxplus803 root-build.foo]$
ShamrockLee commented 10 months ago

Oops! Let me try again.

ShamrockLee commented 10 months ago

After checking git status, I saw some untracked files and directories prefixed CMake. Not sure when they were generated, and they stays silent during git switch.

Cleaning with git add . && git reset --hard, and it works again.

Sorry for bothering, and thank you for helping out.

bellenot commented 10 months ago

After checking git status, I saw some untracked files and directories prefixed CMake. Not sure when they were generated, and they stays silent during git switch.

Sorry for bothering, and thank you for helping out.

You're welcome! And glad you found the problem. Closing this issue.