Root v6.18/02 fail to compile on MAC

I get the following error while trying to compile root:

Enter passphrase for key '/Users/dinardo/.ssh/id_rsa': 
CMake Error at clad-stamp/clad-download-Release.cmake:49 (message):
  Command failed: 1

   '/Applications/CMake.app/Contents/bin/cmake' '-P' '/Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/tmp/clad-gitclone.cmake'

  See also
    /Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/src/clad-stamp/clad-download-*.log

make[2]: *** [interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/src/clad-stamp/clad-download] Error 1
make[1]: *** [interpreter/llvm/src/tools/cling/tools/plugins/clad/CMakeFiles/clad.dir/all] Error 2
make: *** [all] Error 2

If I look at the file:
more interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/src/clad-stamp/clad-download-err.log
I get:

Cloning into 'clad'...

fatal: invalid reference: v0.5

CMake Error at /Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/tmp/clad-gitclone.cmake:75 (message):

Failed to checkout tag: 'v0.5'

Do you have any suggestion?


ROOT Version: 2.18
Platform: MAC OS 10.14.6
Compiler: Xcode 10.3


Hi,
I don’t know why clad acts up that way (maybe @Axel does) , but you can disable building clad running cmake -Dclad=OFF . in your build directory.

Or even better start from a new, empty build directory and run cmake -Dclad=OFF -Dyourotheroptions path/to/root_sources.

Cheers,
Enrico

EDIT: in case you are wondering what clad is, it’s a cling-based automatic differentiation tool. Still in the development stage, you most probably do not need it

Can you just try again - to see whether it was a temporary github glitch? That happens…

The developer of clad, @vvassilev, is currently on vacation - please ping him next week should you not hear from him!

Hi guys,
I just tried as @eguiraud suggested and the problem is still the same.
Many thanks for your suggestions.
Before disabling clad I would like to hear from @vvassilev once he is back from vacation.

Many thanks again.
Cheers,

  • Mauro.

Could you paste the content of /Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/tmp/clad-gitclone.cmake and /Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/src/clad-stamp/clad-download-*.log

I suspect it has something to do with your certificate

Hi @vvassilev, here they are:

more /Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/tmp/clad-gitclone.cmake 
if("v0.5" STREQUAL "")
  message(FATAL_ERROR "Tag for git checkout should not be empty.")
endif()

set(run 0)

if("/Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/src/clad-stamp/clad-gitinfo.txt" IS_NEWER_THAN "/Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/src/clad-stamp/clad-gitclone-lastrun.txt")
  set(run 1)
endif()

if(NOT run)
  message(STATUS "Avoiding repeated git clone, stamp file is up to date: '/Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/src/clad-stamp/clad-gitclone-lastrun.txt'")
  return()
endif()

execute_process(
  COMMAND ${CMAKE_COMMAND} -E remove_directory "/Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/src/clad"
  RESULT_VARIABLE error_code
  )
if(error_code)
  message(FATAL_ERROR "Failed to remove directory: '/Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/src/clad'")
endif()

set(git_options)

# disable cert checking if explicitly told not to do it
set(tls_verify "")
if(NOT "x" STREQUAL "x" AND NOT tls_verify)
  list(APPEND git_options
    -c http.sslVerify=false)
endif()

set(git_clone_options)

set(git_shallow "")
if(git_shallow)
  list(APPEND git_clone_options --depth 1 --no-single-branch)
endif()

set(git_progress "")
if(git_progress)
  list(APPEND git_clone_options --progress)
endif()

set(git_config "")
foreach(config IN LISTS git_config)
  list(APPEND git_clone_options --config ${config})
endforeach()

# try the clone 3 times in case there is an odd git clone issue
set(error_code 1)
set(number_of_tries 0)
while(error_code AND number_of_tries LESS 3)
  execute_process(
    COMMAND "/usr/bin/git" ${git_options} clone ${git_clone_options} --origin "origin" "https://github.com/vgvassilev/clad.git" "clad"
    WORKING_DIRECTORY "/Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/src"
    RESULT_VARIABLE error_code
    )
  math(EXPR number_of_tries "${number_of_tries} + 1")
