Skip to content

Instantly share code, notes, and snippets.

@gonzopancho
Created November 26, 2018 08:27
Show Gist options
  • Save gonzopancho/d353b42a5f03a7ad22f2f65e6e41c995 to your computer and use it in GitHub Desktop.
Save gonzopancho/d353b42a5f03a7ad22f2f65e6e41c995 to your computer and use it in GitHub Desktop.
CMake Error at /usr/share/cmake3/Modules/CMakeTestCCompiler.cmake:52 (message):
The C compiler
"/opt/rh/devtoolset-7/root/bin/cc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/jim/vpp/build-root/build-vpp_debug-native/vpp/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/ninja-build" "cmTC_fe97a"
[1/2] Building C object CMakeFiles/cmTC_fe97a.dir/testCCompiler.c.o
FAILED: CMakeFiles/cmTC_fe97a.dir/testCCompiler.c.o
/opt/rh/devtoolset-7/root/bin/cc -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -fstack-protector-all -fPIC -Werror -o CMakeFiles/cmTC_fe97a.dir/testCCompiler.c.o -c testCCompiler.c
cc: error trying to exec '/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/as': execv: Exec format error
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:16 (project)
-- Configuring incomplete, errors occurred!
See also "/home/jim/vpp/build-root/build-vpp_debug-native/vpp/CMakeFiles/CMakeOutput.log".
See also "/home/jim/vpp/build-root/build-vpp_debug-native/vpp/CMakeFiles/CMakeError.log".
make[1]: *** [vpp-configure] Error 1
make[1]: Leaving directory `/home/jim/vpp/build-root'
make: *** [build] Error 2
real 0m2.457s
user 0m1.473s
sys 0m0.659s
[jim@centos vpp]$ ls -l /opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/as
ls: cannot access /opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/as: No such file or directory
[jim@centos vpp]$ ls -l /opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/
total 0
drwxr-xr-x. 2 root root 282 Nov 26 02:11 7
[jim@centos vpp]$ ls -l /opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/
total 96772
lrwxrwxrwx. 1 root root 18 Nov 26 02:11 ar -> ../../../../bin/ar
lrwxrwxrwx. 1 root root 18 Nov 26 02:11 as -> ../../../../bin/as
-rwxr-xr-x. 1 root root 23945136 Sep 3 07:17 cc1
-rwxr-xr-x. 1 root root 25809656 Sep 3 07:17 cc1plus
-rwxr-xr-x. 1 root root 598024 Sep 3 07:17 collect2
-rwxr-xr-x. 1 root root 24818432 Sep 3 07:17 f951
lrwxrwxrwx. 1 root root 18 Nov 26 02:11 ld -> ../../../../bin/ld
lrwxrwxrwx. 1 root root 22 Nov 26 02:11 ld.bfd -> ../../../../bin/ld.bfd
lrwxrwxrwx. 1 root root 23 Nov 26 02:11 ld.gold -> ../../../../bin/ld.gold
lrwxrwxrwx. 1 root root 22 Nov 26 02:11 liblto_plugin.so -> liblto_plugin.so.0.0.0
lrwxrwxrwx. 1 root root 22 Nov 26 02:11 liblto_plugin.so.0 -> liblto_plugin.so.0.0.0
-rwxr-xr-x. 1 root root 74984 Sep 3 07:17 liblto_plugin.so.0.0.0
-rwxr-xr-x. 1 root root 22912584 Sep 3 07:17 lto1
-rwxr-xr-x. 1 root root 921016 Sep 3 07:17 lto-wrapper
lrwxrwxrwx. 1 root root 18 Nov 26 02:11 nm -> ../../../../bin/nm
lrwxrwxrwx. 1 root root 23 Nov 26 02:11 objcopy -> ../../../../bin/objcopy
lrwxrwxrwx. 1 root root 22 Nov 26 02:11 ranlib -> ../../../../bin/ranlib
lrwxrwxrwx. 1 root root 21 Nov 26 02:11 strip -> ../../../../bin/strip
[jim@centos vpp]$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment