root icon indicating copy to clipboard operation
root copied to clipboard

[FreeBSD] recent master build failure (clad)

Open mkrzewic opened this issue 5 months ago • 21 comments

Check duplicate issues.

  • [X] Checked for duplicates

Description

Hi, build craps out as seen below. Reasonably standard build, the only difference from (my) usual is that I have no preinstalled xrootd, no idea if that is related. I've seen similar issues on 13.2-RELEASE. Something makes it think it is seeing llvm2 (system has 16, not sure what root builds - 14? 15?)

[ 51%] Performing configure step for 'clad'
CMake Error at /home/mkrzewic/build/root/interpreter/cling/tools/plugins/clad/clad-prefix/src/clad-stamp/clad-configure-Release.cmake:37 (message):
  Command failed: 1

   '/usr/local/bin/cmake' '-G' 'Unix Makefiles' '-DCMAKE_BUILD_TYPE=Release' '-DCMAKE_C_COMPILER=/usr/bin/cc' '-DCMAKE_C_FLAGS= -pipe -Wall -W -pthread -fPIC' '-DCMAKE_CXX_COMPILER=/usr/bin/c++' '-DCMAKE_CXX_FLAGS= -Wc++11-narrowing -Wsign-compare -Wsometimes-uninitialized -Wconditional-uninitialized -Wheader-guard -Warray-bounds -Wcomment -Wtautological-compare -Wstrncat-size -Wloop-analysis -Wbool-conversion -pipe  -Wall -W -Woverloaded-virtual -fsigned-char -pthread -fno-semantic-interposition   -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-strict-aliasing -Wwrite-strings -Wno-shadow -Wno-unused-parameter -Wno-deprecated-declarations -fPIC -fno-rtti' '-DCMAKE_INSTALL_PREFIX=/home/mkrzewic/build/root/etc/cling//plugins' '-DLLVM_DIR=/home/mkrzewic/build/root/interpreter/llvm-project/llvm' '-DCLANG_INCLUDE_DIRS=/home/mkrzewic/src/root/interpreter/llvm-project/clang/include' '/home/mkrzewic/build/root/interpreter/llvm-project/llvm/tools/clang//include' '-DCMAKE_CXX_STANDARD=17' '-DClang_DIR=/home/mkrzewic/build/root/interpreter/llvm-project/llvm/tools/clang/' '-DClang_CONFIG_EXTRA_PATH_HINTS=' '-DLLVM_FORCE_USE_OLD_TOOLCHAIN=ON' '-DCLAD_BUILD_STATIC_ONLY=ON' '-GUnix Makefiles' '-S' '/home/mkrzewic/build/root/interpreter/cling/tools/plugins/clad/clad-prefix/src/clad' '-B' '/home/mkrzewic/build/root/interpreter/cling/tools/plugins/clad/clad-prefix/src/clad-build'

  See also

    /home/mkrzewic/build/root/interpreter/cling/tools/plugins/clad/clad-prefix/src/clad-stamp/clad-configure-*.log


-- stdout output is:
-- Configuring incomplete, errors occurred!

-- stderr output is:
CMake Warning:
  Ignoring extra path from command line:

   "/home/mkrzewic/build/root/interpreter/llvm-project/llvm/tools/clang/include"


CMake Warning:
  Ignoring extra path from command line:

   "/home/mkrzewic/build/root/interpreter/llvm-project/llvm/tools/clang//include"


CMake Error at CMakeLists.txt:86 (message):
  Found unsupported version: LLVM 2.13.2;

  Please set LLVM_DIR pointing to the llvm version 5.0 to 16.0.x build or
  installation folder



CMake Error at /home/mkrzewic/build/root/interpreter/cling/tools/plugins/clad/clad-prefix/src/clad-stamp/clad-configure-Release.cmake:47 (message):
  Stopping after outputting logs.


gmake[2]: *** [interpreter/cling/tools/plugins/clad/CMakeFiles/clad.dir/build.make:92: interpreter/cling/tools/plugins/clad/clad-prefix/src/clad-stamp/clad-configure] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:44491: interpreter/cling/tools/plugins/clad/CMakeFiles/clad.dir/all] Error 2
gmake: *** [Makefile:166: all] Error 2

Reproducer

cmake ../../src/root -Droottest=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo cmake --build .

ROOT version

master@0afffc6fc9

Installation method

source

Operating system

FreeBSD 14.0-RELEASE

Additional context

No response

mkrzewic avatar Jan 30 '24 21:01 mkrzewic

Can you upload /home/mkrzewic/build/root/interpreter/cling/tools/plugins/clad/clad-prefix/src/clad-stamp/clad-configure-*.log

pcanal avatar Jan 30 '24 23:01 pcanal

Can you upload maybe a docker image or could give me a bot where I can ssh into?

vgvassilev avatar Jan 31 '24 08:01 vgvassilev

@pcanal added logs clad-configure-err.log clad-configure-out.log

mkrzewic avatar Jan 31 '24 16:01 mkrzewic

@vgvassilev It runs in jail, I could pack it up in an image, but you'd need FreeBSD 14 to run it - but then it would be much less work to just start the process directly there sinceit's just a completely fresh vanilla installation (plus a few binary packages) If the problem is interesting enough I could give you access to the jail via a reverse ssh tunnel or so as I don't have a public ip. We'd need a proxy though, there seem to be some free public ones but I never used those.

mkrzewic avatar Jan 31 '24 17:01 mkrzewic

So the error is:

CMake Error at CMakeLists.txt:86 (message):
  Found unsupported version: LLVM 2.13.2;

  Please set LLVM_DIR pointing to the llvm version 5.0 to 16.0.x build or
  installation folder

pcanal avatar Jan 31 '24 17:01 pcanal

I find it hard to believe that there is llvm v2.13 installed somewhere...

vgvassilev avatar Jan 31 '24 17:01 vgvassilev

@vgvassilev there is not. llvm14 is installed as a dependency for numba, llvm16 is part of the base system. Plus whatever root builds and passes to it's builtins.

mkrzewic avatar Jan 31 '24 17:01 mkrzewic

Is there any way to get a similar setup to debug?

vgvassilev avatar Jan 31 '24 19:01 vgvassilev

well, I guess the exact same setup can be had by installing 14.0-RELEASE and installing the packages I did: pkg install autotools bash boost-all ccache cmake davix distcc doas freebsd-doc-en fftw3 fzf git gmake groff gsl krb5 libXft libXpm libbacktrace liblz4 libzmq4 lzma lzmalib neovim pcre pkg py-numba py-numpy py-pandas py-pip py-pytest py-statsmodels py-xarray python ripgrep rsync rust tig tmux valgrind vdt xblas zlib-ng I guess you would not need all of those, but there's a full list for completeness sake

mkrzewic avatar Jan 31 '24 19:01 mkrzewic

Is there a recommended docker image that I can start from to get as close as possible to your os?

vgvassilev avatar Jan 31 '24 20:01 vgvassilev

docker image no, not really, you'd need a freebsd system to run it on plus I hear docker is not quite stable here. A VM would work fine: http://ftp.freebsd.org/pub/FreeBSD/releases/VM-IMAGES/14.0-RELEASE/amd64/Latest/

My system is fully zfs, so i guess you could pick one of the images with zfs in the name...

mkrzewic avatar Jan 31 '24 20:01 mkrzewic

@mkrzewic, I've landed a new version of clad in the master. Can you check if it still breaks for you?

vgvassilev avatar Feb 12 '24 22:02 vgvassilev

@vgvassilev thanks, but there is no change, same error. I am also getting cmake warnings:

  The OLD behavior for policy CMP0114 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  interpreter/llvm-project/llvm/CMakeLists.txt:6 (include)


CMake Deprecation Warning at interpreter/llvm-project/cmake/Modules/CMakePolicy.cmake:11 (cmake_policy):
  The OLD behavior for policy CMP0116 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  interpreter/llvm-project/llvm/CMakeLists.txt:6 (include)

