I wanted to compile the ROOT v6-05-02 downloading by git in OpenSUSE Tumbleweed (uname -a :: Linux Aditya 4.3.0-2-default #1 SMP PREEMPT Sat Nov 14 16:19:19 UTC 2015 (734b32c) x86_64 x86_64 x86_64 GNU/Linux ). cmake shows following error :
[root@Aditya: build_root 23:30 Dec 26, 2015]$ cat CMakeFiles/
3.3.2/ CMakeError.log CMakeOutput.log CMakeTmp/ cmake.check_cache
[root@Aditya: build_root 23:30 Dec 26, 2015]$ cat CMakeFiles/CMakeError.log
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /usr/bin/gcc
Build flags:
Id flags:
The output was:
1
/usr/lib64/gcc/x86_64-suse-linux/5/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/gcc/x86_64-suse-linux/5/liblto_plugin.so: error loading plugin: /usr/lib64/gcc/x86_64-suse-linux/5/liblto_plugin.so: wrong ELF class: ELFCLASS64
collect2: error: ld returned 1 exit status
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /usr/bin/g++
Build flags:
Id flags:
The output was:
1
/usr/lib64/gcc/x86_64-suse-linux/5/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/gcc/x86_64-suse-linux/5/liblto_plugin.so: error loading plugin: /usr/lib64/gcc/x86_64-suse-linux/5/liblto_plugin.so: wrong ELF class: ELFCLASS64
collect2: error: ld returned 1 exit status
Determining if the C compiler works failed with the following output:
Change Dir: /opt/Sources/root/build_root/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/gmake" "cmTC_a3cfc/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_a3cfc.dir/build.make CMakeFiles/cmTC_a3cfc.dir/build
gmake[1]: Entering directory '/opt/Sources/root/build_root/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_a3cfc.dir/testCCompiler.c.o
/usr/bin/gcc -o CMakeFiles/cmTC_a3cfc.dir/testCCompiler.c.o -c /opt/Sources/root/build_root/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_a3cfc
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_a3cfc.dir/link.txt --verbose=1
/usr/bin/gcc CMakeFiles/cmTC_a3cfc.dir/testCCompiler.c.o -o cmTC_a3cfc -rdynamic
/usr/lib64/gcc/x86_64-suse-linux/5/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/gcc/x86_64-suse-linux/5/liblto_plugin.so: error loading plugin: /usr/lib64/gcc/x86_64-suse-linux/5/liblto_plugin.so: wrong ELF class: ELFCLASS64
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_a3cfc.dir/build.make:97: recipe for target 'cmTC_a3cfc' failed
gmake[1]: *** [cmTC_a3cfc] Error 1
gmake[1]: Leaving directory '/opt/Sources/root/build_root/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_a3cfc/fast' failed
gmake: *** [cmTC_a3cfc/fast] Error 2
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /usr/bin/gcc
Build flags: -m64
Id flags:
The output was:
1
/usr/lib64/gcc/x86_64-suse-linux/5/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/gcc/x86_64-suse-linux/5/liblto_plugin.so: error loading plugin: /usr/lib64/gcc/x86_64-suse-linux/5/liblto_plugin.so: wrong ELF class: ELFCLASS64
collect2: error: ld returned 1 exit status
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /usr/bin/g++
Build flags:
Id flags:
The output was:
1
/usr/lib64/gcc/x86_64-suse-linux/5/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/gcc/x86_64-suse-linux/5/liblto_plugin.so: error loading plugin: /usr/lib64/gcc/x86_64-suse-linux/5/liblto_plugin.so: wrong ELF class: ELFCLASS64
collect2: error: ld returned 1 exit status
Determining if the C compiler works failed with the following output:
Change Dir: /opt/Sources/root/build_root/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/gmake" "cmTC_adb24/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_adb24.dir/build.make CMakeFiles/cmTC_adb24.dir/build
gmake[1]: Entering directory '/opt/Sources/root/build_root/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_adb24.dir/testCCompiler.c.o
/usr/bin/gcc -m64 -o CMakeFiles/cmTC_adb24.dir/testCCompiler.c.o -c /opt/Sources/root/build_root/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_adb24
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_adb24.dir/link.txt --verbose=1
/usr/bin/gcc -m64 CMakeFiles/cmTC_adb24.dir/testCCompiler.c.o -o cmTC_adb24 -rdynamic
/usr/lib64/gcc/x86_64-suse-linux/5/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/gcc/x86_64-suse-linux/5/liblto_plugin.so: error loading plugin: /usr/lib64/gcc/x86_64-suse-linux/5/liblto_plugin.so: wrong ELF class: ELFCLASS64
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_adb24.dir/build.make:97: recipe for target 'cmTC_adb24' failed
gmake[1]: *** [cmTC_adb24] Error 1
gmake[1]: Leaving directory '/opt/Sources/root/build_root/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_adb24/fast' failed
gmake: *** [cmTC_adb24/fast] Error 2
[root@Aditya: build_root 23:31 Dec 26, 2015]$
I inspected to liblto_plugin.so and the result is
[root@Aditya: build_root 23:33 Dec 26, 2015]$ file -L /usr/lib64/gcc/x86_64-suse-linux/5/liblto_plugin.so
/usr/lib64/gcc/x86_64-suse-linux/5/liblto_plugin.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=f11d53b76a32445b4608de71260a8b262513ee33, stripped
[root@Aditya: build_root 23:33 Dec 26, 2015]$
which means liblto_plugin.so is available for x86-64. I tried with and without “-m64” option for cmake while the error is same.
[quote=“vega”]I wanted to compile the ROOT v6-05-02 downloading by git in OpenSUSE Tumbleweed (uname -a :: Linux Aditya 4.3.0-2-default #1 SMP PREEMPT Sat Nov 14 16:19:19 UTC 2015 (734b32c) x86_64 x86_64 x86_64 GNU/Linux ). cmake shows following error :
[root@Aditya: build_root 23:30 Dec 26, 2015]$ cat CMakeFiles/
3.3.2/ CMakeError.log CMakeOutput.log CMakeTmp/ cmake.check_cache
[root@Aditya: build_root 23:30 Dec 26, 2015]$ cat CMakeFiles/CMakeError.log
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /usr/bin/gcc
Build flags:
Id flags:
The output was:
1
/usr/lib64/gcc/x86_64-suse-linux/5/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/gcc/x86_64-suse-linux/5/liblto_plugin.so: error loading plugin: /usr/lib64/gcc/x86_64-suse-linux/5/liblto_plugin.so: wrong ELF class: ELFCLASS64
collect2: error: ld returned 1 exit status
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /usr/bin/g++
Build flags:
Id flags:
The output was:
1
/usr/lib64/gcc/x86_64-suse-linux/5/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/gcc/x86_64-suse-linux/5/liblto_plugin.so: error loading plugin: /usr/lib64/gcc/x86_64-suse-linux/5/liblto_plugin.so: wrong ELF class: ELFCLASS64
collect2: error: ld returned 1 exit status
Determining if the C compiler works failed with the following output:
Change Dir: /opt/Sources/root/build_root/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/gmake" "cmTC_a3cfc/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_a3cfc.dir/build.make CMakeFiles/cmTC_a3cfc.dir/build
gmake[1]: Entering directory '/opt/Sources/root/build_root/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_a3cfc.dir/testCCompiler.c.o
/usr/bin/gcc -o CMakeFiles/cmTC_a3cfc.dir/testCCompiler.c.o -c /opt/Sources/root/build_root/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_a3cfc
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_a3cfc.dir/link.txt --verbose=1
/usr/bin/gcc CMakeFiles/cmTC_a3cfc.dir/testCCompiler.c.o -o cmTC_a3cfc -rdynamic
/usr/lib64/gcc/x86_64-suse-linux/5/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/gcc/x86_64-suse-linux/5/liblto_plugin.so: error loading plugin: /usr/lib64/gcc/x86_64-suse-linux/5/liblto_plugin.so: wrong ELF class: ELFCLASS64
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_a3cfc.dir/build.make:97: recipe for target 'cmTC_a3cfc' failed
gmake[1]: *** [cmTC_a3cfc] Error 1
gmake[1]: Leaving directory '/opt/Sources/root/build_root/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_a3cfc/fast' failed
gmake: *** [cmTC_a3cfc/fast] Error 2
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /usr/bin/gcc
Build flags: -m64
Id flags:
The output was:
1
/usr/lib64/gcc/x86_64-suse-linux/5/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/gcc/x86_64-suse-linux/5/liblto_plugin.so: error loading plugin: /usr/lib64/gcc/x86_64-suse-linux/5/liblto_plugin.so: wrong ELF class: ELFCLASS64
collect2: error: ld returned 1 exit status
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /usr/bin/g++
Build flags:
Id flags:
The output was:
1
/usr/lib64/gcc/x86_64-suse-linux/5/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/gcc/x86_64-suse-linux/5/liblto_plugin.so: error loading plugin: /usr/lib64/gcc/x86_64-suse-linux/5/liblto_plugin.so: wrong ELF class: ELFCLASS64
collect2: error: ld returned 1 exit status
Determining if the C compiler works failed with the following output:
Change Dir: /opt/Sources/root/build_root/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/gmake" "cmTC_adb24/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_adb24.dir/build.make CMakeFiles/cmTC_adb24.dir/build
gmake[1]: Entering directory '/opt/Sources/root/build_root/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_adb24.dir/testCCompiler.c.o
/usr/bin/gcc -m64 -o CMakeFiles/cmTC_adb24.dir/testCCompiler.c.o -c /opt/Sources/root/build_root/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_adb24
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_adb24.dir/link.txt --verbose=1
/usr/bin/gcc -m64 CMakeFiles/cmTC_adb24.dir/testCCompiler.c.o -o cmTC_adb24 -rdynamic
/usr/lib64/gcc/x86_64-suse-linux/5/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/gcc/x86_64-suse-linux/5/liblto_plugin.so: error loading plugin: /usr/lib64/gcc/x86_64-suse-linux/5/liblto_plugin.so: wrong ELF class: ELFCLASS64
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_adb24.dir/build.make:97: recipe for target 'cmTC_adb24' failed
gmake[1]: *** [cmTC_adb24] Error 1
gmake[1]: Leaving directory '/opt/Sources/root/build_root/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_adb24/fast' failed
gmake: *** [cmTC_adb24/fast] Error 2
[root@Aditya: build_root 23:31 Dec 26, 2015]$
I inspected to liblto_plugin.so and the result is
[root@Aditya: build_root 23:33 Dec 26, 2015]$ file -L /usr/lib64/gcc/x86_64-suse-linux/5/liblto_plugin.so
/usr/lib64/gcc/x86_64-suse-linux/5/liblto_plugin.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=f11d53b76a32445b4608de71260a8b262513ee33, stripped
[root@Aditya: build_root 23:33 Dec 26, 2015]$
which means liblto_plugin.so is available for x86-64. I tried with and without “-m64” option for cmake while the error is same.
Can you kindly guide me?
Thanks[/quote]
As it is clear that file -L shows no problem with dynamical lib in 64bit. Therefore I guessed there might be some problem with any gcc lib which I could not solve. Therefore I re-installed gcc staff clean again which solved the issue.