Jim,
I was working with Koushik on the Spirit machine a couple months ago.
They've got two compiler toolchains, one for building backend binaries and
one for building frontend binaries. Unfortunately, the two compilers
don't produce compatible code (even though it's all linux/x86_64).
Dyninst's CMake is being handed the backend compiler, then testing the
compiler on the frontend and finding it broken. Depending on whether you
want to build Dyninst for the frontend or backend you need to:
- Use the frontend compiler to build a frontend Dyninst. This might have
just been the /usr/bin/gcc compiler, if I remember correctly.
- If you want to build a backend Dyninst then tell CMake you're
cross-compiling. That should tell CMake not to try and test/execute the
code it's building. I haven't done this before with cmake, but it looks
like http://www.cmake.org/Wiki/CMake_Cross_Compiling might have the
information you need. Maybe you just need to set CMAKE_SYSTEM_TYPE to
"Generic".
-Matt
On Wed, 26 Mar 2014, Jim Galarowicz wrote: > Hi,
I'm now trying to build Dyninst 8.2 on an SGI ICE system. But I'm getting
this:
CMake Error at/work1/app/gnu/platforms/x86_64/share/cmake-2.8/Modules/CMakeTestCCompiler.
cmake:61 (message):
The C compiler "/app/gmpapp/gcc/platform/gcc-4.7.3/bin/gcc" is not able to
compile a simple test program.
[galarowi@spirit01 OpenSpeedShop_ROOT ]$ cmake --version
cmake version 2.8.10.2
[galarowi@spirit01 OpenSpeedShop_ROOT ]$ gcc --version
gcc (GCC) 4.7.3
Copyright (C) 2012 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.
[galarowi@spirit01 OpenSpeedShop_ROOT ]$ which CC
/usr/bin/which: no CC in(/app/gmpapp/gcc/platform/gcc-4.7.3/bin:/home/galarowi/bin:/opt/local/bin:/
opt/cisco/vpn/bin:/usr/local/usp/git/1.8.5/bin:/usr/local/usp/PETtools/CE/p
kgs/cmake-2.8.11.2/bin:.:/usr/local/krb5/bin:/usr/local/ossh/bin:/opt/sgi/m
pt/mpt-2.08/bin:/usr/lib64/qt-3.3/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/lo
cal/sbin:/opt/c3/bin:/opt/pbs/default/bin:/opt/sgi/sbin:/opt/sgi/bin:/home/
galarowi/bin:/home/galarowi/bin/x86_64:/hafs_x86_64:/hafs_x86_64/bin:/usr/b
in/X11:/usr/local/bin:/app/java/jdk1.7.0_17/bin:.)
[galarowi@spirit01 OpenSpeedShop_ROOT ]$ which CXX
/usr/bin/which: no CXX in(/app/gmpapp/gcc/platform/gcc-4.7.3/bin:/home/galarowi/bin:/opt/local/bin:/
opt/cisco/vpn/bin:/usr/local/usp/git/1.8.5/bin:/usr/local/usp/PETtools/CE/p
kgs/cmake-2.8.11.2/bin:.:/usr/local/krb5/bin:/usr/local/ossh/bin:/opt/sgi/m
pt/mpt-2.08/bin:/usr/lib64/qt-3.3/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/lo
cal/sbin:/opt/c3/bin:/opt/pbs/default/bin:/opt/sgi/sbin:/opt/sgi/bin:/home/
galarowi/bin:/home/galarowi/bin/x86_64:/hafs_x86_64:/hafs_x86_64/bin:/usr/b
in/X11:/usr/local/bin:/app/java/jdk1.7.0_17/bin:.)
[galarowi@spirit01 OpenSpeedShop_ROOT ]$ module list
Currently Loaded Modulefiles:
1) mpt/2.08 3) /app/startup/shell.module 5)
/app/startup/chgaccnt.module 7) /app/startup/login2.module
2) costinit 4) /app/startup/alias.module 6)
/app/startup/login.module 8) gcc-compilers/4.7.3
[galarowi@spirit01 OpenSpeedShop_ROOT ]$ uname -a
Linux spirit01 2.6.32-358.11.1.el6.x86_64 #1 SMP Wed May 15 10:48:38 EDT
2013 x86_64 x86_64 x86_64 GNU/Linux
Do you have any advice on what might be causing this?
Thanks,
Jim G
The complete build output:
~/OpenSpeedShop_ROOT/BUILD/spirit01 ~/OpenSpeedShop_ROOT
~/OpenSpeedShop_ROOT
XERCESC BUILT SUCCESSFULLY.
Build vampirtrace? <y/n>
Build dyninst? <y/n>
Build-RPM command-line argument #1 = dyninst-8.2
Build-RPM command-line argument #2 =
Build-RPM command-line argument #3 =
DEBUG: Setting machine to uname: spirit01
RPM working directory: spirit01
Environment variable KRELL_ROOT_PREFIX is set
Environment variable KRELL_ROOT_PREFIX is set to
/home/galarowi/krellroot_v2.1u3
error: Macro %target_prefix has empty body
error: Macro %target_prefix has empty body
Executing(%prep): /bin/sh -e
/home/galarowi/OpenSpeedShop_ROOT/INSTALL/spirit01/rpm-tmp.M7pyFg
+ umask 022
+ cd /home/galarowi/OpenSpeedShop_ROOT/BUILD/spirit01
+ LANG=C
+ export LANG
+ unset DISPLAY
+ '[' -d dyninst-8.2 ']'
+ '[' '!' -z ']'
+ '[' '!' -z ']'
+ '[' -d /home/galarowi/krellroot_v2.1u3 ']'
+ '[' -d /home/galarowi/krellroot_v2.1u3/include -a -f
/home/galarowi/krellroot_v2.1u3/include/boost/shared_ptr.hpp ']'
+ '[' -d /home/galarowi/krellroot_v2.1u3 ']'
+ '[' -f /home/galarowi/krellroot_v2.1u3/boost/shared_ptr.hpp ']'
+ export DYNINST_BOOST_ROOT=
+ DYNINST_BOOST_ROOT=
+ '[' '!' -z ']'
+ '[' '!' -z ']'
+ '[' '!' -z /home/galarowi/krellroot_v2.1u3 ']'
+ '[' -f /home/galarowi/krellroot_v2.1u3/lib64/libelf.so -o -f
/home/galarowi/krellroot_v2.1u3/lib64/libelf.a ']'
+ '[' '!' -z /home/galarowi/krellroot_v2.1u3 ']'
+ '[' -f /home/galarowi/krellroot_v2.1u3//libelf.so -o -f
/home/galarowi/krellroot_v2.1u3//libelf.a ']'
+ '[' -d /home/galarowi/krellroot_v2.1u3 ']'
+ '[' -f /home/galarowi/krellroot_v2.1u3/lib64/libelf.so -o -f
/home/galarowi/krellroot_v2.1u3/lib64/libelf.a ']'
+ export LIBELFDIR=/usr
+ LIBELFDIR=/usr
+ '[' -f /usr/include/libelf.h ']'
+ export LIBELFINC=/usr/include
+ LIBELFINC=/usr/include
+ '[' '!' -z ']'
+ '[' '!' -z /home/galarowi/krellroot_v2.1u3 ']'
+ '[' -f /home/galarowi/krellroot_v2.1u3/lib64/libdwarf.so -o -f
/home/galarowi/krellroot_v2.1u3/lib64/libdwarf.a ']'
+ export LIBDWARFDIR=/home/galarowi/krellroot_v2.1u3
+ LIBDWARFDIR=/home/galarowi/krellroot_v2.1u3
+ '[' '!' -z /app/wpostool/COST/binutils-2.23 ']'
+ '[' -f /app/wpostool/COST/binutils-2.23/lib64/libiberty.a ']'
+ export LIBIBERTYLIBDIR=/app/wpostool/COST/binutils-2.23/lib64/libiberty.a
+ LIBIBERTYLIBDIR=/app/wpostool/COST/binutils-2.23/lib64/libiberty.a
+ cd /home/galarowi/OpenSpeedShop_ROOT/BUILD/spirit01
+ rm -rf dyninst-8.2
+ /usr/bin/gzip -dc
/home/galarowi/OpenSpeedShop_ROOT/SOURCES/dyninst-8.2.tar.gz
+ /bin/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd dyninst-8.2
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ echo 'Patch (dyninst-8.2.patch):'
Patch (dyninst-8.2.patch):
+ /bin/cat /home/galarowi/OpenSpeedShop_ROOT/SOURCES/dyninst-8.2.patch
+ /usr/bin/patch -p1 --fuzz=0
(Stripping trailing CRs from patch.)
patching file CMakeLists.txt
+ pwd
/home/galarowi/OpenSpeedShop_ROOT/BUILD/spirit01/dyninst-8.2
+ export
DYNINST_ROOT=/home/galarowi/OpenSpeedShop_ROOT/BUILD/spirit01/dyninst-8.2
+ DYNINST_ROOT=/home/galarowi/OpenSpeedShop_ROOT/BUILD/spirit01/dyninst-8.2
+ '[' '%{target_prefix}' == bgp ']'
+ '[' '%{target_prefix}' == bgq ']'
+ CXXFLAGS=-std=c++0x
+ cmake .-DCMAKE_INSTALL_PREFIX=/home/galarowi/OpenSpeedShop_ROOT/BUILDROOT/dyninst-
8.2-1.x86_64/home/galarowi/krellroot_v2.1u3-DINSTALL_LIB_DIR=/home/galarowi/OpenSpeedShop_ROOT/BUILDROOT/dyninst-8.2-1
.x86_64/home/galarowi/krellroot_v2.1u3/lib64-DINSTALL_INCLUDE_DIR=/home/galarowi/OpenSpeedShop_ROOT/BUILDROOT/dyninst-8
.2-1.x86_64/home/galarowi/krellroot_v2.1u3/include/dyninst-DCMAKE_PREFIX_PATH=/home/galarowi/OpenSpeedShop_ROOT/BUILDROOT/dyninst-8.2
-1.x86_64/home/galarowi/krellroot_v2.1u3 -DCMAKE_BUILD_TYPE=RelWithDebInfo
-DLIBDWARF_LIBRARIES=/home/galarowi/krellroot_v2.1u3/lib64
-DLIBDWARF_INCLUDE_DIR=/home/galarowi/krellroot_v2.1u3/include
-DLIBELF_LIBRARIES=/usr/lib64 -DLIBELF_INCLUDE_DIR=/usr/include
-DPATH_BOOST=
-DIBERTY_LIBRARY=/app/wpostool/COST/binutils-2.23/lib64/libiberty.a
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Check for working C compiler: /app/gmpapp/gcc/platform/gcc-4.7.3/bin/gcc
-- Check for working C compiler: /app/gmpapp/gcc/platform/gcc-4.7.3/bin/gcc
-- broken
CMake Error at/work1/app/gnu/platforms/x86_64/share/cmake-2.8/Modules/CMakeTestCCompiler.
cmake:61 (message):
The C compiler "/app/gmpapp/gcc/platform/gcc-4.7.3/bin/gcc" is not able to
compile a simple test program.
It fails with the following output:
Change Dir:/home/galarowi/OpenSpeedShop_ROOT/BUILD/spirit01/dyninst-8.2/CMakeFiles/CMa
keTmp
Run Build Command:/usr/bin/gmake "cmTryCompileExec1303682777/fast"
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec1303682777.dir/build.make
CMakeFiles/cmTryCompileExec1303682777.dir/build
gmake[1]: Entering directory
`/work1/home/galarowi/OpenSpeedShop_ROOT/BUILD/spirit01/dyninst-8.2/CMakeFi
les/CMakeTmp'
/work1/app/gnu/platforms/x86_64/bin/cmake -E cmake_progress_report
/home/galarowi/OpenSpeedShop_ROOT/BUILD/spirit01/dyninst-8.2/CMakeFiles/CMa
keTmp/CMakeFiles
1
Building C object
CMakeFiles/cmTryCompileExec1303682777.dir/testCCompiler.c.o
/app/gmpapp/gcc/platform/gcc-4.7.3/bin/gcc -o
CMakeFiles/cmTryCompileExec1303682777.dir/testCCompiler.c.o -c
/home/galarowi/OpenSpeedShop_ROOT/BUILD/spirit01/dyninst-8.2/CMakeFiles/CMa
keTmp/testCCompiler.c
as: error while loading shared libraries: libimf.so: cannot open shared
object file: No such file or directory
gmake[1]: ***
[CMakeFiles/cmTryCompileExec1303682777.dir/testCCompiler.c.o]
Error 1
gmake[1]: Leaving directory
`/work1/home/galarowi/OpenSpeedShop_ROOT/BUILD/spirit01/dyninst-8.2/CMakeFi
les/CMakeTmp'
gmake: *** [cmTryCompileExec1303682777/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
-- Configuring incomplete, errors occurred!
+ cd ../..
+ exit 0
Executing(%build): /bin/sh -e
/home/galarowi/OpenSpeedShop_ROOT/INSTALL/spirit01/rpm-tmp.r03Yq6
+ umask 022
+ cd /home/galarowi/OpenSpeedShop_ROOT/BUILD/spirit01
+ cd dyninst-8.2
+ LANG=C
+ export LANG
+ unset DISPLAY
+ pwd
/home/galarowi/OpenSpeedShop_ROOT/BUILD/spirit01/dyninst-8.2
+ make SKIP_BUILD_RTLIB_32=1
make: *** No targets specified and no makefile found. Stop.
error: Bad exit status from
/home/galarowi/OpenSpeedShop_ROOT/INSTALL/spirit01/rpm-tmp.r03Yq6 (%build)
|