10-28-2014 09:29 AM
Hi all,
I am trying to run a c simulation but it results in an error (see below).
I'm not using opencv at all.
I'm running Vivado 2014.3 on an ubuntu 14.04 machine.
Do I have to manually install all opencv libraries on the system? Or am I missing something else like setting some library path or similar.
Thank you
Compiling ../../../../source/mmult_tb.cpp in debug mode Compiling ../../../../source/mmult_core.cpp in debug mode Generating csim.exe /usr/bin/ld: cannot find -lopencv_calib3d /usr/bin/ld: cannot find -lopencv_contrib /usr/bin/ld: cannot find -lopencv_core /usr/bin/ld: cannot find -lopencv_features2d /usr/bin/ld: cannot find -lopencv_flann /usr/bin/ld: cannot find -lopencv_gpu /usr/bin/ld: cannot find -lopencv_highgui /usr/bin/ld: cannot find -lopencv_imgproc /usr/bin/ld: cannot find -lopencv_legacy /usr/bin/ld: cannot find -lopencv_ml /usr/bin/ld: cannot find -lopencv_objdetect /usr/bin/ld: cannot find -lopencv_photo /usr/bin/ld: cannot find -lopencv_stitching /usr/bin/ld: cannot find -lopencv_superres /usr/bin/ld: cannot find -lopencv_ts /usr/bin/ld: cannot find -lopencv_video /usr/bin/ld: cannot find -lopencv_videostab collect2: ld returned 1 exit status make: *** [csim.exe] Error 1 @E [SIM-1] 'csim_design' failed: compilation error(s).
12-11-2014 03:24 AM
Hi,
I have been able to work around this problem
It is not very elegant but I got the problem sorted :)
Basically I made the opencv libraries included in vivado hls visible to the compiler.
The needed libraries are in xilinx/Vivado_HLS/2014.3/lnx64/tools/opencv/
so I made a soft link to a directory ~/lib for instance and add that directory to the LIBRARY_PATH environment variable.
I also had to do some renaming so the files have the right name.
For instance libopencv_core.so.2.4.5 -> libopencv_core.so
By the way, I still think that the best solution is that the compiler does not try to link against libraries that are not needed.
11-24-2014 03:58 AM
12-02-2014 06:07 AM
12-02-2014 10:21 PM
Are you sure this is the correct testcase? I ran script.tcl in HLS 2014.3 but on Windows 7 environment and it ran without any error. Attached is the vivado_hls.log.
Additonally I didnt find any OpenCV reference in the files.
Could you please recheck?
12-03-2014 03:53 AM
I checked that this small test case causes me these problems. I've attached the log file.
If I go to the csim directory project/solution1/csim/build and run
make -f csim.mk --dry-run
I get:
/Soft/xilinx/Vivado_HLS/2014.3/lnx64/tools/gcc/bin/g++ obj/test_tb.o obj/test.o -D_DEBUG -Wl,--as-needed -L "/Soft/xilinx/Vivado_HLS/2014.3/lnx64/tools/systemc/lib" -lsystemc -lpthread -L "/Soft/xilinx/Vivado_HLS/2014.3/lnx64/tools/fpo_v7_0" -lgmp -lmpfr -lIp_floating_point_v7_0_bitacc_cmodel -L "/Soft/xilinx/Vivado_HLS/2014.3/lnx64/tools/opencv" -lopencv_calib3d -lopencv_contrib -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_gpu -lopencv_highgui -lopencv_imgproc -lopencv_legacy -lopencv_ml -lopencv_objdetect -lopencv_photo -lopencv_stitching -lopencv_superres -lopencv_ts -lopencv_video -lopencv_videostab -L "/Soft/xilinx/Vivado_HLS/2014.3/lnx64/tools/fft_v9_0" -lIp_xfft_v9_0_bitacc_cmodel -L "/Soft/xilinx/Vivado_HLS/2014.3/lnx64/tools/fir_v7_0" -lgmp -lIp_fir_compiler_v7_2_bitacc_cmodel -o csim.exe
Which tries to link with opencv stuff
I've checked the makefiles and there is a __SIM_OPENCV__ = 1 in csim.mk which causes everything to be compiled with opencv libraries.
I've also attached the makefiles.
(for some reason I had to compress the files in order to attach them :/ )
Regards
Antonio
12-04-2014 06:11 AM
12-11-2014 03:24 AM
Hi,
I have been able to work around this problem
It is not very elegant but I got the problem sorted :)
Basically I made the opencv libraries included in vivado hls visible to the compiler.
The needed libraries are in xilinx/Vivado_HLS/2014.3/lnx64/tools/opencv/
so I made a soft link to a directory ~/lib for instance and add that directory to the LIBRARY_PATH environment variable.
I also had to do some renaming so the files have the right name.
For instance libopencv_core.so.2.4.5 -> libopencv_core.so
By the way, I still think that the best solution is that the compiler does not try to link against libraries that are not needed.
12-11-2014 05:49 AM