[Windows 10] ROOT 6.28 build with Miniconda Python 3.10 crashed


ROOT Version: ROOT 6.28/00 (64 bits)
Python: Miniconda3-py310_23.1.0-1-Windows-x86_64.exe
Platform: Windows 10 (20H2)
Compiler: Visual Studio 2022 (17.3.6)


Dear ROOT developers and maintainers,

I tried to build ROOT 6.28 on Windows 10 (64 bits) with Miniconda 3 (Python 3.10). And I got the following errors:

Création de la bibliothèque C:/URANIE/GitLab/[...]/root/my_build/lib/libGraf.lib et de l'objet C:/URANIE/GitLab/[...]/root/my_build/lib/libGraf.exp
freetype.lib(ftbzip2.obj) : error LNK2019: symbole externe non résolu BZ2_bzDecompressInit référencé dans la fonction FT_Stream_OpenBzip2 [C:\URANIE\GitLab\[...]\inputs\root\my_build\graf2d\graf\Graf.vcxproj]
freetype.lib(ftbzip2.obj) : error LNK2019: symbole externe non résolu BZ2_bzDecompress référencé dans la fonction ft_bzip2_file_fill_output [C:\URANIE\GitLab\[...]\inputs\root\my_build\graf2d\graf\Graf.vcxproj]
freetype.lib(ftbzip2.obj) : error LNK2019: symbole externe non résolu BZ2_bzDecompressEnd référencé dans la fonction ft_bzip2_stream_close [C:\URANIE\GitLab\[...]\inputs\root\my_build\graf2d\graf\Graf.vcxproj]
C:\URANIE\GitLab\[...]\inputs\root\my_build\bin\libGraf.dll : fatal error LNK1120: 3 externes non résolus [C:\URANIE\GitLab\[...]\inputs\root\my_build\graf2d\graf\Graf.vcxproj]

Please find attached ROOT CMake configuration: root_configuration.txt (9.6 KB).

The issue looks like [harfbuzz] failed - freetype (symbol png; symbol BZ2) · Issue #2964 · microsoft/vcpkg · GitHub.

Can you tell us how to solve this linking issue?

Best regards,

Try to build with builtin_zlib (-Dbuiltin_zlib=ON)

Thank you for your answer.

I also tried your option yesterday and it failed, see root_builtin_zlib_configuration.txt (9.5 KB):

     Création de la bibliothèque C:/URANIE/GitLab/[...]/inputs/root/my_build/lib/libGraf.lib et de l'objet C:/URANIE/GitLab/[...]/inputs/root/my_build/lib/libGraf.exp
  TVirtualMagField.cxx
freetype.lib(ftbzip2.obj) : error LNK2019: symbole externe non résolu BZ2_bzDecompressInit référencé dans la fonction FT_Stream_OpenBzip2 [C:\URANIE\GitLab\[...]\inputs\root\my_build\graf2d\graf\Graf.vcxproj]
freetype.lib(ftbzip2.obj) : error LNK2019: symbole externe non résolu BZ2_bzDecompress référencé dans la fonction ft_bzip2_file_fill_output [C:\URANIE\GitLab\[...]\inputs\root\my_build\graf2d\graf\Graf.vcxproj]
freetype.lib(ftbzip2.obj) : error LNK2019: symbole externe non résolu BZ2_bzDecompressEnd référencé dans la fonction ft_bzip2_stream_close [C:\URANIE\GitLab\[...]\inputs\root\my_build\graf2d\graf\Graf.vcxproj]
C:\URANIE\GitLab\[...]\inputs\root\my_build\bin\libGraf.dll : fatal error LNK1120: 3 externes non résolus [C:\URANIE\GitLab\[...]\inputs\root\my_build\graf2d\graf\Graf.vcxproj]

Sorry for not telling before.

I also added builtin_lzma root_builtin_lzma_configuration.txt (8.8 KB) but it still failed:

     Création de la bibliothèque C:/URANIE/GitLab/[...]/inputs/root/my_build/lib/libGraf.lib et de l'objet C:/URANIE/GitLab/[...]/inputs/root/my_build/lib/libGraf.exp
