First time posting here: I’m building Julia from source to enable external profiling for all three tools
The build fails with:
/home/tippit/julia/src/init.c: In function ‘_julia_init’:
/home/tippit/julia/src/init.c:697:17: error: redefinition of ‘jit_profiling’
697 | const char *jit_profiling = getenv("ENABLE_JITPROFILING");
| ^~~~~~~~~~~~~
/home/tippit/julia/src/init.c:683:17: note: previous definition of ‘jit_profiling’ was here
683 | const char *jit_profiling = getenv("ENABLE_JITPROFILING");
Make.user looks like this:
USE_BINARYBUILDER=0
USE_BINARYBUILDER_LLVM=0
USE_INTEL_JITEVENTS=1
USE_PROFILE_JITEVENTS=1
USE_PERF_JITEVENTS=1
My temporary fix to compile was to comment out lines 690 and 697 in src/init.c to avoid the redefinition, but I’ve since rebuilt successfully with init.c lines 682-710 like this:
#if defined(JL_USE_INTEL_JITEVENTS)
#if !defined(JIT_PROFILING_ENABLED)
#define JIT_PROFILING_ENABLED
const char *jit_profiling = getenv("ENABLE_JITPROFILING");
#endif
if (jit_profiling && atoi(jit_profiling)) {
jl_using_intel_jitevents = 1;
}
#endif
#if defined(JL_USE_OPROFILE_JITEVENTS)
#if !defined(JIT_PROFILING_ENABLED)
#define JIT_PROFILING_ENABLED
const char *jit_profiling = getenv("ENABLE_JITPROFILING");
#endif
if (jit_profiling && atoi(jit_profiling)) {
jl_using_oprofile_jitevents = 1;
}
#endif
#if defined(JL_USE_PERF_JITEVENTS)
#if !defined(JIT_PROFILING_ENABLED)
#define JIT_PROFILING_ENABLED
const char *jit_profiling = getenv("ENABLE_JITPROFILING");
#endif
if (jit_profiling && atoi(jit_profiling)) {
jl_using_perf_jitevents= 1;
}
#endif
Is this worth opening an issue? Is that a clean solution to the problem?
Thank you!