I am also facing problem in building tejas 1.3
As per video link by shubhankar....
first I got errors like
‘cout’ was not declared in this scope
‘endl’ was not declared in this scope
.
.
in src/emulator/pin/causalityTool.cpp
So I added below statement at top of above file
using namespace std;
Now though I am geting Tejas.jar but after below mentioned output
$ ant make-jar
Buildfile: /home/ivsvas/projects/training-ai-accelerator/Tejas1.3/build.xml
build-subprojects:
init:
[copy] Copying 2 files to /home/ivsvas/projects/training-ai-accelerator/Tejas1.3/bin
build-project:
[echo] Tejas: /home/ivsvas/projects/training-ai-accelerator/Tejas1.3/build.xml
[javac] /home/ivsvas/projects/training-ai-accelerator/Tejas1.3/build.xml:49: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] /home/ivsvas/projects/training-ai-accelerator/Tejas1.3/build.xml:55: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 3 source files to /home/ivsvas/projects/training-ai-accelerator/Tejas1.3/bin
[javac] warning: [options] bootstrap class path not set in conjunction with -source 6
[javac] warning: [options] source value 6 is obsolete and will be removed in a future release
[javac] warning: [options] target value 1.6 is obsolete and will be removed in a future release
[javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
[javac] 4 warnings
[javac] /home/ivsvas/projects/training-ai-accelerator/Tejas1.3/build.xml:59: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
build-pin:
[exec] g++ -Wall -Werror -Wno-unknown-pragmas -D__PIN__=1 -DPIN_CRT=1 -fno-stack-protector -fno-exceptions -funwind-tables -fasynchronous-unwind-tables -fno-rtti -DTARGET_IA32E -DHOST_IA32E -fPIC -DTARGET_LINUX -fabi-version=2 -faligned-new -I/home/ivsvas/projects/training-ai-accelerator/pin-3.18-98332-gaebd7b1e6-gcc-linux/source/include/pin -I/home/ivsvas/projects/training-ai-accelerator/pin-3.18-98332-gaebd7b1e6-gcc-linux/source/include/pin/gen -isystem /home/ivsvas/projects/training-ai-accelerator/pin-3.18-98332-gaebd7b1e6-gcc-linux/extras/stlport/include -isystem /home/ivsvas/projects/training-ai-accelerator/pin-3.18-98332-gaebd7b1e6-gcc-linux/extras/libstdc++/include -isystem /home/ivsvas/projects/training-ai-accelerator/pin-3.18-98332-gaebd7b1e6-gcc-linux/extras/crt/include -isystem /home/ivsvas/projects/training-ai-accelerator/pin-3.18-98332-gaebd7b1e6-gcc-linux/extras/crt/include/arch-x86_64 -isystem /home/ivsvas/projects/training-ai-accelerator/pin-3.18-98332-gaebd7b1e6-gcc-linux/extras/crt/include/kernel/uapi -isystem /home/ivsvas/projects/training-ai-accelerator/pin-3.18-98332-gaebd7b1e6-gcc-linux/extras/crt/include/kernel/uapi/asm-x86 -I/home/ivsvas/projects/training-ai-accelerator/pin-3.18-98332-gaebd7b1e6-gcc-linux/extras/components/include -I/home/ivsvas/projects/training-ai-accelerator/pin-3.18-98332-gaebd7b1e6-gcc-linux/extras/xed-intel64/include/xed -I/home/ivsvas/projects/training-ai-accelerator/pin-3.18-98332-gaebd7b1e6-gcc-linux/source/tools/Utils -I/home/ivsvas/projects/training-ai-accelerator/pin-3.18-98332-gaebd7b1e6-gcc-linux/source/tools/InstLib -O3 -fomit-frame-pointer -fno-strict-aliasing -I/home/ivsvas/projects/training-ai-accelerator/Tejas1.3/src/emulator/pin/../../simulator/emulatorinterface/communication -I/home/ivsvas/projects/training-ai-accelerator/Tejas1.3/src/emulator/pin/../../simulator/emulatorinterface/communication/shm -I/home/ivsvas/projects/training-ai-accelerator/Tejas1.3/src/emulator/pin/../../simulator/emulatorinterface/communication/filePacket -c causalityTool.cpp ../../simulator/emulatorinterface/communication/shm/shmem.cc
[exec] causalityTool.cpp: In function ‘VOID Instruction(LEVEL_CORE::INS, VOID*)’:
[exec] causalityTool.cpp:682:28: error: ‘LEVEL_BASE::BOOL LEVEL_CORE::INS_IsBranchOrCall(LEVEL_CORE::INS)’ is deprecated [-Werror=deprecated-declarations]
[exec] if (INS_IsBranchOrCall(ins))//INS_IsIndirectBranchOrCall(ins))
[exec] ^
[exec] In file included from /home/ivsvas/projects/training-ai-accelerator/pin-3.18-98332-gaebd7b1e6-gcc-linux/source/include/pin/level_core.PLH:50:0,
[exec] from /home/ivsvas/projects/training-ai-accelerator/pin-3.18-98332-gaebd7b1e6-gcc-linux/source/include/pin/pin.H:24,
[exec] from causalityTool.cpp:23:
[exec] /home/ivsvas/projects/training-ai-accelerator/pin-3.18-98332-gaebd7b1e6-gcc-linux/source/include/pin/gen/ins_api_xed_ia32.PH:63:32: note: declared here
[exec] extern PIN_DEPRECATED_API BOOL INS_IsBranchOrCall(INS ins);
[exec] ^~~~~~~~~~~~~~~~~~
[exec] cc1plus: all warnings being treated as errors
[exec] make: *** [makefile_linux_mac:52: obj-pin/causalityTool.o] Error 1
[exec] Result: 2
build:
make-jar:
[jar] Building jar: /home/ivsvas/projects/training-ai-accelerator/Tejas1.3/jars/tejas.jar
BUILD SUCCESSFUL
Total time: 3 seconds
$
$
Also running tests, I am getting result as below
$ ls
hello.out hello_world.cpp test.sh test.sh.bak
$ ./test.sh
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: cannot find -lm
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
creating instruction pool..
error in reading the output of objdump on /home/ivsvas/projects/training-ai-accelerator/Tejas1.3/tests/hello.o
Time : 0
emulator command is : null
java.lang.Exception
at misc.Error.showErrorAndExit(Error.java:39)
at emulatorinterface.translator.x86.objparser.ObjParser.buildStaticInstructionTable(ObjParser.java:128)
at main.Main.main(Main.java:118)
shut down
Exception in thread "Thread-0" java.lang.NullPointerException
at generic.TranslatorStatistics.printTranslatorStatistics(TranslatorStatistics.java:98)
at generic.Statistics.printAllStatistics(Statistics.java:645)
at misc.ShutDownHook.run(ShutDownHook.java:37)
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
$ ls
hello.out 'hello.out_Sat May 15 18:11:55 IST 2021' hello_world.cpp test.sh test.sh.bak
$
My system details as below:
OS: Open SUSE Leap 15.2
gcc version 7.5.0 (SUSE Linux)
Apache Ant(TM) version 1.10.7
openjdk version "11.0.10" 2021-01-19
pin-3.18-98332-gaebd7b1e6-gcc-linux.tar.gz
Can anyone help??
Thanks