-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Failed to compile the last version 2022.0.0 with MinGW under Windows 10 : Error in CMake "math cannot parse the expression" #1592
Comments
Error similar to #1556. I guess the GAS version has a prefix or a suffix on MinGW. |
@Jhuighuy Thanks for you reply :) |
@fdiedler Looks like I've made a misleading comment. The issue is not related to the GAS version (no easy workaround here by the way, submitted a PR). It looks like there is no For a quick workaround, I think, here you can replace execute_process(
COMMAND ${CMAKE_COMMAND} -E env "LANG=C" ${CMAKE_CXX_COMPILER} -xc -c /dev/null -Wa,-v -o/dev/null
OUTPUT_VARIABLE ASSEMBLER_VERSION_LINE_OUT
ERROR_VARIABLE ASSEMBLER_VERSION_LINE_ERR
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_STRIP_TRAILING_WHITESPACE
) with something like set(_empty_file "${CMAKE_BINARY_DIR}/empty.c")
file(TOUCH "${_empty_file}")
execute_process(
COMMAND ${CMAKE_CXX_COMPILER} -Wa,-v -c "${_empty_file}" -o "${_empty_file}.o"
OUTPUT_VARIABLE ASSEMBLER_VERSION_LINE_OUT
ERROR_VARIABLE ASSEMBLER_VERSION_LINE_ERR
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_STRIP_TRAILING_WHITESPACE
)
file(REMOVE "${_empty_file}")
file(REMOVE "${_empty_file}.o")
unset(_empty_file) If it helps, a PR can be submitted. |
@Jhuighuy Thanks, seems to works just have a message :
What does it means ? I also have an error while building tests :
Thanks |
Summary
Hi,
I was not able to compile the oneTBB library for the last version 2022.0.0 (it works fine with the previous version 2021.13.0)
Version
Version 2022.0.0
Environment
Windows 10
CMake 3.30.2
mingw64-13.2.0 for GCC and G++ compiler
Observed Behavior
compilation terminated. * 1000 + g++.exe: fatal error: input file
'/dev/null' is the same as output file
compilation terminated.": syntax error, unexpected exp_DIVIDE (35).
Call Stack (most recent call first):
CMakeLists.txt:234 (include)
GNU Assembler version: c++.exe: fatal error: input file '/dev/null' is the same as output file
compilation terminated..c++.exe: fatal error: input file '/dev/null' is the same as output file
compilation terminated. (ERROR)
The C compiler identification is GNU 13.2.0
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working C compiler: C:/mingw64-13.2.0/bin/gcc.exe - skipped
Detecting C compile features
Detecting C compile features - done
HWLOC target HWLOC::hwloc_1_11 doesn't exist. The tbbbind target cannot be created
HWLOC target HWLOC::hwloc_2 doesn't exist. The tbbbind_2_0 target cannot be created
HWLOC target HWLOC::hwloc_2_5 doesn't exist. The tbbbind_2_5 target cannot be created
Performing Test LINKER_HAS_NO_AS_NEEDED
Performing Test LINKER_HAS_NO_AS_NEEDED - Success
Configuring incomplete, errors occurred!
Expected Behavior
No errors in CMake
Steps To Reproduce
Just load the source file in CMake, press Configure and select "MinGW makefiles" and "Use default native compilers" (assuming you have in your PATH environment the right compiler otherwise select "Specify native compilers" and choose the path to GCC and G++)
Thanks,
The text was updated successfully, but these errors were encountered: