Скопируйте предварительно скомпилированные двоичные файлы g cc в другой Raspbian - PullRequest
0 голосов
/ 18 июня 2020

Я пытаюсь обновить компилятор g cc с версии 8.3 до версии 8.4. Официальная документация g cc предполагает компиляцию из исходного кода, что в среднем занимает 5 часов. Мне нужна версия g cc -8.4 для сборки некоторых компонентов проекта с помощью CMAKE. Я попытался скопировать двоичные файлы из x (на котором я скомпилировал g cc -8.4 из источника), расположенного в /usr/local/bin и /usr/local/bin, по тому же пути в y , но cmake выдает следующую ошибку

pi@raspberrypi:~/vingman/loki/bld $ cmake -DUNIT_TESTS=OFF -DPLATFORM=RASPI ../
-- The CXX compiler identification is unknown
-- The C compiler identification is unknown
-- Check for working CXX compiler: /usr/local/bin/c++
-- Check for working CXX compiler: /usr/local/bin/c++ -- broken
CMake Error at /usr/share/cmake-3.13/Modules/CMakeTestCXXCompiler.cmake:45 (message):
  The C++ compiler

"/usr/local/bin/c++"



is not able to compile a simple test program.

  It fails with the following output:

Change Dir: /home/pi/vingman/loki/bld/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_d4b13/fast"
/usr/bin/make -f CMakeFiles/cmTC_d4b13.dir/build.make CMakeFiles/cmTC_d4b13.dir/build
make[1]: Entering directory '/home/pi/vingman/loki/bld/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_d4b13.dir/testCXXCompiler.cxx.o
/usr/local/bin/c++     -o CMakeFiles/cmTC_d4b13.dir/testCXXCompiler.cxx.o -c /home/pi/vingman/loki/bld/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
c++: error trying to exec 'cc1plus': execvp: No such file or directory
make[1]: *** [CMakeFiles/cmTC_d4b13.dir/build.make:66: CMakeFiles/cmTC_d4b13.dir/testCXXCompiler.cxx.o] Error 1
make[1]: Leaving directory '/home/pi/vingman/loki/bld/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_d4b13/fast] Error 2



CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:14 (project)


-- Configuring incomplete, errors occurred!
See also "/home/pi/vingman/loki/bld/CMakeFiles/CMakeOutput.log".
See also "/home/pi/vingman/loki/bld/CMakeFiles/CMakeError.log".

Однако, когда я проверяю gcc --version на y , он показывает версию 8.4

pi@raspberrypi:~/vingman/loki/bld $ gcc --version
gcc (GCC) 8.4.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Любая помощь или предложение приветствуются. Заранее спасибо. Вывод файла журнала CMakeError ниже

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: /usr/local/bin/c++  Build flags:  Id flags:  

The output was: 1 c++: error trying to exec 'cc1plus': execvp: No such file or directory


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: /usr/local/bin/c++  Build flags:  Id flags: -c 

The output was: 1 c++: error trying to exec 'cc1plus': execvp: No such file or directory


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: /usr/local/bin/c++  Build flags:  Id flags: --c++ 

The output was: 1 c++: error: unrecognized command line option ‘--c++’


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: /usr/local/bin/c++  Build flags:  Id flags: --ec++ 

The output was: 1 c++: error: unrecognized command line option ‘--ec++’; did you mean ‘-Weffc++’?


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: /usr/local/bin/c++  Build flags:  Id flags:  

The output was: 1 c++: error trying to exec 'cc1plus': execvp: No such file or directory


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: /usr/local/bin/c++  Build flags:  Id flags: -c 

The output was: 1 c++: error trying to exec 'cc1plus': execvp: No such file or directory


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: /usr/local/bin/c++  Build flags:  Id flags: --c++ 

The output was: 1 c++: error: unrecognized command line option ‘--c++’


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: /usr/local/bin/c++  Build flags:  Id flags: --ec++ 

The output was: 1 c++: error: unrecognized command line option ‘--ec++’; did you mean ‘-Weffc++’?


Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": c++: fatal error: no input files compilation terminated. Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": c++: fatal error: no input files compilation terminated. Compiling the C compiler identification source file "CMakeCCompilerId.c" failed. Compiler: /usr/local/bin/gcc  Build flags:  Id flags:  

The output was: 1 gcc: error trying to exec 'cc1': execvp: No such file or directory


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed. Compiler: /usr/local/bin/gcc  Build flags:  Id flags: -c 

The output was: 1 gcc: error trying to exec 'cc1': execvp: No such file or directory


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed. Compiler: /usr/local/bin/gcc  Build flags:  Id flags: -Aa 

The output was: 1 gcc: error trying to exec 'cc1': execvp: No such file or directory


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed. Compiler: /usr/local/bin/gcc  Build flags:  Id flags: -D__CLASSIC_C__ 

The output was: 1 gcc: error trying to exec 'cc1': execvp: No such file or directory


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed. Compiler: /usr/local/bin/gcc  Build flags:  Id flags:  

The output was: 1 gcc: error trying to exec 'cc1': execvp: No such file or directory


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed. Compiler: /usr/local/bin/gcc  Build flags:  Id flags: -c 

The output was: 1 gcc: error trying to exec 'cc1': execvp: No such file or directory


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed. Compiler: /usr/local/bin/gcc  Build flags:  Id flags: -Aa 

The output was: 1 gcc: error trying to exec 'cc1': execvp: No such file or directory


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed. Compiler: /usr/local/bin/gcc  Build flags:  Id flags: -D__CLASSIC_C__ 

The output was: 1 gcc: error trying to exec 'cc1': execvp: No such file or directory


Checking whether the C compiler is IAR using "" did not match "IAR .+ Compiler": gcc: fatal error: no input files compilation terminated. Checking whether the C compiler is IAR using "" did not match "IAR .+ Compiler": gcc: fatal error: no input files compilation terminated. Determining if the CXX compiler works failed with the following output: Change Dir: /home/pi/vingman/loki/bld/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_4237f/fast" /usr/bin/make -f CMakeFiles/cmTC_4237f.dir/build.make CMakeFiles/cmTC_4237f.dir/build make[1]: Entering directory '/home/pi/vingman/loki/bld/CMakeFiles/CMakeTmp' Building CXX object CMakeFiles/cmTC_4237f.dir/testCXXCompiler.cxx.o /usr/local/bin/c++    
-o CMakeFiles/cmTC_4237f.dir/testCXXCompiler.cxx.o -c /home/pi/vingman/loki/bld/CMakeFiles/CMakeTmp/testCXXCompiler.cxx c++: error trying to exec 'cc1plus': execvp: No such file or directory make[1]: *** [CMakeFiles/cmTC_4237f.dir/build.make:66: CMakeFiles/cmTC_4237f.dir/testCXXCompiler.cxx.o] Error 1 make[1]: Leaving directory '/home/pi/vingman/loki/bld/CMakeFiles/CMakeTmp' make: *** [Makefile:121: cmTC_4237f/fast] Error 2
...