endwhile()
if(number_of_tries GREATER 1)
  message(STATUS "Had to git clone more than once:
          ${number_of_tries} times.")
endif()
if(error_code)
  message(FATAL_ERROR "Failed to clone repository: 'https://github.com/vgvassilev/clad.git'")
endif()

execute_process(
  COMMAND "/usr/bin/git" ${git_options} checkout v0.5 --
  WORKING_DIRECTORY "/Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/src/clad"
  RESULT_VARIABLE error_code
  )
if(error_code)
  message(FATAL_ERROR "Failed to checkout tag: 'v0.5'")
endif()

execute_process(
  COMMAND "/usr/bin/git" ${git_options} submodule init 
  WORKING_DIRECTORY "/Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/src/clad"
  RESULT_VARIABLE error_code
  )
if(error_code)
  message(FATAL_ERROR "Failed to init submodules in: '/Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/src/clad'")
endif()

execute_process(
  COMMAND "/usr/bin/git" ${git_options} submodule update --recursive --init 
  WORKING_DIRECTORY "/Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/src/clad"
  RESULT_VARIABLE error_code
  )
if(error_code)
  message(FATAL_ERROR "Failed to update submodules in: '/Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/src/clad'")
endif()

# Complete success, update the script-last-run stamp file:
#
execute_process(
  COMMAND ${CMAKE_COMMAND} -E copy
    "/Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/src/clad-stamp/clad-gitinfo.txt"
    "/Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/src/clad-stamp/clad-gitclone-lastrun.txt"
  WORKING_DIRECTORY "/Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/src/clad"
  RESULT_VARIABLE error_code
  )
if(error_code)
  message(FATAL_ERROR "Failed to copy script-last-run stamp file: '/Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/src/clad-stamp/clad-gitclone-lastrun.txt'")
endif()

and

more /Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/src/clad-stamp/clad-download-err.log

Cloning into 'clad'...

fatal: invalid reference: v0.5

CMake Error at /Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/tmp/clad-gitclone.cmake:75 (message):

Failed to checkout tag: 'v0.5'

and

more /Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/src/clad-stamp/clad-download-Release.cmake 

cmake_minimum_required(VERSION 3.13)

set(command "/Applications/CMake.app/Contents/bin/cmake;-P;/Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/tmp/clad-gitclone.cmake")
set(log_merged "")
set(log_output_on_failure "")
set(stdout_log "/Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/src/clad-stamp/clad-download-out.log")
set(stderr_log "/Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/src/clad-stamp/clad-download-err.log")
execute_process(
  COMMAND ${command}
  RESULT_VARIABLE result
  OUTPUT_FILE "${stdout_log}"
  ERROR_FILE "${stderr_log}"
  )
macro(read_up_to_max_size log_file output_var)
  file(SIZE ${log_file} determined_size)
  set(max_size 10240)
  if (determined_size GREATER max_size)
    math(EXPR seek_position "${determined_size} - ${max_size}")
    file(READ ${log_file} ${output_var} OFFSET ${seek_position})
    set(${output_var} "...skipping to end...\n${${output_var}}")
  else()
    file(READ ${log_file} ${output_var})
  endif()
endmacro()
if(result)
  set(msg "Command failed: ${result}\n")
  foreach(arg IN LISTS command)
    set(msg "${msg} '${arg}'")
  endforeach()
  if (${log_merged})
    set(msg "${msg}\nSee also\n  ${stderr_log}")
  else()
    set(msg "${msg}\nSee also\n  /Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/src/clad-stamp/clad-download-*.log")
  endif()
  if (${log_output_on_failure})
    message(SEND_ERROR "${msg}")
    if (${log_merged})
      read_up_to_max_size("${stderr_log}" error_log_contents)
      message(STATUS "Log output is:\n${error_log_contents}")
    else()
      read_up_to_max_size("${stdout_log}" out_log_contents)
      read_up_to_max_size("${stderr_log}" err_log_contents)
      message(STATUS "stdout output is:\n${out_log_contents}")
      message(STATUS "stderr output is:\n${err_log_contents}")
    endif()
    message(FATAL_ERROR "Stopping after outputting logs.")
  else()
    message(FATAL_ERROR "${msg}")
  endif()
else()
  set(msg "clad download command succeeded.  See also /Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/src/clad-stamp/clad-download-*.log")
  message(STATUS "${msg}")
endif()

The /Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/src/clad-stamp/clad-download-out.log
is empty.

Many thanks for looking into this.

  • Mauro.

Thanks! And what is your cmake version and git version (I assume you run on OS X)

Hi @vvassilev:
cmake: 3.14.0
git: git version 2.20.1 (Apple Git-117)

Yes, I’m running on OS X:

ROOT Version: 2.18
Platform: MAC OS 10.14.6
Compiler: Xcode 10.3

@vvassilev does that mean that the build system tries to download clad even if -Dclad=OFF? That’s odd

Sorry for the confusion.
I meant that I tried again (without disabling clad) because Axel suggested:

“Can you just try again - to see whether it was a temporary github glitch”

  • Mauro.

Alright, so yes, to quickly unblock you, the problem should go away if you simply disable clad. For the actual resolution of the problem, @vvassilev is the authority :+1:

Cheers,
Enrico

I was wondering whether @vvassilev had a chance to took into this problem.

Kind regards.

  • Mauro.

None of this seems problematic. Could you paste the content of /Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/tmp/clad-gitclone.cmake

PS: Sorry you already did!

Is there some content in /Users/dinardo/root_v6.18.02/myBuild/interpreter/llvm/src/tools/cling/tools/plugins/clad/clad-prefix/src? Was the clone successful and then the checkout that failed?

Hi,

Actually next lines from your log looks very suspicious to me:

Enter passphrase for key '/Users/dinardo/.ssh/id_rsa': 
CMake Error at clad-stamp/clad-download-Release.cmake:49 (message):
...

Are you able to run next commands locally?

git clone --origin origin https://github.com/vgvassilev/clad.git clad
cd clad
git checkout v0.5 --

Hi, I’ve tried the command:

git clone --origin origin https://github.com/vgvassilev/clad.git clad
cd clad

and it worked
Then when I did:
git checkout v0.5 --
I got the error:
fatal: invalid reference: v0.5

I’ve also tried just with:
git checkout v0.5
and I got:
error: pathspec 'v0.5' did not match any file(s) known to git

Please let me know if you need further information.

  • Mauro.

Hi @vvassilev,
the directory has a content (non empty sub directories) , though I don’t know whether it’s because I run the command that @oshadura asked me to run that populated the directory.
Unfortunately I didn’t check the content before running the command.

  • Mauro

Can you try please next:


 git show-ref

For me it shows:

de9ad28d13c9b79cdf1e496bf43c56deeb7798c4 refs/heads/master
de9ad28d13c9b79cdf1e496bf43c56deeb7798c4 refs/remotes/origin/HEAD
8207f8ce08bad6f0ee3f99e2b169fa1c21a3c948 refs/remotes/origin/add-gcc7
4aa6daf6504145ed318e2ad3636a8c86ba3046f8 refs/remotes/origin/coverity_scan
e92a36bd8792c906d835bb27b8ed040ea257723c refs/remotes/origin/fix-asserts-rebased
23a129b2f6916cd56f46e60925648a5c124c2b19 refs/remotes/origin/fix-cxxmodules
de9ad28d13c9b79cdf1e496bf43c56deeb7798c4 refs/remotes/origin/master
660b549c7a8b46b51d5b9f784a983f31babfb044 refs/tags/v0.1
5a9af6b142b0f47d032f8d145caf371c8ed60083 refs/tags/v0.2
9ed05721e464597b519354c597372fb4c42868af refs/tags/v0.3
577e0240f70a7afb423e4adadb5219624911694c refs/tags/v0.4
e8361049f5733e07fb044ffe97f58affd7adf69e refs/tags/v0.5

Hi @oshadura,
I get the following:

ihulk:clad dinardo$ git show-ref
52496da37f0bf0289c3a09d9243f22be53e9b1d2 refs/heads/master
52496da37f0bf0289c3a09d9243f22be53e9b1d2 refs/remotes/origin/HEAD
52496da37f0bf0289c3a09d9243f22be53e9b1d2 refs/remotes/origin/master
38d56eeb975935a882473c5437633ffbddc89d2d refs/tags/v0.0
287da6d1b9757931f7df56939f22ca88de9d58e1 refs/tags/v1.0

I ran it from inside clad directory: root_v6.18.02/myBuild/clad

  • Mauro.

It is a magic! :slight_smile:

Can you please try to clone/download root from scratch in a different place? And preferably last release https://root.cern.ch/content/release-61804?

Dear @oshadura and @vvassilev,
I’ve just tested your suggestion.
The problem is still present and with exactly the same output.

Any idea?
Do you want me to send you other information?

  • Mauro.