freetype.lib(ftbzip2.obj) : error LNK2019: symbole externe non résolu BZ2_bzDecompressInit référencé dans la fonction FT_Stream_OpenBzip2 [C:\URANIE\GitLab\[...]\inputs\root\my_build\graf2d\graf\Graf.vcxproj]
freetype.lib(ftbzip2.obj) : error LNK2019: symbole externe non résolu BZ2_bzDecompress référencé dans la fonction ft_bzip2_file_fill_output [C:\URANIE\GitLab\[...]\inputs\root\my_build\graf2d\graf\Graf.vcxproj]
freetype.lib(ftbzip2.obj) : error LNK2019: symbole externe non résolu BZ2_bzDecompressEnd référencé dans la fonction ft_bzip2_stream_close [C:\URANIE\GitLab\[...]\inputs\root\my_build\graf2d\graf\Graf.vcxproj]
C:\URANIE\GitLab\[...]\inputs\root\my_build\bin\libGraf.dll : fatal error LNK1120: 3 externes non résolus [C:\URANIE\GitLab\[...]\inputs\root\my_build\graf2d\graf\Graf.vcxproj]

I don’t know if that was relevant.

That’s weird. It looks like BZ2_bzDecompressInit comes from libbzip2, which is not even an option in ROOT. Can you make sure libbzip2 is nowhere on your system (it might be automatically pick up by freetype), and try again? I build ROOT every day, but never with Miniconda…

Thank you very much for your answer.

First I would like to say that ROOT installation with Miniconda Python 3.9 succeeded.
And I think that’s because such environment doesn’t install bzip2, e.g.:

(base) PS C:\> conda create -n py39 python=3.9.12
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done
[...]
The following NEW packages will be INSTALLED:

  ca-certificates    pkgs/main/win-64::ca-certificates-2023.01.10-haa95532_0
  certifi            pkgs/main/win-64::certifi-2022.12.7-py39haa95532_0
  openssl            pkgs/main/win-64::openssl-1.1.1s-h2bbff1b_0
  pip                pkgs/main/win-64::pip-22.3.1-py39haa95532_0
  python             pkgs/main/win-64::python-3.9.12-h6244533_0
  setuptools         pkgs/main/win-64::setuptools-65.6.3-py39haa95532_0
  sqlite             pkgs/main/win-64::sqlite-3.40.1-h2bbff1b_0
  tzdata             pkgs/main/noarch::tzdata-2022g-h04d1e81_0
  vc                 pkgs/main/win-64::vc-14.2-h21ff451_1
  vs2015_runtime     pkgs/main/win-64::vs2015_runtime-14.27.29016-h5e58377_2
  wheel              pkgs/main/noarch::wheel-0.37.1-pyhd3eb1b0_0
  wincertstore       pkgs/main/win-64::wincertstore-0.2-py39haa95532_2


Proceed ([y]/n)? n


CondaSystemExit: Exiting.

(base) PS C:\>

However, some of our clients may need Miniconda Python 3.10 (to use Brightway2 and lxml):

(base) PS C:\> conda create -n py310 python=3.10.9
Collecting package metadata (current_repodata.json): done
Solving environment: done
[...]
The following NEW packages will be INSTALLED:

  bzip2              pkgs/main/win-64::bzip2-1.0.8-he774522_0
  ca-certificates    pkgs/main/win-64::ca-certificates-2023.01.10-haa95532_0
  certifi            pkgs/main/win-64::certifi-2022.12.7-py310haa95532_0
  libffi             pkgs/main/win-64::libffi-3.4.2-hd77b12b_6
  openssl            pkgs/main/win-64::openssl-1.1.1s-h2bbff1b_0
  pip                pkgs/main/win-64::pip-22.3.1-py310haa95532_0
  python             pkgs/main/win-64::python-3.10.9-h966fe2a_0
  setuptools         pkgs/main/win-64::setuptools-65.6.3-py310haa95532_0
  sqlite             pkgs/main/win-64::sqlite-3.40.1-h2bbff1b_0
  tk                 pkgs/main/win-64::tk-8.6.12-h2bbff1b_0
  tzdata             pkgs/main/noarch::tzdata-2022g-h04d1e81_0
  vc                 pkgs/main/win-64::vc-14.2-h21ff451_1
  vs2015_runtime     pkgs/main/win-64::vs2015_runtime-14.27.29016-h5e58377_2
  wheel              pkgs/main/noarch::wheel-0.37.1-pyhd3eb1b0_0
  wincertstore       pkgs/main/win-64::wincertstore-0.2-py310haa95532_2
  xz                 pkgs/main/win-64::xz-5.2.10-h8cc25b3_1
  zlib               pkgs/main/win-64::zlib-1.2.13-h8cc25b3_0


