Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] update libboost version from 1.74 to 1.83 #6582

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from
Draft

Conversation

StrikerRUS
Copy link
Collaborator

@StrikerRUS StrikerRUS commented Jul 30, 2024

Unfortunately, still no support for MSVC 2022

if(MSVC)
if(${MSVC_VERSION} GREATER 1929)
message(FATAL_ERROR "Unrecognized MSVC version number: ${MSVC_VERSION}")

https://www.boost.org/doc/libs/1_83_0/tools/build/doc/html/index.html#bbv2.reference.tools.compiler.msvc
boostorg/boost#914

@@ -104,6 +104,7 @@ list(
"libs/any"
"libs/array"
"libs/assert"
"libs/atomic"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -126,6 +128,7 @@ list(
"libs/lexical_cast"
"libs/math"
"libs/move"
"libs/mp11"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Starting from 1.81 container_hash module requires describe and mp11 modules
https://github.com/boostorg/container_hash/blob/bd5b7a359c285a65836674d963e1137b067983ac/CMakeLists.txt#L18-L19

@@ -185,6 +192,7 @@ ExternalProject_Add(
runtime-link=shared
variant=release
threading=multi
address-model=${BOOST_ADDRESS_MODEL}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To fix the following error on Windows:

CUSTOMBUILD : error : Name clash for '<pC:\Users\VssAdministrator\tmp\tmpgmzb0fzs\build\Boost\source\stage\lib>libboost_chrono-vc142-mt-1_83.lib' [C:\Users\VssAdministrator\tmp\tmpgmzb0fzs\build\Boost.vcxproj]
CUSTOMBUILD : error :  [C:\Users\VssAdministrator\tmp\tmpgmzb0fzs\build\Boost.vcxproj]
CUSTOMBUILD : error : Tried to build the target twice, with property sets having [C:\Users\VssAdministrator\tmp\tmpgmzb0fzs\build\Boost.vcxproj]
CUSTOMBUILD : error : these incompatible properties: [C:\Users\VssAdministrator\tmp\tmpgmzb0fzs\build\Boost.vcxproj]
CUSTOMBUILD : error :  [C:\Users\VssAdministrator\tmp\tmpgmzb0fzs\build\Boost.vcxproj]
CUSTOMBUILD : error : -  <address-model>32 [C:\Users\VssAdministrator\tmp\tmpgmzb0fzs\build\Boost.vcxproj]
CUSTOMBUILD : error : -  <address-model>64 [C:\Users\VssAdministrator\tmp\tmpgmzb0fzs\build\Boost.vcxproj]
CUSTOMBUILD : error :  [C:\Users\VssAdministrator\tmp\tmpgmzb0fzs\build\Boost.vcxproj]
CUSTOMBUILD : error : Please make sure to have consistent requirements for these [C:\Users\VssAdministrator\tmp\tmpgmzb0fzs\build\Boost.vcxproj]
CUSTOMBUILD : error : properties everywhere in your project, especially for install [C:\Users\VssAdministrator\tmp\tmpgmzb0fzs\build\Boost.vcxproj]
CUSTOMBUILD : error : targets. [C:\Users\VssAdministrator\tmp\tmpgmzb0fzs\build\Boost.vcxproj]

@StrikerRUS
Copy link
Collaborator Author

@jameslamb Seems that I'm stuck here with Windows. Everything is OK with Linux, but for Windows the following error is raised:

  symbolic link created for boost\operators.hpp <<===>> ..\libs\utility\include\boost\operators.hpp
  compile-c-c++ bin.v2\libs\chrono\build\msvc-14.2\release\address-model-64\link-static\threading-multi\chrono.obj
  chrono.cpp
  
c1xx : fatal error C1083: Cannot open source file: '': No such file or directory [C:\Users\VssAdministrator\tmp\tmpjy3f1cbc\build\Boost.vcxproj]
  Generating Code...
  
      call "bin.v2\standalone\msvc\msvc-14.2\msvc-setup.bat"  >nul
   cl /Zm800 -nologo "libs\chrono\src\chrono.cpp" -c -Fo"bin.v2\libs\chrono\build\msvc-14.2\release\address-model-64\link-static\threading-multi\chrono.obj"     -TP /wd4675 /EHs /GR /Zc:throwingNew /O2 /Ob2 /W4 /MD /Zc:forScope /Zc:wchar_t /Zc:inline /Gw /favor:blend "" /wd4512 -DBOOST_ALL_NO_LIB=1 -DBOOST_All_STATIC_LINK=1 -DNDEBUG "-I." 
  
  ...failed compile-c-c++ bin.v2\libs\chrono\build\msvc-14.2\release\address-model-64\link-static\threading-multi\chrono.obj...
  ...removing bin.v2\libs\chrono\build\msvc-14.2\release\address-model-64\link-static\threading-multi\chrono.obj
  compile-c-c++ bin.v2\libs\chrono\build\msvc-14.2\release\address-model-64\link-static\threading-multi\thread_clock.obj
  thread_clock.cpp
  
c1xx : fatal error C1083: Cannot open source file: '': No such file or directory [C:\Users\VssAdministrator\tmp\tmpjy3f1cbc\build\Boost.vcxproj]
  Generating Code...

      call "bin.v2\standalone\msvc\msvc-14.2\msvc-setup.bat"  >nul
   cl /Zm800 -nologo "libs\chrono\src\thread_clock.cpp" -c -Fo"bin.v2\libs\chrono\build\msvc-14.2\release\address-model-64\link-static\threading-multi\thread_clock.obj"     -TP /wd4675 /EHs /GR /Zc:throwingNew /O2 /Ob2 /W4 /MD /Zc:forScope /Zc:wchar_t /Zc:inline /Gw /favor:blend "" /wd4512 -DBOOST_ALL_NO_LIB=1 -DBOOST_All_STATIC_LINK=1 -DNDEBUG "-I." 
  
  ...failed compile-c-c++ bin.v2\libs\chrono\build\msvc-14.2\release\address-model-64\link-static\threading-multi\thread_clock.obj...
  ...removing bin.v2\libs\chrono\build\msvc-14.2\release\address-model-64\link-static\threading-multi\thread_clock.obj
  ...failed updating 2 targets...
  ...updated 26 targets...
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: Custom build for 'C:\Users\VssAdministrator\tmp\tmpjy3f1cbc\build\CMakeFiles\bfa2fd33523665f43c32066539f84b53\Boost-download.rule;C:\Users\VssAdministrator\tmp\tmpjy3f1cbc\build\CMakeFiles\bfa2fd33523665f43c32066539f84b53\Boost-update.rule;C:\Users\VssAdministrator\tmp\tmpjy3f1cbc\build\CMakeFiles\bfa2fd33523665f43c32066539f84b53\Boost-patch.rule;C:\Users\VssAdministrator\tmp\tmpjy3f1cbc\build\CMakeFiles\bfa2fd33523665f43c32066539f84b53\Boost-configure.rule;C:\Users\VssAdministrator\tmp\tmpjy3f1cbc\build\CMakeFiles\bfa2fd33523665f43c32066539f84b53\Boost-build.rule;C:\Users\VssAdministrator\tmp\tmpjy3f1cbc\build\CMakeFiles\bfa2fd33523665f43c32066539f84b53\Boost-install.rule;C:\Users\VssAdministrator\tmp\tmpjy3f1cbc\build\CMakeFiles\d817c52b1805292ee71e5d29f3dfbbe7\Boost-complete.rule;C:\Users\VssAdministrator\tmp\tmpjy3f1cbc\build\CMakeFiles\ffbfca097e709ba450020517e65262ce\Boost.rule;D:\a\1\s\lightgbm-python\CMakeLists.txt' exited with code 1. [C:\Users\VssAdministrator\tmp\tmpjy3f1cbc\build\Boost.vcxproj]
  lightgbm_capi_objs.vcxproj -> C:\Users\VssAdministrator\tmp\tmpjy3f1cbc\build\lightgbm_capi_objs.dir\Release\lightgbm_capi_objs.lib

*** CMake build failed

https://dev.azure.com/lightgbm-ci/lightgbm-ci/_build/results?buildId=16848&view=logs&j=ea56812e-e7ae-55d0-6abc-4a217857fa9f&t=76df8fa4-5d0e-54b7-f50a-d34a7285da97&l=947

Maybe you have any ideas about why Cannot open source file: '': No such file or directory error happens?

I believe this is closely related to the following boost refactoring: boostorg/build@boost-1.75.0...boost-1.76.0
because the same config works well with 1.75:
https://dev.azure.com/lightgbm-ci/lightgbm-ci/_build/results?buildId=16861&view=logs&j=ea56812e-e7ae-55d0-6abc-4a217857fa9f&t=76df8fa4-5d0e-54b7-f50a-d34a7285da97

@jameslamb
Copy link
Collaborator

hmmmm I'm very unsure, but maybe these have some hints?

https://github.com/boostorg/compute/blob/36350b7de849300bd3d72a05d8bf890ca405a014/test/CMakeLists.txt#L28-L30

boostorg/compute#810

I found those looking around for mentions of chrono, after seeing that the failure happens while compiling chrono.cpp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants