# Error while building ROOT from source

**URL:** <https://root-forum.cern.ch/t/error-while-building-root-from-source/59448>\
**Category:** ROOT\
**Tags:** cmake, root\
**Created:** [May 24, 2024, 12:49pm UTC](https://root-forum.cern.ch/t/error-while-building-root-from-source/59448 "2024-05-24T12:49:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sameed](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/sameed/32/36615_2.png) [@sameed](https://root-forum.cern.ch/u/sameed)\
**Post date:** [May 24, 2024, 12:49pm UTC](https://root-forum.cern.ch/t/error-while-building-root-from-source/59448/1 "2024-05-24T12:49:14Z")

</div>

* * *

_ROOT Version:_ 6.30.06  
_Platform:_ Ubuntu 24.04  
_Compiler:_ Not Provided

* * *

In the final step of ROOT building process:

```auto
cmake --build . --target install -- -j16

```

I got the following errors, and the build process ended without any successful compilation.

```auto
[19%] Built target move_header_tmva_tmvagui
[20%] Built target move_header_tmva_sofie
[22%] Built target move_header_tmva_tmva
CMake Error at /media/sameed/Sapphire/DUNE_Softwares/root/build/builtins/davix/DAVIX-prefix/src/DAVIX-stamp/DAVIX-build-Release.cmake:49 (message):
  Command failed: 2

   '/usr/bin/gmake'

  See also

    /media/sameed/Sapphire/DUNE_Softwares/root/build/builtins/davix/DAVIX-prefix/src/DAVIX-stamp/DAVIX-build-*.log

[22%] Built target move_header_roofit_hs3
[22%] Built target move_header_roofit_jsoninterface

```

and

```auto
[22%] Built target move_header_roofit_roostats
[22%] Built target move_header_roofit_histfactory
[23%] Built target LLVMDemangle
gmake[2]: *** [builtins/davix/CMakeFiles/DAVIX.dir/build.make:86: builtins/davix/DAVIX-prefix/src/DAVIX-stamp/DAVIX-build] Error 1
[25%] Built target move_header_roofit_roofitcore
[25%] Built target move_header_roofit_roofit
gmake[1]: *** [CMakeFiles/Makefile2:9486: builtins/davix/CMakeFiles/DAVIX.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
[25%] Built target llvm_vcsrevision_h
[25%] Built target obj.clang-tblgen
[25%] Built target clang-cmake-exports
[25%] Built target rconfigure
[25%] Built target rsa
[25%] Updating etc/gitinfo.txt.
-- Found Git: /usr/bin/git (found version "2.43.0") 
CMake Warning at /media/sameed/Sapphire/DUNE_Softwares/root-6.30.06/cmake/modules/SetROOTVersion.cmake:85 (message):
  GIT_DESCRIBE_ALL is ``·with a format unexpected for tags. Not setting the
  commit.
Call Stack (most recent call first):
  /media/sameed/Sapphire/DUNE_Softwares/root-6.30.06/cmake/modules/SetROOTVersion.cmake:99 (SET_ROOT_VERSION)
  /media/sameed/Sapphire/DUNE_Softwares/root-6.30.06/cmake/modules/UpdateGitInfo.cmake:21 (include)

CMake Warning at /media/sameed/Sapphire/DUNE_Softwares/root-6.30.06/cmake/modules/UpdateGitInfo.cmake:45 (message):
  Cannot determine git revision info: source is not a release and not a git
  repo. Noting v6-30-06 as commit.
Call Stack (most recent call first):
  /media/sameed/Sapphire/DUNE_Softwares/root-6.30.06/cmake/modules/UpdateGitInfo.cmake:50 (UPDATE_GIT_VERSION)

[26%] Built target obj.llvm-tblgen
[26%] Built target gitinfotxt
[51%] Built target move_artifacts
gmake: *** [Makefile:156: all] Error 2

```

I could not figure out any way to resolve this issue. Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![devajith](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/devajith/32/37165_2.png) [@devajith](https://root-forum.cern.ch/u/devajith)\
**Post date:** [May 24, 2024, 1:17pm UTC](https://root-forum.cern.ch/t/error-while-building-root-from-source/59448/2 "2024-05-24T13:17:51Z")

</div>

Hi Sameed,

Thank you for your question. There seems to be a problem with DAVIX as mentioned in the build log. Could you have a look/provide the part of the log that is failing?

> [@sameed](#):
>
> `/media/sameed/Sapphire/DUNE_Softwares/root/build/builtins/davix/DAVIX-prefix/src/DAVIX-stamp/DAVIX-build-*.log`

---

<div class="post-metadata">

**Author:** ![lilinxiang](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/ea5d25/32.png) [@lilinxiang](https://root-forum.cern.ch/u/lilinxiang)\
**Post date:** [May 24, 2024, 1:48pm UTC](https://root-forum.cern.ch/t/error-while-building-root-from-source/59448/3 "2024-05-24T13:48:38Z")

</div>

I encountered a similar problem during the installation process.Can you help me with how this problem is solved?

---

<div class="post-metadata">

**Author:** ![sameed](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/sameed/32/36615_2.png) [@sameed](https://root-forum.cern.ch/u/sameed)\
**Post date:** [May 24, 2024, 3:04pm UTC](https://root-forum.cern.ch/t/error-while-building-root-from-source/59448/4 "2024-05-24T15:04:31Z")

</div>

Hi Devajith,

There are two log files related to it.  
1)DAVIX-build-err.log

```auto
/media/sameed/Sapphire/DUNE_Softwares/root/build/builtins/davix/DAVIX-prefix/src/DAVIX/deps/libneon/src/ne_utils.c:47:10: fatal error: libxml/xmlversion.h: No such file or directory
   47 | #include <libxml/xmlversion.h>
      | ^ ~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[5]: *** [deps/libneon/CMakeFiles/LibNeonObjects.dir/build.make:384: deps/libneon/CMakeFiles/LibNeonObjects.dir/src/ne_utils.c.o] Error 1
gmake[5]: *** Waiting for unfinished jobs....
/media/sameed/Sapphire/DUNE_Softwares/root/build/builtins/davix/DAVIX-prefix/src/DAVIX/deps/libneon/src/ne_xml.c:60:10: fatal error: libxml/xmlversion.h: No such file or directory
   60 | #include <libxml/xmlversion.h>
      | ^ ~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[5]: *** [deps/libneon/CMakeFiles/LibNeonObjects.dir/build.make:398: deps/libneon/CMakeFiles/LibNeonObjects.dir/src/ne_xml.c.o] Error 1
/media/sameed/Sapphire/DUNE_Softwares/root/build/builtins/davix/DAVIX-prefix/src/DAVIX/deps/libneon/src/ne_openssl.c: In function ‘ne__ssl_exit’:
/media/sameed/Sapphire/DUNE_Softwares/root/build/builtins/davix/DAVIX-prefix/src/DAVIX/deps/libneon/src/ne_openssl.c:1332:39: warning: the comparison will always evaluate as ‘false’ for the address of ‘thread_lock_neon’ will never be NULL [-Waddress]
 1332 | if (CRYPTO_get_locking_callback() == thread_lock_neon
      | ^~
/media/sameed/Sapphire/DUNE_Softwares/root/build/builtins/davix/DAVIX-prefix/src/DAVIX/deps/libneon/src/ne_openssl.c:1248:13: note: ‘thread_lock_neon’ declared here
 1248 | static void thread_lock_neon(int mode, int n, const char *file, int line)
      | ^ ~~~~~~~~~~~~~~~
gmake[4]: *** [CMakeFiles/Makefile2:240: deps/libneon/CMakeFiles/LibNeonObjects.dir/all] Error 2
gmake[3]: *** [Makefile:136: all] Error 2

```

2)DAVIX-build-out.log

```auto
[1%] e[34me[1mGenerating Versione[0m
[9%] Built target BuildCurlBundled
[10%] e[32mBuilding C object deps/libneon/CMakeFiles/LibNeonObjects.dir/src/ne_utils.c.oe[0m
[11%] e[32mBuilding C object deps/libneon/CMakeFiles/LibNeonObjects.dir/src/ne_xml.c.oe[0m
[12%] e[32mBuilding C object deps/libneon/CMakeFiles/LibNeonObjects.dir/src/ne_openssl.c.oe[0m
[13%] e[32mBuilding C object deps/libneon/CMakeFiles/LibNeonObjects.dir/src/ne_xmlreq.c.oe[0m
Cannot regenerate include/davix/features.hpp from git
Cannot regenerate version.cmake from git
[13%] Built target GenerateVersionInfo

```

---

<div class="post-metadata">

**Author:** ![devajith](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/devajith/32/37165_2.png) [@devajith](https://root-forum.cern.ch/u/devajith)\
**Post date:** [May 25, 2024, 11:09pm UTC](https://root-forum.cern.ch/t/error-while-building-root-from-source/59448/5 "2024-05-25T23:09:05Z")

</div>

> [@sameed](#):
>
> `libxml/xmlversion.h: No such file or directory`

From the log, it seems that your machine doesn’t have `libxml2-dev` installed. You can try installing it manually.

But did you install all the required [packages](https://root.cern/install/dependencies/) before compiling?

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [June 8, 2024, 11:09pm UTC](https://root-forum.cern.ch/t/error-while-building-root-from-source/59448/6 "2024-06-08T23:09:27Z")

</div>

Closed on June 8, 2024, 11:09pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
