harvard-acc / LLVM-Tracer

An LLVM pass to profile dynamic LLVM IR instructions and runtime values
Other
135 stars 35 forks source link

symbol multiply defined! #15

Closed zic-du closed 7 years ago

zic-du commented 7 years ago

Hello, When I am using the following command to link the llvm files (for Triad): /usr/lib/llvm-3.4/bin/llvm-link -o full.llvm triad-opt.llvm ${TRACER_HOME}/build/profile-func/trace_logger.llvm,

I am getting this error: /usr/lib/llvm-3.4/bin/llvm-link: link error in '/../LLVM-Tracer/build/profile-func/trace_logger.llvm': Linking globals named 'triad': symbol multiply defined!

I have tried it with 'md' benchmark as well and it generated the same error. Any idea, what might be causing this?

Regards.

xyzsam commented 7 years ago

The linker is complaining about the symbol named 'triad' multiply defined, and not a symbol from the tracer itself. Are you sure you can build triad standalone (i.e. without tracer instrumentation)?

xyzsam commented 7 years ago

Also make sure you have TRACER_HOME defined in your environment.

'/../LLVM-Tracer/build/profile-func/trace_logger.llvm'

doesn't appear like a valid absolute path to me.

zic-du commented 7 years ago

The 'triad' was built successfully standalone as well. TRACER_HOME was defined prior to running these commands. The path is not absolute because I deleted my home directory path before posting. It is absolute.

xyzsam commented 7 years ago

Two things:

  1. It appears you have not updated LLVM-Tracer. We updated it a few weeks ago with a new installation directory structure. Update, and follow the instructions in the README to build with CMake.
  2. Have you updated your version of SHOC? We updated the SHOC and MachSuite benchmarks a few weeks back, although I'm not sure why anything we changed there would cause this error to go away. If you have not updated, please do (just pull from Aladdin at https://github.com/ysshao/Aladdin). Then, inside the SHOC benchmark directory, you can execute the command "make run-trace" to automatically generate the instrumented binary and dynamic trace.
zic-du commented 7 years ago

Thanks! It seems to be working now.

Regards.

On Mon, Nov 14, 2016 at 4:49 PM, Sam Xi notifications@github.com wrote:

Two things:

  1. It appears you have not updated LLVM-Tracer. We updated it a few weeks ago with a new installation directory structure. Update, and follow the instructions in the README to build with CMake.
  2. Have you updated your version of SHOC? We updated the SHOC and MachSuite benchmarks a few weeks back, although I'm not sure why anything we changed there would cause this error to go away. If you have not updated, please do (just pull from Aladdin at https://github.com/ysshao/Aladdin https://github.com/ysshao/Aladdin). Then, inside the SHOC benchmark directory, you can execute the command "make run-trace" to automatically generate the instrumented binary and dynamic trace.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ysshao/LLVM-Tracer/issues/15#issuecomment-260489108, or mute the thread https://github.com/notifications/unsubscribe-auth/AVddnTjRAYId9sy4NBWR1rht0pdJEgC_ks5q-OVggaJpZM4Kx3nb .

Zamshed Iqbal Chowdhury Graduate Student Dept. of ECE UMN, TC