I was updating the conda-forge build of udunits to 2.2.26 and found that stdbool.h is not available in Visual Studio 9 (but is for v14). This essentially means that it is not possible to build udunit 2.2.26 for Windows and Python 2.
[ 62%] Building C object lib/CMakeFiles/libudunits2.dir/unitcore.c.obj
unitcore.c
C:\bld\udunits2_1515645928472\work\UDUNITS-2-2.2.26\lib\unitcore.c(65) : fatal error C1083: Cannot open include file: 'stdbool.h': No such file or directory
NMAKE : fatal error U1077: 'C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
Traceback (most recent call last):
File "C:\Miniconda\Scripts\conda-build-script.py", line 5, in <module>
sys.exit(conda_build.cli.main_build.main())
File "C:\Miniconda\lib\site-packages\conda_build\cli\main_build.py", line 342, in main
execute(sys.argv[1:])
File "C:\Miniconda\lib\site-packages\conda_build\cli\main_build.py", line 333, in execute
noverify=args.no_verify)
File "C:\Miniconda\lib\site-packages\conda_build\api.py", line 97, in build
need_source_download=need_source_download, config=config)
File "C:\Miniconda\lib\site-packages\conda_build\build.py", line 1524, in build_tree
config=config)
File "C:\Miniconda\lib\site-packages\conda_build\build.py", line 1114, in build
windows.build(m, build_file, config=config)
File "C:\Miniconda\lib\site-packages\conda_build\windows.py", line 232, in build
check_call_env(cmd, cwd=src_dir)
File "C:\Miniconda\lib\site-packages\conda_build\utils.py", line 628, in check_call_env
return _func_defaulting_env_to_os_environ(subprocess.check_call, *popenargs, **kwargs)
File "C:\Miniconda\lib\site-packages\conda_build\utils.py", line 624, in _func_defaulting_env_to_os_environ
return func(_args, **kwargs)
File "C:\Miniconda\lib\subprocess.py", line 186, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmd.exe', '/c', 'bld.bat']' returned non-zero exit status 1
Command exited with code 1
Given how simple it might be to work around (creating a stdbool along the lines of https://stackoverflow.com/a/17249460/741316) I was wondering what the perefered solution was? I could stub in the necessaries on conda-forge, but would personally prefer to fix them here.
I was updating the conda-forge build of udunits to 2.2.26 and found that stdbool.h is not available in Visual Studio 9 (but is for v14). This essentially means that it is not possible to build udunit 2.2.26 for Windows and Python 2.
The relevant PR on conda-forge was https://github.com/conda-forge/udunits2-feedstock/pull/16. With output at https://ci.appveyor.com/project/conda-forge/udunits2-feedstock/build/1.0.52. Specifically:
Given how simple it might be to work around (creating a
stdbool
along the lines of https://stackoverflow.com/a/17249460/741316) I was wondering what the perefered solution was? I could stub in the necessaries on conda-forge, but would personally prefer to fix them here.The relevant commit is https://github.com/Unidata/UDUNITS-2/commit/9335848718a9a4afd11ee9e5233f03a72ff4b09d, which specifically cites AppVeyor CI testing (Windows). This raises the possibility that I've either completely messed up, or the AppVeyor is missing this config (VC9).
Thanks in advance.