Compilers that do not support bool are not supported

I am really struggling to compile ITK v4.12.x or v4.13.x on Windows. I have had no issues with Linux.

I have tried using the releases v4.12.2 v4.12.3 v4.13.0 and v4.13.1, along with the latest version of the Visual Studio 2017 compiler as well as mingw-w64 v8.x and mingw-w64 v5.x and I’m getting the same cmake error with every combination of the above:

“Compilers that do not support bool are not supported”

This is raised in:

/ITK/Modules/ThirdParty/VNL/src/vxl/config/cmake/configVXLIntrospectionConfig.cmake

Has anyone ever seen the same error and any ideas what I might do to fix it?

Thank you in advance

Hi Tom,

How is CMake invoked?

Matt

Hi Matt.
It’s during the cmake execution that the error is raised (before getting to the compilation step).

More specifically,

Is the CMake Qt GUI or command line executable being used?

Is the build tree empty before initial configuration?

Which CMake generator is used?

I’ve tried using both the GUI and command line.
The build tree/cache is always empty and working from an empty build directory.
I’ve used both the ‘Visual Studio 15 2017’ and ‘Ninja’ generators, which produce the same error.

That error is really strange. Which version of CMake are you using? Which minor and patch version of Visual Studio 2017 are you using?

Sounds good. The only tip here is to make sure to run from a Visual Studio Command Prompt, which sets the required environmental variables, when using the Ninja generator.

But, it sounds like a re-install of Visual Studio would be worthwhile.

OK, so I have a fresh install of Windows 10 with a fresh install of:

I use the “Developer Command Prompt for VS 2017” to set all environment variables and run cmake with default options and I’m still getting the error:

-- Performing Test VCL_HAS_BOOL
-- Performing Test VCL_HAS_BOOL - Failed
CMake Error at Modules/ThirdParty/VNL/src/vxl/config/cmake/config/VXLIntrospectionConfig.cmake:391 (message):
  Compilers that do not support bool are not supported
Call Stack (most recent call first):
  Modules/ThirdParty/VNL/src/vxl/CMakeLists.txt:183 (include)

Any help on the matter would be greatly appreciated

I have the same versions of CMake, VS and ITK. I could not reproduce your problem. I have Windows 7, but I doubt that matters. Can you attach the entire log CMake produces, and including the invoking command too? E.g. command: cmake ../InsightToolkit-4.13.1, log: ITK-4.13.1_CMake.log (44.2 KB)

Edit: to produce the log, you can invoke CMake like this: cmake ../InsightToolkit-4.13.1 >itkCMake.log 2>&1

Sure.
I have the directory structure:

  • Root of repo is cloned to C:\ITK
  • Build directory is at C:\ITK\build
  • From C:\ITK\build I run cmake .. > ITK.log 2>%1 (to create the log file)

Here is the ITK.log file: ITK.log (16.3 KB)

Here is the CMakeError.log file: CMakeError.log (148.8 KB)

I am only able to attach two files, so I’m unable to include the CMakeOutput.log file

Perhaps I can include it in a new post:
CMakeOutput.log (35.2 KB)

The last part of CMakeError.log seems the most useful. The root cause is:

'C:\ITK\Modules\ThirdParty\KWSys\src\KWSys\kwsysPlatformTestsCXX.cxx': No such file or directory

The file mentioned exists in my source directory, but it looks like it doesn’t in yours. Perhaps your download was incomplete? Or you accidentally deleted some files? If your source directory is managed by git, can you do a git reset --hard v4.13.1?

Hi - I’ve tried as you have suggested and I still get the same error.
I’ve set up another machine with fresh installs of everything and I’m getting the same error on that machine too…

I would try another compiler, but I’ve not had much luck with MinGW either.

For reference, I’ve tried using both the v4.13.1 and v4.12.2 tags of ITK

Here’s the output when using the ninja build system

CMakeError.log (35.0 KB)
CMakeOutput.log (8.3 KB)

Ninja gives pretty much the same error: ninja: error: 'C:/Users/Tom/code/ITK/Modules/ThirdParty/KWSys/src/KWSys/kwsysPlatformTestsCXX.cxx', needed by 'CMakeFiles/cmTC_732dd.dir/kwsysPlatformTestsCXX.cxx.obj', missing and no known rule to make it. Can you please check whether that file really exists? Perhaps an antivirus is messing with it, or something else?

Sorry that you are experiencing so much difficulty, @Tom_Hampshire.

As @dzenanz notes, it sounds like there is problems accessing the source files.

Antivirus has resulted in similar frustrating behavior in the past.

Also, configuring Windows to support long paths is also worth investigating. It is described in this post:

I can confirm that the file exists in that path

Hi both:
To elaborate on my previous post:

  • I have checked that the file that is ‘missing’. It is not missing, it is present at the path specified by the error message
  • I don’t have any antivirus software installed (I turned off Windows Defender)
  • I have enabled long paths in Windows 10
  • I tried moving the ITK source and build paths to c:\ITK and c:\itk_build respectively

… unfortunately, I am out of any further things to try. Have you got any other ideas?

Hi,
look at ITK.log file (first in this thread), very strange problems began before “bool not supported” issue


– Checking whether header cstdio is available
– Checking whether header cstdio is available - no
– Checking for Large File Support
– Checking for Large File Support - failed to compile
– Checking whether C++ compiler has ‘long long’
– Checking whether C++ compiler has ‘long long’ - no
– Checking whether C++ compiler has ‘__int64’
– Checking whether C++ compiler has ‘__int64’ - no
– Checking whether wstring is available
– Checking whether wstring is available - no
– Checking whether C compiler has ptrdiff_t in stddef.h
– Checking whether C compiler has ptrdiff_t in stddef.h - no
– Checking whether C compiler has ssize_t in unistd.h
– Checking whether C compiler has ssize_t in unistd.h - no
– Checking whether C compiler has clock_gettime
– Checking whether C compiler has clock_gettime - no

Regards,
M

1 Like

I have uninstalled VS 2017 and installed Visual Studio Build Tools 2017 15.8.3.
I get exactly the same problem as before…

I can’t be the only one having this problem. I’m working with a fresh install of Windows 10.