Skip to content
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

Open
fdiedler opened this issue Jan 5, 2025 · 0 comments
Labels

Comments

@fdiedler
Copy link

fdiedler commented Jan 5, 2025

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

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=C:/mingw64-13.2.0/bin/../libexec/gcc/x86_64-w64-mingw32/13.2.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../../../src/gcc-13.2.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/buildroot/x86_64-1320-win32-seh-ucrt-rt_v11-rev1/mingw64 --enable-host-shared --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=win32 --enable-libstdcxx-threads=yes --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --enable-libstdcxx-filesystem-ts=yes --disable-libssp --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/buildroot/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/buildroot/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/buildroot/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/buildroot/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-win32-seh-rev1, Built by MinGW-Builds project' --with-bugurl=https://github.com/niXman/mingw-builds CFLAGS='-O2 -pipe -fno-ident -I/c/buildroot/x86_64-1320-win32-seh-ucrt-rt_v11-rev1/mingw64/opt/include -I/c/buildroot/prerequisites/x86_64-zlib-static/include -I/c/buildroot/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/buildroot/x86_64-1320-win32-seh-ucrt-rt_v11-rev1/mingw64/opt/include -I/c/buildroot/prerequisites/x86_64-zlib-static/include -I/c/buildroot/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/buildroot/x86_64-1320-win32-seh-ucrt-rt_v11-rev1/mingw64/opt/include -I/c/buildroot/prerequisites/x86_64-zlib-static/include -I/c/buildroot/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/buildroot/x86_64-1320-win32-seh-ucrt-rt_v11-rev1/mingw64/opt/lib -L/c/buildroot/prerequisites/x86_64-zlib-static/lib -L/c/buildroot/prerequisites/x86_64-w64-mingw32-static/lib ' LD_FOR_TARGET=/c/buildroot/x86_64-1320-win32-seh-ucrt-rt_v11-rev1/mingw64/bin/ld.exe --with-boot-ldflags=' -Wl,--disable-dynamicbase -static-libstdc++ -static-libgcc'
Thread model: win32
Supported LTO compression algorithms: zlib
gcc version 13.2.0 (x86_64-win32-seh-rev1, Built by MinGW-Builds project)

Observed Behavior

The CXX compiler identification is GNU 13.2.0
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Check for working CXX compiler: C:/mingw64-13.2.0/bin/c++.exe - skipped
Detecting CXX compile features
Detecting CXX compile features - done
CMAKE_BUILD_TYPE is not specified. Using default: RelWithDebInfo
Performing Test CMAKE_HAVE_LIBC_PTHREAD
Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
Check if compiler accepts -pthread
Check if compiler accepts -pthread - yes
Found Threads: TRUE
IPO enabled
CMake Error at cmake/compilers/GNU.cmake:65 (math):
math cannot parse the expression: "g++.exe: fatal error: input file
'/dev/null' is the same as output file

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,

@fdiedler fdiedler added the bug label Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant