Build failure with cmake option using TBB in VS2017, windows 10
sukbu opened this issue · comments
Build failure occured in VS2017 while following install.md.
Creating solution with CMAKE option 'cmake .. -G"Visual Studio 15 2017 Win64" -DJET_TASKING_SYSTEM=OpenMP' and building solution in VS2017 was successful.
And I tried to build solution after run cmake with the option -DJET_TASKING_SYSTEM=TBB. But it wasn't successed.
Information::
Windows 10 (ver 1809)
tbb version: 2020.0.166 (latest)
tbb path: C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.0.166\windows\tbb
I spent several hours to solve this but I still can't figure out why this was happened and which caused this error so i made this issue.
Problem summary:
- Building and Cmake create solution with -DJET_TASKING_SYSTEM=OpenMP option was successful to build solution.(Release/Debug both was successed.)
- Failed to build solution with TBB
Thanks for reporting this issue! Looks like there are some compiler warnings that are treated as an error. Can you also share the output from the “output” tab from your VS?
Thanks for reporting this issue! Looks like there are some compiler warnings that are treated as an error. Can you also share the output from the “output” tab from your VS?
Sorry for that i forgot. The output line is almost a thousand line so i upload it as a file
Thanks for the log. I think the problematic code from the latest TBB is this:
C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\tbb\include\tbb/parallel_reduce.h(302): warning C4180: qualifier applied to function type has no meaning; ignored
While I investigate further, you can ignore C4180 by adding /wd4180
in cmake/CompileOptions.cmake
line 90:
Thank you sir it worked well now.
I couldn't understand the context, but now it's clear..
and i think i should have read the logs thoroughly even though I don't know much about the cmake stuffs😅
anyway thank you again!
No problem. In fact, this is still a build issue with latest TBB so let me reopen this issue again. Will close it once /wd4180 as well as CI scripts are updated.
I just added single line in the cmake file following your guide. Like below.
/wd4717 # -> disable warning: recursive on all control paths, function will cause runtime stack overflow (wrong warning)
/wd4819 # -> disable warning: The file contains a character that cannot be represented in the current code page (949) (wrong warning)
**/wd4180 # -> disable warning: qualifier applied to function type has no meaning; ignored (wrong warning, tbb_2020.0.166)**
So the builds (Debug,x64), (Release,x64) had no problem
But I'm just curious about this matter more so, do you need to change something more?
From the code perspective, I think it is fine with the one-liner. I need to add proper TBB check in the CI to prevent this from happening again.
As we are revisiting CI's in general, bumping up this issue again.