-
Notifications
You must be signed in to change notification settings - Fork 185
Build error with ifx on windows #979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This means that the hash test is not built. Other than that, running the build ignoring this error, the build completes. However, there are test failures.
The errors encountered:
|
@R-Goc would you mind testing the following:
I tested with oneAPI25 on Windows and managed to build everything |
Actually still fails with that. The output now:
it seems like a lot of weirdness around msvc libs is happening. |
Builds on release mode |
I have a hack that makes it build in debug modes |
Is to too hacky? or something we could consider to patch the build? |
Which should only happen on debug builds. also
this should be set to use the debug version on builds with debug info. |
This seems to be what I ended up on: if(WIN32)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDLL$<$<CONFIG:Debug>:Debug>")
target_compile_options(
test_hash_functions
PRIVATE
$<$<COMPILE_LANGUAGE:Fortran>:/libs:dll>
)
if (CMAKE_BUILD_TYPE STREQUAL "Debug" OR "RelWithDebInfo")
target_link_options(test_hash_functions
PRIVATE
/Qoption,link,/NODEFAULTLIB:libcmt
/Qoption,link,/NODEFAULTLIB:msvcrt.lib
/Qoption,link,/NODEFAULTLIB:libifcoremt.lib
)
endif()
endif() |
This is the test output with that:
All three failure overflow the stack |
A top level: |
So it seems like having everything working and building on native windows is very much possible. Still not sure why that c/c++ library weirdness is happening. |
Yes it is possible, I tested also with GNU and the segfaults I saw were comming also from the stack issue on Windows. I'll open a PR on this. |
Stdlib does not perform CI tests on ifx on Windows. Can we set up tests for ifx with the help of setup-fortran and msys2 environment? Install cmake, ninja, fypp with msys2, set intel fortran and C compiler with setup-fortran? |
Looking at setup fortran it seems possible for IFX at least. I don't use msys so I won't comment on that. Not sure if msys makes any modifications to cmake. But it should be possible to install the other dependcies using pip. I don't have experience with setting up ci containers though. The way I tested it for Intel was fully on windows. But I do have binutils in path so not sure if it would work without those. Both compilers are useful for different things as Intel is for msvc ABI while msys gfortran is for the mingw ABI. To build with the Intel compiler you either need to run in the oneapi command prompt, or run the setvars.bat script under Intel\oneapi. |
For windows, the easiest way to install intel oneapi for a CI would be using conda (from Miniforge3): conda install anaconda::cmake
conda install conda-forge::ninja
conda install -c http://software.repos.intel.com/python/conda/ -c conda-forge dpcpp-cpp-rt dpcpp_win-64
conda install -c http://software.repos.intel.com/python/conda/ -c conda-forge intel-fortran-rt ifx_win-64 On windows this will install the required mvsc libraries within the conda base environement. examples of miniforge actions https://github.com/marketplace/actions/setup-miniconda#example-10-miniforge |
I tried building with ifx on windows. The way the compiler options are handled, the default language mode is set to fortran 18 (/stand:f18) files in .f90 have a large number of warnings for deprecated constructs. Also there is a large amount of unused variable warnings. Edit: I see the warnings are due to the normal build being a RelWithDebInfo. So the debug flags are used as well.
However the build also fails with and issue with finding c++ standard library symbols.
The text was updated successfully, but these errors were encountered: