Failed to generate makefiles (intel-qs) - c++

https://github.com/iqusoft/intel-qs/issues/32#issue-708056939
I downloaded the relevant package and ran the instructions as shown in the document until I got an error at this step.
CXX=mpiicpc cmake -DIqsMPI=ON -DIqsUtest=ON ..
Then it reported an error
root#vm:~/intel-qs/build# CXX=mpiicpc cmake -DIqsMPI=ON -DIqsUtest=ON ..
-- The CXX compiler identification is unknown
-- Check for working CXX compiler: /opt/intel/compilers_and_libraries_2020.2.254/linux/mpi/intel64/bin/mpiicpc
-- Check for working CXX compiler: /opt/intel/compilers_and_libraries_2020.2.254/linux/mpi/intel64/bin/mpiicpc -- broken
CMake Error at /opt/cmake-3.12.2/share/cmake-3.12/Modules/CMakeTestCXXCompiler.cmake:45 (message):
The C++ compiler
"/opt/intel/compilers_and_libraries_2020.2.254/linux/mpi/intel64/bin/mpiicpc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /root/intel-qs/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_3abc4/fast"
/usr/bin/make -f CMakeFiles/cmTC_3abc4.dir/build.make CMakeFiles/cmTC_3abc4.dir/build
make[1]: Entering directory '/root/intel-qs/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_3abc4.dir/testCXXCompiler.cxx.o
/opt/intel/compilers_and_libraries_2020.2.254/linux/mpi/intel64/bin/mpiicpc -o CMakeFiles/cmTC_3abc4.dir/testCXXCompiler.cxx.o -c /root/intel-qs/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
/opt/intel/compilers_and_libraries_2020.2.254/linux/mpi/intel64/bin/mpiicpc: 1: eval: icpc: not found
CMakeFiles/cmTC_3abc4.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_3abc4.dir/testCXXCompiler.cxx.o' failed
make[1]: *** [CMakeFiles/cmTC_3abc4.dir/testCXXCompiler.cxx.o] Error 127
make[1]: Leaving directory '/root/intel-qs/CMakeFiles/CMakeTmp'
Makefile:121: recipe for target 'cmTC_3abc4/fast' failed
make: *** [cmTC_3abc4/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:17 (project)
-- Configuring incomplete, errors occurred!
See also "/root/intel-qs/CMakeFiles/CMakeOutput.log".
See also "/root/intel-qs/CMakeFiles/CMakeError.log".
If anyone knows how to do it, it would be greatly appreciated.

Related

Failure to compile for arm64 devices

Hello i am quite new to linux and i am trying to do some cross-compilation to run a flutter app on an external device.
Setup :
VM under virtual box : Ubuntu 22.04 LTS
External device : (imx8) with arm64
So i need to compile my app to match the arm64 architecture but i am having many errors that i have no idea how to fix and no idea where they come from :
Failed to cmake:
-- The CXX compiler identification is Clang 14.0.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: /usr/bin/clang++
-- Check for working CXX compiler: /usr/bin/clang++ - broken
-- Configuring incomplete, errors occurred!
See also "/home/tom/test_app/build/elinux/arm64/release/CMakeFiles/CMakeOutput.log".
See also "/home/tom/test_app/build/elinux/arm64/release/CMakeFiles/CMakeError.log".
CMake Error at /usr/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:62 (message):
The C++ compiler
"/usr/bin/clang++"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/tom/test_app/build/elinux/arm64/release/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_46f48/fast && /usr/bin/gmake -f CMakeFiles/cmTC_46f48.dir/build.make CMakeFiles/cmTC_46f48.dir/build
gmake[1]: Entering directory '/home/tom/test_app/build/elinux/arm64/release/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_46f48.dir/testCXXCompiler.cxx.o
/usr/bin/clang++ --target=aarch64-linux-gnu --sysroot=/opt/arm64-sysroot -MD -MT CMakeFiles/cmTC_46f48.dir/testCXXCompiler.cxx.o -MF
CMakeFiles/cmTC_46f48.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_46f48.dir/testCXXCompiler.cxx.o -c
/home/tom/test_app/build/elinux/arm64/release/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
Linking CXX executable cmTC_46f48
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_46f48.dir/link.txt --verbose=1
/usr/bin/clang++ --target=aarch64-linux-gnu --sysroot=/opt/arm64-sysroot CMakeFiles/cmTC_46f48.dir/testCXXCompiler.cxx.o -o cmTC_46f48
/usr/bin/aarch64-linux-gnu-ld: cannot find Scrt1.o: No such file or directory
/usr/bin/aarch64-linux-gnu-ld: cannot find crti.o: No such file or directory
/usr/bin/aarch64-linux-gnu-ld: cannot find crtbeginS.o: No such file or directory
/usr/bin/aarch64-linux-gnu-ld: cannot find -lstdc++: No such file or directory
/usr/bin/aarch64-linux-gnu-ld: cannot find -lm: No such file or directory
/usr/bin/aarch64-linux-gnu-ld: cannot find -lgcc_s: No such file or directory
/usr/bin/aarch64-linux-gnu-ld: cannot find -lgcc: No such file or directory
/usr/bin/aarch64-linux-gnu-ld: cannot find -lc: No such file or directory
/usr/bin/aarch64-linux-gnu-ld: cannot find -lgcc_s: No such file or directory
/usr/bin/aarch64-linux-gnu-ld: cannot find -lgcc: No such file or directory
/usr/bin/aarch64-linux-gnu-ld: cannot find crtendS.o: No such file or directory
/usr/bin/aarch64-linux-gnu-ld: cannot find crtn.o: No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [CMakeFiles/cmTC_46f48.dir/build.make:100: cmTC_46f48] Error 1
gmake[1]: Leaving directory '/home/tom/test_app/build/elinux/arm64/release/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:127: cmTC_46f48/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
For more specification, i am using the flutter-elinux package to cross-compile and i have raised an issue there, but i am not sure the issue comes from the package as i don't know anything about linux compilation.
I have installed manually the following packages :
sudo apt install cpp-aarch64-linux-gnu
sudo apt install binutils-aarch64-linux-gnu
Thanks in advance for any help i really need to get this working...
EDIT : i have tried another solution using a docker container and the image arm64v8/ubuntu:18.04.
I have created a systroot ubuntu18-arm64-sysroot on my host and i use it to compile my app in arm64 arch. I am having the following error only :
Failed to cmake:
-- The CXX compiler identification is unknown
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: /home/tom/ubuntu18-arm64-sysroot/usr/bin/clang++
-- Check for working CXX compiler: /home/tom/ubuntu18-arm64-sysroot/usr/bin/clang++ - broken
-- Configuring incomplete, errors occurred!
See also "/home/tom/test_app/build/elinux/arm64/debug/CMakeFiles/CMakeOutput.log".
See also "/home/tom/test_app/build/elinux/arm64/debug/CMakeFiles/CMakeError.log".
CMake Error at /usr/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:62 (message):
The C++ compiler
"/home/tom/ubuntu18-arm64-sysroot/usr/bin/clang++"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/tom/test_app/build/elinux/arm64/debug/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_848af/fast && /usr/bin/gmake -f
CMakeFiles/cmTC_848af.dir/build.make CMakeFiles/cmTC_848af.dir/build
gmake[1]: Entering directory '/home/tom/test_app/build/elinux/arm64/debug/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_848af.dir/testCXXCompiler.cxx.o
/home/tom/ubuntu18-arm64-sysroot/usr/bin/clang++ -o CMakeFiles/cmTC_848af.dir/testCXXCompiler.cxx.o -c
/home/tom/test_app/build/elinux/arm64/debug/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
aarch64-binfmt-P: Could not open '/lib/ld-linux-aarch64.so.1': No such file or directory
gmake[1]: *** [CMakeFiles/cmTC_848af.dir/build.make:78: CMakeFiles/cmTC_848af.dir/testCXXCompiler.cxx.o] Error 255
gmake[1]: Leaving directory '/home/tom/test_app/build/elinux/arm64/debug/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:127: cmTC_848af/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)

I have error in cmake make make install fmm

I want to install fast map matching fmm on windows (win7)
and cmake has an error: after command "cmake .."
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: /cygdrive/c/MinGW/bin/c++.exe
-- Check for working CXX compiler: /cygdrive/c/MinGW/bin/c++.exe - broken
CMake Error at /usr/share/cmake-3.20.0/Modules/CMakeTestCXXCompiler.cmake:59 (message):
The C++ compiler
"/cygdrive/c/MinGW/bin/c++.exe"
It's not able to compile a simple test program.
It fails with the following output:
Change Dir: /cygdrive/e/fmm/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make.exe -f Makefile cmTC_c3891/fast && /usr/bin/make -f CMakeFiles/cmTC_c3891.dir/build.make CMakeFiles/cmTC_c3891.dir/build
make[1]: Entering directory `/cygdrive/e/fmm/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_c3891.dir/testCXXCompiler.cxx.o
/cygdrive/c/MinGW/bin/c++.exe -O3 -DSPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_TRACE -o CMakeFiles/cmTC_c3891.dir/testCXXCompiler.cxx.o -c /cygdrive/e/fmm/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
c++.exe: error: /cygdrive/e/fmm/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx: No such file or directory
c++.exe: fatal error: no input files
compilation terminated.
make[1]: *** [CMakeFiles/cmTC_c3891.dir/testCXXCompiler.cxx.o] Error 1
make[1]: Leaving directory `/cygdrive/e/fmm/build/CMakeFiles/CMakeTmp'
make: *** [cmTC_c3891/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:31 (project)
and because cmake not success, make -j8 has error
make -j8
make: *** No targets specified and no makefile found. Stop.
update:cmake has successed,the error is that i don't install enough librarys.
but i have error in make and make install
E:/anaconda/include/pyport.h:726:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
726 | #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
| ^~~~~
In file included from /usr/include/cpl_progress.h:33,
from /usr/include/ogrsf_frmts.h:34,
from /cygdrive/e/fmm/src/core/geometry.hpp:14,
from /cygdrive/e/fmm/build/python/CMakeFiles/pyfmm.dir/fmmPYTHON_wrap.cxx:3392:
/usr/include/cpl_port.h:156:12: fatal error: direct.h: No such file or directory
156 | # include <direct.h>
i have tried to switch anaconda to the 64 bit ,it has the same error

CLion - can't run a program on apple m1

I ran clion a month ago and it worked perfectly. Now when I run a program I get:
/bin/sh: /Users/a/Library/Application Support/JetBrains/Toolbox/apps/CLion-ARM/ch-0/203.7717.62/CLion.app/Contents/bin/cmake/mac/bin/cmake: No such file or directory
make: *** [cmake_check_build_system] Error 127
Also, on clion startup, the cmake tool window shows me an error:
CMake Warning at /Users/a/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-1/211.7142.21/CLion.app/Contents/bin/cmake/mac/share/cmake-3.19/Modules/Platform/Darwin-Initialize.cmake:303 (message):
Ignoring CMAKE_OSX_SYSROOT value:
/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk
because the directory does not exist.
Call Stack (most recent call first):
/Users/a/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-1/211.7142.21/CLion.app/Contents/bin/cmake/mac/share/cmake-3.19/Modules/CMakeSystemSpecificInitialize.cmake:21 (include)
CMakeLists.txt:2 (project)
-- The C compiler identification is AppleClang 12.0.5.12050022
-- The CXX compiler identification is AppleClang 12.0.5.12050022
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - broken
CMake Error at /Users/a/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-1/211.7142.21/CLion.app/Contents/bin/cmake/mac/share/cmake-3.19/Modules/CMakeTestCCompiler.cmake:66 (message):
The C compiler
"/Library/Developer/CommandLineTools/usr/bin/cc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /Users/a/CLionProjects/untitled1/cmake-build-debug/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_e3f61/fast && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_e3f61.dir/build.make CMakeFiles/cmTC_e3f61.dir/build
Building C object CMakeFiles/cmTC_e3f61.dir/testCCompiler.c.o
/Library/Developer/CommandLineTools/usr/bin/cc -arch arm64 -o CMakeFiles/cmTC_e3f61.dir/testCCompiler.c.o -c /Users/a/CLionProjects/untitled1/cmake-build-debug/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_e3f61
"/Users/a/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-1/211.7142.21/CLion.app/Contents/bin/cmake/mac/bin/cmake" -E cmake_link_script CMakeFiles/cmTC_e3f61.dir/link.txt --verbose=1
/Library/Developer/CommandLineTools/usr/bin/cc -arch arm64 -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTC_e3f61.dir/testCCompiler.c.o -o cmTC_e3f61
ld: library not found for -lSystem
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [cmTC_e3f61] Error 1
make: *** [cmTC_e3f61/fast] Error 2
I have xcode command line tools installed. What should I do?
Erase cmake-build-... directory manually and reload a CMake project.

Installing LibTorch on OSX: unsupported option fopenmp

I'm trying to follow the instructions (here https://pytorch.org/cppdocs/installing.html) to install LibTorch on OSX. I was all going well up until the "make" command, which returned
Scanning dependencies of target example-app
[ 50%] Building CXX object CMakeFiles/example-app.dir/example-app.cpp.o
clang: error: unsupported option '-fopenmp'
make[2]: *** [CMakeFiles/example-app.dir/example-app.cpp.o] Error 1
make[1]: *** [CMakeFiles/example-app.dir/all] Error 2
make: *** [all] Error 2
Any ideas how I can fix this issue?
By the way, in the earlier cmake step, it seems like the compiler Cmake found was the default system compiler on Mac:
-- 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

Test Cmake run finished with errors (CLION)

I have the following problem after changing path to one that is easier for the operating system. My MinGW configuration in CLion:
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: C:/MinGW/bin/gcc.exe
-- Check for working C compiler: C:/MinGW/bin/gcc.exe -- broken
CMake Error at C:/Program Files/JetBrains/CLion 2018.2.5/bin/cmake/win/share/cmake-3.12/Modules/CMakeTestCCompiler.cmake:52 (message):
The C compiler
"C:/MinGW/bin/gcc.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/Michał/AppData/Local/Temp/cmake_check_environment/_build/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_da460/fast"
C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_da460.dir\build.make CMakeFiles/cmTC_da460.dir/build
mingw32-make.exe[1]: Entering directory 'C:/Users/Micha│/AppData/Local/Temp/cmake_check_environment/_build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_da460.dir/testCCompiler.c.obj
C:\MinGW\bin\gcc.exe -o CMakeFiles\cmTC_da460.dir\testCCompiler.c.obj -c C:\Users\Michał\AppData\Local\Temp\cmake_check_environment\_build\CMakeFiles\CMakeTmp\testCCompiler.c
gcc.exe: error: C:\Users\Michał\AppData\Local\Temp\cmake_check_environment\_build\CMakeFiles\CMakeTmp\testCCompiler.c: No such file or directory
gcc.exe: fatal error: no input files
compilation terminated.
CMakeFiles\cmTC_da460.dir\build.make:64: recipe for target 'CMakeFiles/cmTC_da460.dir/testCCompiler.c.obj' failed
mingw32-make.exe[1]: *** [CMakeFiles/cmTC_da460.dir/testCCompiler.c.obj] Error 1
mingw32-make.exe[1]: Leaving directory 'C:/Users/Micha│/AppData/Local/Temp/cmake_check_environment/_build/CMakeFiles/CMakeTmp'
Makefile:120: recipe for target 'cmTC_da460/fast' failed
mingw32-make.exe: *** [cmTC_da460/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:1 (project)
-- Configuring incomplete, errors occurred!
See also "C:/Users/Michał/AppData/Local/Temp/cmake_check_environment/_build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Michał/AppData/Local/Temp/cmake_check_environment/_build/CMakeFiles/CMakeError.log".
Error code: 1
Here is a screenshot from my PC: