Error running Geant4 examples macro with ROOT6 from trunk

This is cross-post from Geant4 forum.

I’m running ROOT6 built from git source, tagged as 6.27/01. While trying to run /examples/extended/medical/dna/chem6 example of Geant4 using the provided ROOT macros files the execution fails. With the ‘plotG_LET.C’ macro nothing happens, ROOT just exits withour warnings after several seconds, with ‘plotG_time.C’ macro there is an error like

  | Welcome to ROOT 6.27/01               |
  | (c) 1995-2021, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for win64 on Mar 14 2022, 21:44:00                         |
  | From heads/master@v6-25-02-723-g6c5bfb7480                       |
  | With MSVC 19.29.30141.0                                          |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'       |

Processing plotG_time.C...
Assertion failed: LV.getLinkage() == T->getLinkage(), file D:\dev\otherProjects\ROOT6\root_trunk4\interpreter\llvm\src\tools\clang\lib\AST\Type.cpp, line 3746

and also exits. With some older version of ROOT these macro were started succesfully.

Mentioning @Axel, @bellenot

ROOT6 installed using the git clone command, opening cmake-gui within VS Command Prompt x64 environment, choosing x64 default option, adding -Thost=x64 to additional commands, changing CMAKE_INSTALL_PREFIX, calling Configure double times, Generate one time, than following to the build folder and running

cmake --build .
cmake --build . --target install

Can you share the file CMakeLists.txt from your build directory, please?

@bellenot is the MSVC version the right one? Why do we have asserts on given the build steps mentioned above - is this even a release build?

@Axel yes, this is the correct version of MSVC. @mr-xak please use this syntax to build ROOT on Windows:

cmake --build . --config Release

i.e. Specify the build type (Release, Debug, RelWithDebInfo)
And meanwhile I’ll try to reproduce the problem.

You mean CMakeLists.txt of Geant4 example or from ROOT that I’ve installed?

In ROOT Build directory there is no CMakeLists.txt, only CMakeCache.txt

Of ROOT, and yes I was distracted and meant CMakeCache.txt :slight_smile: Thanks!

While trying to rebuild with the current upstream forgot another problem of x64, that it is not building with builtin_lzma

"D:\dev\otherProjects\ROOT6\root_trunk5_x64_build\ALL_BUILD.vcxproj" (целевой объект по умолчанию) (1) ->
"D:\dev\otherProjects\ROOT6\root_trunk5_x64_build\graf2d\asimage\G__ASImage.vcxproj" (целевой объект по умолчанию) (186
) ->
"D:\dev\otherProjects\ROOT6\root_trunk5_x64_build\core\Core.vcxproj" (целевой объект по умолчанию) (187) ->
(Целевой объект Link) ->
  ZipLZMA.obj : error LNK2019: ссылка на неразрешенный внешний символ lzma_code в функции R__unzipLZMA. [D:\dev\otherPr
  ZipLZMA.obj : error LNK2019: ссылка на неразрешенный внешний символ lzma_end в функции R__unzipLZMA. [D:\dev\otherPro
  ZipLZMA.obj : error LNK2019: ссылка на неразрешенный внешний символ lzma_lzma_preset в функции R__zipLZMA. [D:\dev\ot
  ZipLZMA.obj : error LNK2019: ссылка на неразрешенный внешний символ lzma_stream_encoder в функции R__zipLZMA. [D:\dev
  ZipLZMA.obj : error LNK2019: ссылка на неразрешенный внешний символ lzma_stream_decoder в функции R__unzipLZMA. [D:\d
  D:\dev\otherProjects\ROOT6\root_trunk5_x64_build\bin\libCore.dll : fatal error LNK1120: неразрешенных внешних элемент
ов: 5 [D:\dev\otherProjects\ROOT6\root_trunk5_x64_build\core\Core.vcxproj]

    Предупреждений: 6552
    Ошибок: 6

(sorry for russian output)

I need to explicitly uncheck this box in cmake-gui, and put the include/lib of pre-built liblzma.

I’ve put --config specification, rebuilt both x32 and x64 versions of ROOT using separate folders, and I can confirm that x32 version of the upstream having the same issue as described in the topic with Geant4 examples macros.

I have no problem with LZMA. And I’m building Geant4 right now, will keep you updated

Here it is
CMakeCache.txt (123.4 KB)

So the problem comes from the Geant4 macros. Please try with these ones:
plotG_LET.C (4.9 KB)
plotG_time.C (6.5 KB)


Yes, these macros runs succesfully as intended. Thank you very much!
Should I post this versions to Geant4 forum as the suggested modification?

1 Like

Yes, feel free to ask them, and please mention me, so they can come discuss with me if they want

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