jwst icon indicating copy to clipboard operation
jwst copied to clipboard

JWST wheel fails to build >1.3.1 due to cube_build

Open duytnguyendtn opened this issue 3 years ago • 5 comments

Hi all!

I've been trying to track down a build error in JWST, and it appears to have started post 1.3.1 (AKA 1.3.1 is the last version I can install successfully. Appears to be in cube_dq_utils.c, but the error persists going back to 1.3.2, but in cube_match_sky.c. Tracebacks are provided below:

Environment:

Python 3.9.7 (tags/v3.9.7:1016ef3, Aug 30 2021, 20:19:38) [MSC v.1929 64 bit (AMD64)] on win32 OS: Windows 11 21H2 22000.258

Installation on main:

  building 'jwst.cube_build.cube_match_sky_pointcloud' extension
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DNUMPY=1 -IC:\Users\Duy\AppData\Local\Temp\pip-build-env-kbtb12tx\overlay\Lib\site-packages\numpy\core\include -IE:\STScI\gitRepos\astrogrism\envmain\include -IC:\Program Files\Python\Python309\include -IC:\Program Files\Python\Python309\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /Tcjwst/cube_build/src/cube_dq_utils.c /Fobuild\temp.win-amd64-3.9\Release\jwst/cube_build/src/cube_dq_utils.obj
  cube_dq_utils.c
  jwst/cube_build/src/cube_dq_utils.c(109): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
  jwst/cube_build/src/cube_dq_utils.c(110): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
  jwst/cube_build/src/cube_dq_utils.c(139): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
  jwst/cube_build/src/cube_dq_utils.c(140): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
  jwst/cube_build/src/cube_dq_utils.c(522): error C2057: expected constant expression
  jwst/cube_build/src/cube_dq_utils.c(522): error C2466: cannot allocate an array of constant size 0
  jwst/cube_build/src/cube_dq_utils.c(522): error C2133: 'wave_slice_dq': unknown size
  jwst/cube_build/src/cube_dq_utils.c(610): error C2057: expected constant expression
  jwst/cube_build/src/cube_dq_utils.c(610): error C2466: cannot allocate an array of constant size 0
  jwst/cube_build/src/cube_dq_utils.c(610): error C2133: 'wave_slice_dq': unknown size

Installation error on 1.3.2:

  building 'jwst.cube_build.cube_match_sky' extension
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DNUMPY=1 -IC:\Users\Duy\AppData\Local\Temp\pip-build-env-5gl9lryc\overlay\Lib\site-packages\numpy\core\include -IE:\STScI\gitRepos\astrogrism\envmain\include -IC:\Program Files\Python\Python309\include -IC:\Program Files\Python\Python309\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /Tcjwst/cube_build/src/cube_match_sky.c /Fobuild\temp.win-amd64-3.9\Release\jwst/cube_build/src/cube_match_sky.obj
  cube_match_sky.c
  C:\Users\Duy\AppData\Local\Temp\pip-build-env-5gl9lryc\overlay\Lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(14) : Warning Msg: Using deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
  jwst/cube_build/src/cube_match_sky.c(199): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
  jwst/cube_build/src/cube_match_sky.c(200): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
  jwst/cube_build/src/cube_match_sky.c(206): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
  jwst/cube_build/src/cube_match_sky.c(207): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
  jwst/cube_build/src/cube_match_sky.c(612): error C2057: expected constant expression
  jwst/cube_build/src/cube_match_sky.c(612): error C2466: cannot allocate an array of constant size 0
  jwst/cube_build/src/cube_match_sky.c(612): error C2133: 'wave_slice_dq': unknown size
  jwst/cube_build/src/cube_match_sky.c(700): error C2057: expected constant expression
  jwst/cube_build/src/cube_match_sky.c(700): error C2466: cannot allocate an array of constant size 0
  jwst/cube_build/src/cube_match_sky.c(700): error C2133: 'wave_slice_dq': unknown size
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
``

duytnguyendtn avatar Nov 18 '21 22:11 duytnguyendtn

I am surprised you could get a working installation on Windows at all. Looks like there are other outstanding Windows issues too:

  • #4996
  • #4483
  • #4466

pllim avatar Dec 13 '21 19:12 pllim

I can't say that jwst on Windows has been a flawless experience, but I DID have it working for a while, at least enough to develop Astrogrism 😆

duytnguyendtn avatar Dec 17 '21 21:12 duytnguyendtn

@duytnguyendtn Can this be closed or is it still an issue? Of course, we don't support Windows at the moment.

nden avatar Mar 23 '22 13:03 nden

Hi @nden! Yes this is still an issue; still have to install jwst==1.3.1 and stdatamodels=0.2.1 in order to run the pipeline

duytnguyendtn avatar Mar 23 '22 13:03 duytnguyendtn

In my case I need to install stamodels==0.2.4, 0.2.1 is incompatible.

shrx avatar Aug 02 '22 14:08 shrx