CMake Warning (dev) at /home/mkrzewic/src/roottest/CMakeLists.txt:132 (exec_program):
  Policy CMP0153 is not set: The exec_program command should not be called.
  Run "cmake --help-policy CMP0153" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  Use execute_process() instead.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /home/mkrzewic/src/roottest/CMakeLists.txt:134 (exec_program):
  Policy CMP0153 is not set: The exec_program command should not be called.
  Run "cmake --help-policy CMP0153" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  Use execute_process() instead.
This warning is for project developers.  Use -Wno-dev to suppress it.

mkrzewic avatar Feb 13 '24 09:02 mkrzewic

@vgvassilev I see that the (generated) file build/root/interpreter/llvm-project/llvm/lib/cmake/llvm/LLVMConfig.cmake has this wrong version set in:

set(LLVM_VERSION_MAJOR 16)                                                                                                                                                
set(LLVM_VERSION_MINOR 0)                                                                                                                                                 
set(LLVM_VERSION_PATCH 6)                                                                                                                                                 
set(LLVM_VERSION_SUFFIX )                                                                                                                                                 
set(LLVM_PACKAGE_VERSION 2.13.2)                                                                                                                                          
set(LLVM_PACKAGE_BUGREPORT https://github.com/llvm/llvm-project/issues/)       

not sure how it gets there, I guess it is generated here: interpreter/llvm-project/clang/CMakeLists.txt: set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}") which would mean that the cmake variable LLVM_PACKAGE_VERSION is set to this value during llvm build somewhere.

mkrzewic avatar Feb 14 '24 13:02 mkrzewic

@vgvassilev I see that the (generated) file build/root/interpreter/llvm-project/llvm/lib/cmake/llvm/LLVMConfig.cmake has this wrong version set in:

set(LLVM_VERSION_MAJOR 16)                                                                                                                                                
set(LLVM_VERSION_MINOR 0)                                                                                                                                                 
set(LLVM_VERSION_PATCH 6)                                                                                                                                                 
set(LLVM_VERSION_SUFFIX )                                                                                                                                                 
set(LLVM_PACKAGE_VERSION 2.13.2)                                                                                                                                          
set(LLVM_PACKAGE_BUGREPORT https://github.com/llvm/llvm-project/issues/)       

not sure how it gets there, I guess it is generated here: interpreter/llvm-project/clang/CMakeLists.txt: set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}") which would mean that the cmake variable LLVM_PACKAGE_VERSION is set to this value during llvm build somewhere.

That probably means that somehow our fork of clang finds your system llvm. Can you attach the output of your cmake configuration called with --trace-expand 2>&1?

vgvassilev avatar Feb 14 '24 13:02 vgvassilev

@vgvassilev gladly, but it's a 160MB file, you sure?

mkrzewic avatar Feb 14 '24 14:02 mkrzewic

@vgvassilev gladly, but it's a 160MB file, you sure?

If you can share it via google drive or something similar that also works.

vgvassilev avatar Feb 14 '24 14:02 vgvassilev

https://drive.google.com/file/d/152eH9B5HGe75IJgZxmnY7WOHfnokgCnq/view?usp=drive_link the 2.13.2 number seems special, it is the freetype2 version, but pops up here and there...

mkrzewic avatar Feb 14 '24 14:02 mkrzewic

https://drive.google.com/file/d/152eH9B5HGe75IJgZxmnY7WOHfnokgCnq/view?usp=drive_link the 2.13.2 number seems special, it is the freetype2 version, but pops up here and there...

Sent an access request.

vgvassilev avatar Feb 14 '24 16:02 vgvassilev

set(LLVM_PACKAGE_VERSION 2.13.2)

That makes no sense. Could that be a bug in cmake? Which version of cmake do you use? Could you upgrade/downgrade and see if we can still reproduce the problem?

vgvassilev avatar Feb 14 '24 16:02 vgvassilev

i'm on cmake 3.28.1, i'll see if I can build a different version

mkrzewic avatar Feb 14 '24 22:02 mkrzewic