Re: [DynInst_API:] Dyninst with Intel compilers on Linux/x86_64


Date: Mon, 02 Feb 2015 15:20:35 -0600
From: Bill Williams <bill@xxxxxxxxxxx>
Subject: Re: [DynInst_API:] Dyninst with Intel compilers on Linux/x86_64
On 02/02/2015 06:29 AM, Mark Dixon wrote:
Hi there,

I'm trying to build Dyninst API 8.2.1 on a CentOS6 x86_64 machine with
the Intel compilers and am not getting very far - I'm hoping that some
kind soul will point me in the right direction.


It seems that cmake starts using windows-style compiler flags:

$ cmake -D BOOST_ROOT=${BOOST_HOME} -D PATH_BOOST=${BOOST_HOME}
../Dyninst-8.2.1
  ... snip some stuff ...
$ make Scanning dependencies of target DyninstRT
[  0%] Building DyninstRT
Scanning dependencies of target dyninstAPI_RT
[  3%] Building C object CMakeFiles/dyninstAPI_RT.dir/src/RTcommon.c.o
icc: error #10236: File not found:  '/O2'
icc: error #10236: File not found:  '/Zi'
icc: error #10236: File not found:  '/MD'
icc: error #10236: File not found:  '/D'
icc: error #10236: File not found:  'NDEBUG'
gmake[5]: *** [CMakeFiles/dyninstAPI_RT.dir/src/RTcommon.c.o] Error 1
gmake[4]: *** [CMakeFiles/dyninstAPI_RT.dir/all] Error 2
gmake[3]: *** [all] Error 2
make[2]: *** [CMakeFiles/DyninstRT] Error 2
make[1]: *** [CMakeFiles/DyninstRT.dir/all] Error 2
make: *** [all] Error 2

Is this a known problem, please?

We only have official support for building with gcc (*nix) and MSVC (Windows). It looks to me like we've fallen down an "if not GNU" rabbit hole here and attempted to build with (non-existent) MSVC.

If your system has a CMake toolchain file for icc, that's probably a reasonable starting point for building with icc; another option (though I have never quite gotten this to behave) is to replace our "if GNU" logic with:

if GNU or icc
  <GNU stuff>
  if icc
    <add icc's "speak GNU command line" flags>
  endif icc
elsif MSVC
  <MSVC stuff>
endif

This should be mostly contained in cmake/optimization.cmake. I don't think there's any other .cmake files where we're setting CFLAGS explicitly outside of the test suite, but if there are, those would also need to change. We're generally pretty good about using the appropriate CMake wrapper macros, though.

I assume that it is sensible to want to compile with the Intel compiler
for maximum C++ compatibility with software built on top of Dyninst. Is
that right?

If you're building both Dyninst and your mutators with icc, and your mutators have some other strong reason to be built with icc, this is correct (you want a homogeneous mutator toolchain, generally); however, gnu-built mutators will have no issue instrumenting and controlling icc-built mutatees.

Thanks!

Mark

PS I'm using cmake/2.8.12.2 and boost/1.54.0.
_______________________________________________
Dyninst-api mailing list
Dyninst-api@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api


--
--bw

Bill Williams
Paradyn Project
bill@xxxxxxxxxxx
[← Prev in Thread] Current Thread [Next in Thread→]