Proceed ([y]/n)? n


CondaSystemExit: Exiting.

(base) PS C:\>

And this environment needs bzip2.

Here is a proposal.
Freetype has a FT_DISABLE_BZIP2 option, see CMakeLists.txt · VER-2-12-1 · FreeType / FreeType · GitLab.
So what about using this option as a patch in root/SearchInstalledSoftware.cmake at v6-28-00 · root-project/root · GitHub?
Will it be harmful to ROOT?

No problem, I can disable it on Windows

There is a PR open for this. Thanks for reporting the issue!

Great! Thank you very much.

Here is a similar patch I applied to v6-28-00: root_v6-28-00_freetype.patch.txt (959 Bytes).

Initial configuration was restored: root_freetype_configuration.txt (9.6 KB).

Graf issue seems to be resolved!

     Création de la bibliothèque C:/URANIE/GitLab/[...]/inputs/root/my_build/lib/libGraf.lib et de l'objet C:/URANIE/GitLab/[...]/inputs/root/my_build/lib/libGraf.exp
  Graf.vcxproj -> C:\URANIE\GitLab\[...]\inputs\root\my_build\bin\libGraf.dll

However an error was encountered a bit later:

Création de la bibliothèque C:/URANIE/GitLab/[...]/inputs/root/my_build/lib/libHistPainter.lib et de l'objet C:/URANIE/GitLab/[...]/inputs/root/my_build/lib/libHistPainter.exp
  HistPainter.vcxproj -> C:\URANIE\GitLab\[...]\inputs\root\my_build\bin\libHistPainter.dll
  Generating tutorials/hsimple.root
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(247,5): error MSB8066: la build personnalisée de 'C:\URANIE\GitLab\[...]\inputs\root\my_build\CMakeFiles\159b584b6a94c125076fa1910b1b9863\hsimple.root.rule;C:\URANIE\GitLab\[...]\inputs\root\my_build\CMakeFiles\1ef998046442a6bed6427702622119e7\hsimple.rule;C:\URANIE\GitLab\[...]\inputs\root\CMakeLists.txt' s'est arrêtée. Code-1073741515. [C:\URANIE\GitLab\[...]\inputs\root\my_build\hsimple.vcxproj]

Is it an unrelated issue?

That’s weird. And most probably unrelated. Can you verify there is no other error before this one?

Your Build #167846 windows10/cxx14 bellenot PR #12285 seems OK.

In my GitLab log, I can’t find any error before this hsimple message. I may be missing something.

Thank you again for the Graf issue resolution!

1 Like

Hello,

In root/CMakeLists.txt at v6-28-00 · root-project/root · GitHub, I noticed a difference between Windows and Linux environment loading:

set PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
${ld_library_path}=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}:$ENV{${ld_library_path}}

So I applied this patch: root_v6-28-00_hsimple.patch.txt (675 Bytes).
Could you review this change?

Then my ROOT build with Miniconda Python 3.10 was successful:

    Création de la bibliothèque C:/URANIE/GitLab/[...]/inputs/root/my_build/lib/libHistPainter.lib et de l'objet C:/URANIE/GitLab/[...]/inputs/root/my_build/lib/libHistPainter.exp
  HistPainter.vcxproj -> C:\URANIE\GitLab\[...]\inputs\root\my_build\bin\libHistPainter.dll
  Generating tutorials/hsimple.root
  
  Processing hsimple.C...
  hsimple   : Real Time =   0.05 seconds Cpu Time =   0.06 seconds
  (TFile *) 0x[...]
[...]
  -- Installing: C:/URANIE/GitLab/[...]/outputs/root/tutorials/hsimple.root
[...]
Job succeeded

Hi, will do, thanks!

1 Like

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