Dyninst team,
Thanks Dave and Josh for your suggestions!
If I put these defines into the top portion of BPatch.C, then BPatch.C
compiles w/o errors, but then the next file BPatch_image.C fails with
similar errors.
So, I tried putting the defines in Types.h, however that does not work.
#define __STDC_LIMIT_MACROS
#define __STDC_CONSTANT_MACROS
I did put the -dD and used -E to get a file with the includes and
defines expanded/listed.
jgalaro@titan-ext6:~/OpenSpeedShop_ROOT/BUILD/titan-ext1/dyninst-8.2.0/dyninstAPI>
/opt/cray/xt-asyncpe/5.27/bin/CC -DBPATCH_DLL_BUILD -DUSE_PARSE_API
-DWITHOUT_SYMLITE -DWITH_SYMTAB_API -Darch_64bit -Darch_x86_64
-Dbug_force_terminate_failure -Dbug_syscall_changepc_rewind -Dcap_32_64
-Dcap_async_events -Dcap_binary_rewriter -Dcap_dwarf -Dcap_dynamic_heap
-Dcap_fixpoint_gen -Dcap_liveness -Dcap_mutatee_traps -Dcap_noaddr_gen
-Dcap_ptrace -Dcap_registers -Dcap_stripped_binaries -Dcap_thread_db
-Dcap_threads -Dcap_tramp_liveness -DdyninstAPI_EXPORTS -Dos_linux
-Dx86_64_unknown_linux2_4 -std=c++0x -std=c++11 -fvisibility=hidden
-fvisibility-inlines-hidden -W -Wall -Wpointer-arith -Wcast-qual
-Woverloaded-virtual -Wcast-align -Wno-non-template-friend -O2 -g -fPIC
-I/lustre/atlas/proj-shared/csc103/jgalaro/krellroot_v2.1u5/include
-I/lustre/atlas/proj-shared/csc103/jgalaro/boost_1.53.0/include
-I/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext1/dyninst-8.2.0/common/h
-I/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext1/dyninst-8.2.0/dataflowAPI/h
-I/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext1/dyninst-8.2.0/dwarf/h
-I/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext1/dyninst-8.2.0/dyninstAPI/h
-I/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext1/dyninst-8.2.0/dynutil/h
-I/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext1/dyninst-8.2.0/elf/h
-I/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext1/dyninst-8.2.0/instructionAPI/h
-I/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext1/dyninst-8.2.0/parseAPI/h
-I/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext1/dyninst-8.2.0/patchAPI/h
-I/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext1/dyninst-8.2.0/proccontrol/h
-I/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext1/dyninst-8.2.0/stackwalk/h
-I/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext1/dyninst-8.2.0/symlite/h
-I/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext1/dyninst-8.2.0/symtabAPI/h
-I/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext1/dyninst-8.2.0
-I/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext1/dyninst-8.2.0/external
-I/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext1/dyninst-8.2.0/dyninstAPI/src
-o CMakeFiles/dyninstAPI.dir/src/BPatch.C.o -E -dD
/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext1/dyninst-8.2.0/dyninstAPI/src/BPatch.C
jgalaro@titan-ext6:~/OpenSpeedShop_ROOT/BUILD/titan-ext1/dyninst-8.2.0/dyninstAPI>
Which creates a 212,401 line file:
wc CMakeFiles//dyninstAPI.dir/src/BPatch.C.o
212401 572738 6774287 CMakeFiles//dyninstAPI.dir/src/BPatch.C.o
These defines are found at the top of that file, but not the definitions
of INT32_MAX, UINT32_MAX, or INT64_C that common/src/Types.h wants.
The INT32_MAX, etc. are not defined in the file.
#define __INT32_MAX__ 2147483647
#define __UINT32_MAX__ 4294967295U
#define __INT64_C(c) c ## L
Thanks,
Jim G
On 10/18/2014 07:50 AM, Dave Goodell wrote:
On Oct 18, 2014, at 12:17 AM, Josh Stone <jist...@redhat.com> wrote:
On 10/17/2014 08:17 PM, Jim Galarowicz wrote:
Hi Josh,
Thanks for the reply. I haven't been able to figure anything out. This
must be unique to Titan? It seems no one else has had this issue?
I tried looking along the include path.
39%] Building CXX object
dyninstAPI/CMakeFiles/dyninstAPI.dir/src/BPatch.C.o
In file included from
/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext1/dyninst-8.2.0/common/src/headers.h:53:0,
from
/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext1/dyninst-8.2.0/common/src/Timer.h:43,
from
/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext1/dyninst-8.2.0/common/src/stats.h:38,
from
/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext1/dyninst-8.2.0/dyninstAPI/src/BPatch.C:43:
/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext1/dyninst-8.2.0/common/src/fraction.h:
In constructor 'fraction::fraction(int64_t)':
/ccs/home/jgalaro/OpenSpeedShop_ROOT/BUILD/titan-ext1/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-ext1/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)) {
I didn't see any includes of stdint.h in the include trace above when I
examined each of the files.
It's not even just that direct include chain that you have to worry
about, but also anything each those may have included before getting to
this point, or even what BPatch.C included before that line 43.
jgalaro@titan-ext1:~/OpenSpeedShop_ROOT/BUILD/titan-ext1/dyninst-8.2.0/common/src>
grep stdint *.h
Types.h:#include <stdint.h>
Types.h:#include <stdint.h>
Types.h:#include <stdint.h>
Types.h:#include <stdint.h>
jgalaro@titan-ext1:~/OpenSpeedShop_ROOT/BUILD/titan-ext1/dyninst-8.2.0/common/src>
cd ../../dyninstAPI/src
jgalaro@titan-ext1:~/OpenSpeedShop_ROOT/BUILD/titan-ext1/dyninst-8.2.0/dyninstAPI/src>
!gre
grep stdint *.h
I'm dead in the water on Titan. I've built Dyninst here many times.
I tried the pre-release 8.2 version I had and that fails in the same way.
They have upgraded the system since then.
Something as innocent as a glibc or libstdc++ update may have altered
what headers you're pulling indirectly. It can be nasty to figure this
out, no doubt.
In fact, current glibc no longer bothers with __STDC_LIMIT_MACROS:
https://sourceware.org/bugzilla/show_bug.cgi?id=15366
I'll try again tomorrow.
Perhaps peek through the preprocessed output? Run "make VERBOSE=1" to
get the failed command, then replace "-c" with "-E" to get just the
preprocessor result, and see where it went awry.
(Sorry for not trimming, replying from my phone)
Also adding "-dD" will show you what got #defined where. It usually makes a big
difference for me when I'm debugging a preprocessing problem.
-Dave
Or if you're willing to kludge, just toss "#define __STDC_LIMIT_MACROS"
at the beginning of BPatch.C. That will at least get you unstuck. :)
_______________________________________________
Dyninst-api mailing list
Dyninst-api@cs.wisc.edu
https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api
_______________________________________________
Dyninst-api mailing list
Dyninst-api@cs.wisc.edu
https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api