Analysis utility issue on "Build CFG"

Available to be read by all.
Giacomo_Valente
Posts: 12
Joined: Fri Nov 17, 2017 8:28 pm

Analysis utility issue on "Build CFG"

Postby Giacomo_Valente » Sat Dec 22, 2018 6:24 pm

Hello,
I have successfully built all the necessary software for using LynSyn. When I try to use the Analysis utility (analysis_tool) to build a CFG, starting from a SDx project that makes use of sds_utils.h, the CFG creation fails, and the "bin generation too".
The console error is reported in the following:


/usr/bin/clang++-5.0 -I/home/sohrabi/Desktop/TULIPP/sdx_projects/tulipp_board_UG1236/tulipp_board_example/src -I"../src" -I../libs/sds_utils -I /opt/Xilinx/SDx/2017.4/target/aarch32-none/include -I /opt/Xilinx/Vivado/2017.4/include -I /opt/Xilinx/SDK/2017.4/gnu/aarch32/lin/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/include/c++/6.2.1 -I /opt/Xilinx/SDK/2017.4/gnu/aarch32/lin/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/include/c++/6.2.1/arm-none-eabi/v7-a/fpv3/hard -I /opt/Xilinx/SDK/2017.4/gnu/aarch32/lin/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/include/c++/6.2.1/backward -I /opt/Xilinx/SDK/2017.4/gnu/aarch32/lin/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/6.2.1/include -I /opt/Xilinx/SDK/2017.4/gnu/aarch32/lin/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/6.2.1/include-fixed -I /opt/Xilinx/SDK/2017.4/gnu/aarch32/lin/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/include -I /opt/Xilinx/SDK/2017.4/gnu/aarch32/lin/gcc-arm-none-eabi/bin/../arm-none-eabi/libc/usr/include -Os -target armv7a--none-gnueabi -mcpu=cortex-a9 -mfloat-abi=hard -g -emit-llvm -S /home/sohrabi/Desktop/TULIPP/sdx_projects/tulipp_board_UG1236/tulipp_board_example/src/main.cpp
/home/sohrabi/Desktop/TULIPP/sdx_projects/tulipp_board_UG1236/tulipp_board_example/src/main.cpp:38:10: fatal error: 'sds_utils.h' file not found


The path where the header is, is included (it is the -I../libs/sds_utils).
Is it a known issue?

Thanks,
Giacomo

Giacomo_Valente
Posts: 12
Joined: Fri Nov 17, 2017 8:28 pm

Re: Analysis utility issue on "Build CFG"

Postby Giacomo_Valente » Sat Dec 22, 2018 6:30 pm

Ok, I solved using absolute paths in the SDx project after three hours of tentatives.
I hope that, if the problem is real, it will be solved, as it is very difficult to substitute all the relative paths with absolute ones :)

Thanks,
Giacomo

Asbjørn_Djupdal
Posts: 32
Joined: Wed Feb 01, 2017 4:15 pm

Re: Analysis utility issue on "Build CFG"

Postby Asbjørn_Djupdal » Wed Jan 02, 2019 8:50 am

I am finally back from christmas vacation.

You should not need to use absolute paths, this sounds like a bug. I did fix something similar before christmas, but if you pulled the latest version from git shortly before you posted, you should have the new version.

I will look into it.

Giacomo_Valente
Posts: 12
Joined: Fri Nov 17, 2017 8:28 pm

Re: Analysis utility issue on "Build CFG"

Postby Giacomo_Valente » Wed Jan 02, 2019 6:41 pm

Thanks, I did try to pull since I was thinking the problem was solved. But there was another problem: after pull latest updates (today), I was not able to rebuild tools using Ubuntu 16.04 and the flow that worked well for me since today.
Here are the steps:

Pre-requisites
- sudo apt install build-essential libusb-1.0-0-dev clang-5.0 libclang-5.0-dev mesa-common-dev libgl1-mesa-dev

Qmake
- used the Stephan Binner repo
- sudo add-apt-repository ppa:beineri/opt-qt596-xenial
- sudo apt-get update
- sudo apt-get install qt59-meta-minimal qt-latest qtcreator-latest qt59charts-no-lgpl
- source /opt/qt59/bin/qt59-env.sh

Makefile modifications:
export QMAKE = qmake CONFIG+=debug
export CLANGPATH = /usr/lib/clang/5.0
export CLANGPP = clang++-5.0
export LLVM_CONFIG = llvm-config-5.0

The above flow worked fine to obtain binary executable of the tools. Now I had the following errors (last lines of the shell)

make[1]: Entering directory '/home/dewsjoe/repo/sthem/analysis_utility/wrapper'
g++ wrapper.cpp -o wrapper
wrapper.cpp: In function ‘int main(int, char**)’:
wrapper.cpp:75:12: error: ‘arg’ does not name a type
for(auto arg : args) {
^
wrapper.cpp:78:3: error: expected ‘;’ before ‘clangline’
clangline += "-Os -target aarch64--none-gnueabi -g -emit-llvm -S " + input;
^
wrapper.cpp:78:72: error: could not convert ‘clangline.std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator+=<char, std::char_traits<char>, std::allocator<char> >(std::operator+(const _CharT*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>](input))’ from ‘std::__cxx11::basic_string<char>’ to ‘bool’
clangline += "-Os -target aarch64--none-gnueabi -g -emit-llvm -S " + input;
^
wrapper.cpp:79:15: error: expected primary-expression before ‘parserline1’
std::string parserline1 = std::string(argv[2]) + " " + base(input) + ".ll -xml " + base(input) + ".xml";
^
wrapper.cpp:79:15: error: expected ‘)’ before ‘parserline1’
wrapper.cpp:79:15: error: ‘parserline1’ was not declared in this scope
wrapper.cpp:87:31: error: ‘system’ was not declared in this scope
if(!system(clangline.c_str())) {
^
wrapper.cpp:88:16: error: ‘parserline1’ was not declared in this scope
if(!system(parserline1.c_str())) {
^
Makefile:2: recipe for target 'wrapper' failed
make[1]: *** [wrapper] Error 1
make[1]: Leaving directory '/home/dewsjoe/repo/sthem/analysis_utility/wrapper'
Makefile:9: recipe for target 'all' failed
make: *** [all] Error 2



Do you have any feedback related to this?
Thank you.
Giacomo

Asbjørn_Djupdal
Posts: 32
Joined: Wed Feb 01, 2017 4:15 pm

Re: Analysis utility issue on "Build CFG"

Postby Asbjørn_Djupdal » Thu Jan 03, 2019 7:32 am

Strange. Seems like your c++ compiler does not accept c++11. I have now added the c++11 flag to the Makefile, hopefully that will fix it.

Giacomo_Valente
Posts: 12
Joined: Fri Nov 17, 2017 8:28 pm

Re: Analysis utility issue on "Build CFG"

Postby Giacomo_Valente » Thu Jan 03, 2019 1:37 pm

Thanks, now it works perfectly both in tool compilation and with the use of relative paths.

Giacomo


Return to “FAQ about Tulipp Development Platform”

Who is online

Users browsing this forum: No registered users and 7 guests