-
Notifications
You must be signed in to change notification settings - Fork 256
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
compiled failed on windows #799
Comments
I meet this error on Mac,how do you fixed it ? |
I tried to reproduce the error with the following steps on Windows 11 23H2 (but it built without error for me):
Could you please describe the exact steps to reproduce the error that you are seeing? |
|
Thx, I compiled by your commands, but it gave me same error results.
If I set |
IIUC, building fails for you when you are trying to use |
Found a direct download link for the Intel Fortran compilers: That installed
With it, compilation fails for me (but with a different error than what you were showing). I'm using the following commands to configure and build:
The error is on linking
And there is indeed no It correctly exports the symbols from
However, using
Afaict, that is because The same issue with That looks like a CMake issue to me. There is probably nothing that SuiteSparse can do about it. Disabling CUDA leads to I didn't find an open ticket for either issue on https://gitlab.kitware.com/cmake/cmake/-/issues. |
I opened an issue for CMake: https://gitlab.kitware.com/cmake/cmake/-/issues/26005 |
I also found Fortran Source file would not be compiled to |
I cannot reproduce that. Using the "Ninja Multi-Config" generator, I find, e.g., The Fortran sources are obviously not built if you configured with |
Not sure why this was closed. I can reproduce the issue with the given configuration. I was hoping that this could be fixed (more or less easily) in CMake. But trying to understand their code, this might be more involved than I initially expected. A possible workaround might be to set |
If no linker preference is set for a shared library, CMake is choosing the executable that is used for linking based on the highest linker preference value. If a library consists of C and Fortran sources, the Fortran compiler frontend has the higher linker preference value and it is chosen by default. For the Intel oneAPI compiler with MSVC-like syntax `icx-cl` as the C and C++ compiler and the Intel oneAPI Fortran compilers `ifort` or `ifx`, this leads to the following situation in combination with `WINDOWS_EXPORT_ALL_SYMBOLS`: * The symbols that are to be exported from the library are collected from the C objects and written to a `.def` file. * Flags are generated that pass that `.def file to the linker. However, the syntax for these flags match the C compiler `icx-cl`. * The Fortran compiler is used for linking (higher linker preference value). But .def files need to be passed differently for `ifx` or `ifort` than for `icx-cl`. That leads to the linked libraries being empty or only exporting the Fortran symbols. Explicitly specify to use the C compiler frontend as the linker for the AMD and CHOLMOD libraries to work around that issue. Fixes DrTimothyAldenDavis#799.
If no linker preference is set for a shared library, CMake is choosing the executable that is used for linking based on the highest linker preference value. If a library consists of C and Fortran sources, the Fortran compiler frontend has the higher linker preference value and it is chosen by default. For the Intel oneAPI compiler with MSVC-like syntax `icx-cl` as the C and C++ compiler and the Intel oneAPI Fortran compilers `ifort` or `ifx`, this leads to the following situation in combination with `WINDOWS_EXPORT_ALL_SYMBOLS`: * The symbols that are to be exported from the library are collected from the C objects and written to a `.def` file. * Flags are generated that pass that `.def` file to the linker. However, the syntax for these flags match the C compiler `icx-cl`. * The Fortran compiler is used for linking (higher linker preference value). But `.def` files need to be passed differently for `ifx` or `ifort` than for `icx-cl`. * That leads to the linked libraries being empty or only exporting the Fortran symbols. Explicitly specify to use the C compiler frontend as the linker for the AMD and CHOLMOD libraries to work around that issue. Fixes DrTimothyAldenDavis#799.
I opened #853 that should work around the issue with that combination of compilers. |
Describe the bug
Can't compile CHOLMOD
To Reproduce
mkdir build
cd build
cmake .. -DCMAKE_CXX_COMPILER=icc -DCMAKE_C_COMPILER=icc -DCMAKE_Fortran_COMPILER=ifort -DCMAKE_INSTALL_PREFIX="E:/umfpackCompilerWork/SuiteSparse7.7" -DSUITESPARSE_ENABLE_PROJECTS="umfpack"
the result of cmake stored in
config.log
config.log
msbuild SuiteSparse.sln /p:Configuration=Release > compile.log
the result of build stored in compile.log
compile.log
Expected behavior
normal compilation
Screenshots
Desktop (please complete the following information):
Additional context
I found
-DCMAKE_CXX_COMPILER=icc -DCMAKE_C_COMPILER=icc
also not work.The text was updated successfully, but these errors were encountered: