Closed arnoudbuzing closed 4 years ago
I'll just note that cmake also fails on macOS if the path to the installation directory has spaces in it. I usually use /Applications/Mathematica 12.1.app
, with a space. But it fails in a different way: it hangs after -- VERSION_NUMBER: 1200
.
Another related problem...for earlier versions of Visual Studio, cmake defaults to the 32-bit compiler (which is terribly annoying). But build system here assumes a 64-bit target because it points directly to the Windows-x86-64 libraries in the layout.
I think it would be fine to simply not support 32-bit Windows. But it would be a nice courtesy to inform people that Windows 32-bit tooling isn't supported through error messaging rather than setting up a linker error which may be quite mysterious to some.
@szhorvat can you please give the exact command-line that causes the hang?
And @szhorvat , did you mean to say /Applications/Mathematica 12.1.app
is reporting -- VERSION_NUMBER: 1200
, or was that a typo? Is the hang 100% reproducible?
@bostick Sorry, it seems I was wrong. The hand happens with certain M versions only. With 11.1.1, I see a hang at this point, and Ctrl-C won't kill it:
~/R/codeparser (master↓13|…) $ mkdir build
~/R/codeparser (master↓13|…) $ cd build/
~/R/c/build (master↓13|✔) $ ls
~/R/c/build (master↓13|✔) $ cmake -DMATHEMATICA_INSTALL_DIR=/Applications/Mathematica\ 11.1.app/Contents/ ..
-- The C compiler identification is AppleClang 11.0.0.11000033
-- The CXX compiler identification is AppleClang 11.0.0.11000033
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- PACLET: CodeParser
-- WOLFRAMKERNEL: /Applications/Mathematica 11.1.app/Contents/MacOS/WolframKernel
-- BUILD_DOCS: OFF
-- BUILD_EXE: OFF
-- BUILD_EXPR_LIB: ON
-- USE_MATHLINK: ON
-- NISSUES: OFF
-- NABORT: OFF
-- LOCAL_BUILD: OFF
-- VERSION_NUMBER: 1111
With 11.3.0, I see a hang here:
cmake -DMATHEMATICA_INSTALL_DIR=/Applications/Mathematica\ 11.3.app/Contents/ ..
-- The C compiler identification is AppleClang 11.0.0.11000033
-- The CXX compiler identification is AppleClang 11.0.0.11000033
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- PACLET: CodeParser
-- WOLFRAMKERNEL: /Applications/Mathematica 11.3.app/Contents/MacOS/WolframKernel
-- BUILD_DOCS: OFF
-- BUILD_EXE: OFF
-- BUILD_EXPR_LIB: ON
-- USE_MATHLINK: ON
-- NISSUES: OFF
-- NABORT: OFF
-- LOCAL_BUILD: OFF
12.1.0 and 12.0.0 worked without problems.
@szhorvat Good! (well, hang is not good). It's good to line up with what I was expecting.
The hang you are seeing was a MathLink bug that was fixed in 12.0. (not that it helps, but the "hang" actually only lasts 30 minutes, but for all intents and purposes, yes, it is a hang)
I still want to put in a nice message about 32-bit-expectation vs. 64-bit-expectation on Windows, so not closing yet.
If we want to discuss more non-Windows related things, we can open another issue.
Also, to be clear, I will be putting in a work-around for hang that is seen
If we can keep this issue for just the cmake issue I reported on Windows, that would be good (and not make it a catch-all for any cmake issue in this repo).
I've added pauses to work-around the hang that @szhorvat has seen, and also add a nice fatal error message if CMake is running as 32-bit build and Mathematica is running as 64-bit:
CMake is reporting 32-bit; Mathematica is reporting: 64
I don't speak cmake very well, but I think this is supposed to work for me on Windows (I have VS 2019 installed):