harvard-acc / ALADDIN

A pre-RTL, power-performance model for fixed-function accelerators
Other
161 stars 54 forks source link

full_trace.so no such file or directory #25

Closed lhanzhang123 closed 4 years ago

lhanzhang123 commented 4 years ago

I've run on docker and I'm trying to run the example program in the readme . Q1 : After pull the image , i'm starting the first step (build) , cmd show a error that /usr/bin/ld: cannot find -lboost_regex collect2: error: ld returned 1 exit status Makefile:86: recipe for target 'aladdin' failed make: *** [aladdin] Error 1 i try to use the command (sudo apt-get install -y libboost-regex-dev) to solve that problem , it remove the error in first time make . But i don't know that is it solution?

Q2 :After i solved the first Q1 , i continue execute the step following the readme , i meet the second question , when i execute the command (clang -g -O1 -S -fno-slp-vectorize -fno-vectorize -fno-unroll-loops -fno-inline -emit-llvm -o triad.llvm triad.c) , cmd show a error that Error opening '/workspace/LLVM-Tracer/full-trace/full_trace.so': /workspace/LLVM-Tracer/full- trace/full_trace.so: cannot open shared object file: No such file or directory -load request ignored.

i have no idea about it . Hope u can help me . Thank you ,Sir .

xyzsam commented 4 years ago

Have you tried pulling the latest Docker image? It should fix the boost_regex issue, but what you did there is fine.

Your other issue sounds like you didn't build LLVM-Tracer. Please follow the instructions here to build the tracer and try again (but remember to update the paths to full_trace.so accordingly).

lhanzhang123 commented 4 years ago

i think that i'm pulling the latest Docker image by this command (docker pull xyzsam/gem5-aladdin), so i think i don't need to build LLVM-Tracer , right ?

I fixed that problem 2 , because i found full_trace.so in a strange path ($TRACER_HOME/lib) , and there have trace_logger.llvm that file needed in next step . Q3 : but i met a new problem about Generate machine code , when i execute that command ( gcc -fno-inline -o triad-instrumented full.s -lm -lz ) , cmd show that /tmp/ccMw9ihn.o: In function `create_trace(char const*)': llvm-link:(.text+0x918): undefined reference to XXX

i have snapshot 2 picture that show the error occur at start and end . thank you, sir .

picture1 picture2

lhanzhang123 commented 4 years ago

i have found full_trace.so and trace_logger.llvm , there are $TRACER_HOME/build/full-trace/ and $TRACER_HOME/build/profile-func respectively , i try to execute opt and llvm-link , it's success , but i met same problem while creating triad-instrumented file , same as above .

lhanzhang123 commented 4 years ago

i have fixed these problem in the following ways : Problem 1 : trace_logger.llvm and full_trace.so : no such file or directory Solution : change the original path on readme $TRACER_HOME/full-trace/full_trace.so => $TRACER_HOME/build/full-trace/full_trace.so $TRACER_HOME/profile-func/trace_logger.llvm => $TRACER_HOME/build/profile-func/trace_logger.llvm

Problem 2 : llvm-link:(.text+0x918): undefined reference to XXX Solution : change the original command on readme gcc -fno-inline -o triad-instrumented full.s -lm –lz => g++ -O0 –fno-inline –o –triad-instrumented full.s –lm – lz –lpthread