Re: [DynInst_API:] Compile issue building Dyninst on ORNL titan


Date: Fri, 17 Oct 2014 14:25:02 -0700
From: Jim Galarowicz <jeg@xxxxxxxxxxxxx>
Subject: Re: [DynInst_API:] Compile issue building Dyninst on ORNL titan
I'm not sure if the patchAPI compile options have the correct defines set or is there a compile option that is required to get the constants recognized? I put the #include stdint.h into BPatch.C to see if the Dyninst build was missing including stdint.h because it is enclosed in some if <defined> type code. So, I'm guessing there is an missing option or missing compiler define that is needed.

From stdint.h on Titan:

/* The ISO C99 standard specifies that in C++ implementations these
   macros should only be defined if explicitly requested.  */
#if !defined __cplusplus || defined __STDC_LIMIT_MACROS

# if __WORDSIZE == 64
#  define __INT64_C(c)  c ## L
#  define __UINT64_C(c) c ## UL
# else
#  define __INT64_C(c)  c ## LL
#  define __UINT64_C(c) c ## ULL
# endif

Build snippet where the compile errors are located:

[ 47%] Built target patchAPI
Scanning dependencies of target dyninstAPI
[ 47%] Building CXX object dyninstAPI/CMakeFiles/dyninstAPI.dir/src/BPatch.C.o In file included from /ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2/common/src/headers.h:53:0, from /ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2/common/src/Timer.h:43, from /ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2/common/src/stats.h:38, from /ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2/dyninstAPI/src/BPatch.C:45: /ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2/common/src/fraction.h: In constructor 'fraction::fraction(int64_t)': /ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2/common/src/Types.h:140:28: error: 'INT64_C' was not declared in this scope
 #define I64_C(x)  INT64_C(x)
                            ^
/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2/common/src/fraction.h:59:50: note: in expansion of macro 'I64_C'
   explicit fraction(int64_t n) : numer(n), denom(I64_C(1))  {
                                                  ^
/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2/common/src/arch-x86.h: In function 'bool NS_x86::is_disp32(long int)': /ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2/common/src/Types.h:158:18: error: 'INT32_MAX' was not declared in this scope
 #define I32_MAX  INT32_MAX
                  ^
/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2/common/src/arch-x86.h:907:19: note: in expansion of macro 'I32_MAX'
   return (disp <= I32_MAX && disp >= I32_MIN);
                   ^
/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2/common/src/Types.h:159:18: error: 'INT32_MIN' was not declared in this scop
On 10/17/2014 09:22 AM, Jim Galarowicz wrote:
Hi,

I'm getting these types of errors when trying to build Dyninst on the ORNL Titan Cray. It looks to me like this shouldn't happen, as the INT32_MAX and other defines are in /usr/include/stdint.h and Types.h includes stdint.h.
Any ideas on why these errors are showing up?

Thanks,
Jim G

/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2.0/common/src/arch-x86.h: In function 'bool NS_x86::is_disp32(long int)': /ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2.0/common/src/Types.h:158:18: error: 'INT32_MAX' was not declared in this scope
 #define I32_MAX  INT32_MAX
                  ^

jgalaro@titan-ext6:~/OpenSpeedShop_ROOT> grep INT32_MAX /usr/include/*
/usr/include/stdint.h:# define INT32_MAX        (2147483647)
/usr/include/stdint.h:# define UINT32_MAX        (4294967295U)
jgalaro@titan-ext6:~/OpenSpeedShop_ROOT> cd BUILD/titan-ext6/dyninst-8.2.0/ jgalaro@titan-ext6:~/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2.0> grep stdint.h /ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2.0/common/src/* /ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2.0/common/src/Types.h:#include <stdint.h> /ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2.0/common/src/Types.h:#include <stdint.h> /ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2.0/common/src/Types.h:#include <stdint.h> /ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2.0/common/src/Types.h:#include <stdint.h> jgalaro@titan-ext6:~/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2.0> grep INT32_MIN /usr/include/*
/usr/include/stdint.h:# define INT32_MIN        (-2147483647-1)
jgalaro@titan-ext6:~/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2.0>



Linking CXX shared library libpatchAPI.so
[ 39%] Built target patchAPI
Scanning dependencies of target dyninstAPI
[ 39%] Building CXX object dyninstAPI/CMakeFiles/dyninstAPI.dir/src/BPatch.C.o In file included from /ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2.0/common/src/headers.h:53:0, from /ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2.0/common/src/Timer.h:43, from /ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2.0/common/src/stats.h:38, from /ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2.0/dyninstAPI/src/BPatch.C:43: /ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2.0/common/src/fraction.h: In constructor 'fraction::fraction(int64_t)': /ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2.0/common/src/Types.h:140:28: error: 'INT64_C' was not declared in this scope
 #define I64_C(x)  INT64_C(x)
                            ^
/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2.0/common/src/fraction.h:59:50: note: in expansion of macro 'I64_C'
   explicit fraction(int64_t n) : numer(n), denom(I64_C(1))  {
                                                  ^
/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2.0/common/src/arch-x86.h: In function 'bool NS_x86::is_disp32(long int)': /ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2.0/common/src/Types.h:158:18: error: 'INT32_MAX' was not declared in this scope
 #define I32_MAX  INT32_MAX
                  ^
/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2.0/common/src/arch-x86.h:907:19: note: in expansion of macro 'I32_MAX'
   return (disp <= I32_MAX && disp >= I32_MIN);
                   ^
/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2.0/common/src/Types.h:159:18: error: 'INT32_MIN' was not declared in this scope
 #define I32_MIN  INT32_MIN
                  ^
/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2.0/common/src/arch-x86.h:907:38: note: in expansion of macro 'I32_MIN'
   return (disp <= I32_MAX && disp >= I32_MIN);
                                      ^
/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2.0/common/src/arch-x86.h: In function 'bool NS_x86::is_addr32(Dyninst::Address)': /ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2.0/common/src/Types.h:160:18: error: 'UINT32_MAX' was not declared in this scope
 #define UI32_MAX UINT32_MAX
                  ^
/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2.0/common/src/arch-x86.h:913:20: note: in expansion of macro 'UI32_MAX'
     return (addr < UI32_MAX);
                    ^
In file included from /lustre/atlas/proj-shared/csc103/jgalaro/boost_1.53.0/include/boost/system/system_error.hpp:14:0, from /lustre/atlas/proj-shared/csc103/jgalaro/boost_1.53.0/include/boost/thread/exceptions.hpp:22, from /lustre/atlas/proj-shared/csc103/jgalaro/boost_1.53.0/include/boost/thread/pthread/thread_data.hpp:10, from /lustre/atlas/proj-shared/csc103/jgalaro/boost_1.53.0/include/boost/thread/pthread/condition_variable.hpp:12, from /lustre/atlas/proj-shared/csc103/jgalaro/boost_1.53.0/include/boost/thread/condition_variable.hpp:16, from /ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2.0/common/src/dthread.h:38, from /ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2.0/dyninstAPI/src/pcEventHandler.h:39, from /ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2.0/dyninstAPI/src/dynProcess.h:45, from /ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext6/dyninst-8.2.0/dyninstAPI/src/BPatch.C:55: /lustre/atlas/proj-shared/csc103/jgalaro/boost_1.53.0/include/boost/system/error_code.hpp: At global scope: /lustre/atlas/proj-shared/csc103/jgalaro/boost_1.53.0/include/boost/system/error_code.hpp:214:36: warning: 'boost::system::posix_category' defined but not used [-Wunused-variable]
     static const error_category &  posix_category = generic_category();
                                    ^
/lustre/atlas/proj-shared/csc103/jgalaro/boost_1.53.0/include/boost/system/error_code.hpp:215:36: warning: 'boost::system::errno_ecat' defined but not used [-Wunused-variable]
     static const error_category &  errno_ecat     = generic_category();
                                    ^
/lustre/atlas/proj-shared/csc103/jgalaro/boost_1.53.0/include/boost/system/error_code.hpp:216:36: warning: 'boost::system::native_ecat' defined but not used [-Wunused-variable]
     static const error_category &  native_ecat    = system_category();
                                    ^
make[2]: *** [dyninstAPI/CMakeFiles/dyninstAPI.dir/src/BPatch.C.o] Error 1
make[1]: *** [dyninstAPI/CMakeFiles/dyninstAPI.dir/all] Error 2
make: *** [all] Error 2
error: Bad exit status from /ccs/home/jgalaro/OpenSpeedShop_ROOT/INSTALL/titan-ext6/rpm-tmp.22074 (%build)


[← Prev in Thread] Current Thread [Next in Thread→]